Skip \password TAP test on old IPC::Run versions
authorDaniel Gustafsson <[email protected]>
Sat, 8 Apr 2023 13:51:45 +0000 (15:51 +0200)
committerDaniel Gustafsson <[email protected]>
Sat, 8 Apr 2023 13:51:45 +0000 (15:51 +0200)
IPC::Run versions prior to 0.98 cause the interactive session to time out,
so SKIP the test in case these versions are detected (they are within the
base requirement for our TAP tests in general).  Error reported by the BF
and investigation by Tom Lane.

Discussion: https://postgr.es/m/414A86BD-986B-48A7-A1E4-EEBCE5AF08CB@yesql.se

src/test/authentication/t/001_password.pl

index f414a8ba904247cd7a817e1388900e49b9b40e70..10ebe014d69ca7ca119a3fbca944c6411c6b7239 100644 (file)
@@ -102,10 +102,12 @@ my $res = $node->safe_psql('postgres',
 is($res, 'SCRAM-SHA-256$1024:', 'scram_iterations in server side ROLE');
 
 # If we don't have IO::Pty, forget it, because IPC::Run depends on that
-# to support pty connections
+# to support pty connections. Also skip if IPC::Run isn't at least 0.98
+# as earlier version cause the session to time out.
 SKIP:
 {
-   skip "IO::Pty required", 1 unless eval { require IO::Pty; };
+   skip "IO::Pty and IPC::Run >= 0.98 required", 1 unless
+       (eval { require IO::Pty; } && eval { $IPC::Run::VERSION >= '0.98' });
 
    # Alter the password on the created role using \password in psql to ensure
    # that clientside password changes use the scram_iterations value when