postgresql/src
Andrew Dunstan 9b4eafcaf4 Prevent port collisions between concurrent TAP tests
Currently there is a race condition where if concurrent TAP tests both
test that they can open a port they will assume that it is free and use
it, causing one of them to fail. To prevent this we record a reservation
using an exclusive lock, and any TAP test that discovers a reservation
checks to see if the reserving process is still alive, and looks for
another free port if it is.

Ports are reserved in a directory set by the environment setting
PG_TEST_PORT_DIR, or if that doesn't exist a subdirectory of the top
build directory as set by meson or Makefile.global, or its own
tmp_check directory.

The prove_check recipe in Makefile.global.in is extended to export
top_builddir to the TAP tests. This was already exported by the
prove_installcheck recipes.

Per complaint from Andres Freund

This will be backpatched in due course after some testing.

Discussion: https://postgr.es/m/20221002164931.d57hlutrcz4d2zi7@awork3.anarazel.de
2022-11-20 10:07:35 -05:00
..
backend Switch SQLValueFunction on "name" to use COERCE_SQL_SYNTAX 2022-11-20 10:58:28 +09:00
bin Fix typos and bump catversion. 2022-11-18 16:16:21 -05:00
common Check return value of pclose() correctly 2022-11-15 15:36:51 +01:00
fe_utils meson: Add support for building with precompiled headers 2022-10-06 17:19:30 -07:00
include Switch SQLValueFunction on "name" to use COERCE_SQL_SYNTAX 2022-11-20 10:58:28 +09:00
interfaces libpq: Handle NegotiateProtocolVersion message 2022-11-17 15:42:09 +01:00
makefiles autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
pl Refactor aclcheck functions 2022-11-13 09:02:41 +01:00
port Provide sigaction() for Windows. 2022-11-09 13:06:31 +13:00
template Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
test Prevent port collisions between concurrent TAP tests 2022-11-20 10:07:35 -05:00
timezone Remove unneeded includes of <sys/stat.h> 2022-11-05 12:31:28 +09:00
tools ci: Add task testing windows with mingw 2022-11-17 16:22:25 -08:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Prevent port collisions between concurrent TAP tests 2022-11-20 10:07:35 -05:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00