diff options
author | Noah Misch <noah@leadboat.com> | 2017-12-16 10:03:35 -0800 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2017-12-16 10:03:38 -0800 |
commit | ac93acbc05be2ef995208c1ca17f8083f60ccc53 (patch) | |
tree | e78d0d21a6e4ed041b62179c9962a6b4a02e1a87 /src/test/perl/TestLib.pm | |
parent | d3044f8b0732d369ad255c9268e2feb42acae2a0 (diff) |
Avoid and detect SIGPIPE race in TAP tests.
Don't write to stdin of a psql process that could have already exited
with an authentication failure. Buildfarm members crake and mandrill
have failed once by doing so. Ignore SIGPIPE in all TAP tests.
Back-patch to v10, where these tests were introduced.
Reviewed by Michael Paquier.
Discussion: https://postgr.es/m/20171209210203.GC3362632@rfd.leadboat.com
Diffstat (limited to 'src/test/perl/TestLib.pm')
-rw-r--r-- | src/test/perl/TestLib.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm index 6dba21c0736..141fec687cf 100644 --- a/src/test/perl/TestLib.pm +++ b/src/test/perl/TestLib.pm @@ -74,6 +74,10 @@ BEGIN INIT { + # Return EPIPE instead of killing the process with SIGPIPE. An affected + # test may still fail, but it's more likely to report useful facts. + $SIG{PIPE} = 'IGNORE'; + # Determine output directories, and create them. The base path is the # TESTDIR environment variable, which is normally set by the invoking # Makefile. |