8000 Fix potential rare failure in the kerberos TAP tests · postgrespro/postgres@92273d4 · GitHub
[go: up one dir, main page]

Skip to content
  • Commit 92273d4

    Browse files
    committed
    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
    1 parent dd5b7e4 commit 92273d4

    File tree

    1 file changed

    +4
    -2
    lines changed

    1 file changed

    +4
    -2
    lines changed

    src/test/kerberos/t/001_auth.pl

    Lines changed: 4 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -177,13 +177,15 @@ sub test_access
    177177
    # need to connect over TCP/IP for Kerberos
    178178
    my ($res, $stdoutres, $stderrres) = $node->psql(
    179179
    'postgres',
    180-
    "$query",
    180+
    undef,
    181181
    extra_params => [
    182182
    '-XAtd',
    183183
    $node->connstr('postgres')
    184184
    . " host=$host hostaddr=$hostaddr $gssencmode",
    185185
    '-U',
    186-
    $role
    186+
    $role,
    187+
    '-c',
    188+
    $query
    187189
    ]);
    188190

    189191
    # If we get a query result back, it should be true.

    0 commit comments

    Comments
     (0)
    0