summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2021-04-07 19:58:54 +0900
committerMichael Paquier <michael@paquier.xyz>2021-04-07 19:58:54 +0900
commitb55619948ea18dbc0f4f8ca823aaa687c0fa2567 (patch)
tree4323f604dbbd683720ae1f1b9809092f006672bf
parente7bcfd717ef31166617e0391d5c132f3cfb30fab (diff)
Fix potential rare failure in the kerberos TAP tests
Instead of writing a query to psql's stdin, which can cause a failure where psql exits before writing, reporting a write failure with a broken pipe, this changes the logic to use -c. This was not seen in the buildfarm as no animals with a sensitive environment are running the kerberos tests, but let's be safe. HEAD is able to handle the situation as of 6d41dd0 for all the test suites doing connection checks. f44b9b6 has fixed the same problem for the LDAP tests. Discussion: https://postgr.es/m/YGu7ceWAiSNQDgH5@paquier.xyz Backpatch-through: 11
-rw-r--r--src/test/kerberos/t/001_auth.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index d476a7800e7..8d49847948c 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -177,13 +177,15 @@ sub test_access
# need to connect over TCP/IP for Kerberos
my ($res, $stdoutres, $stderrres) = $node->psql(
'postgres',
- "$query",
+ undef,
extra_params => [
'-XAtd',
$node->connstr('postgres')
. " host=$host hostaddr=$hostaddr $gssencmode",
'-U',
- $role
+ $role,
+ '-c',
+ $query
]);
# If we get a query result back, it should be true.