diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2022-11-20 09:51:50 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2022-11-20 10:07:35 -0500 |
commit | 9b4eafcaf41d1192a34b574c21262b755aa455ee (patch) | |
tree | 57fef99f28114489bba42a5c2a6b9ee611e50ff1 /src/backend/jit/llvm/llvmjit_expr.c | |
parent | fb32748e32e2b6b2fcb32220980b93d5436f855e (diff) | |
download | postgresql-9b4eafcaf41d1192a34b574c21262b755aa455ee.tar.gz postgresql-9b4eafcaf41d1192a34b574c21262b755aa455ee.zip |
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
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_expr.c')
0 files changed, 0 insertions, 0 deletions