]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
oauth_validator: Print captured stderr after call-count failure
authorJacob Champion <jchampion@postgresql.org>
Wed, 17 Jun 2026 16:57:15 +0000 (09:57 -0700)
committerJacob Champion <jchampion@postgresql.org>
Wed, 17 Jun 2026 17:15:38 +0000 (10:15 -0700)
If the call count test fails, you'll reasonably want to know what the
network trace looked like, but that information is currently swallowed.
Print it out instead.

Backpatch-through: 18

src/test/modules/oauth_validator/t/001_server.pl

index c0dafb8be7642bd7b0fcd77150dc6b52b98ecc0f..95693fcdb187422a7875da0654125cc6c1556ca7 100644 (file)
@@ -444,7 +444,10 @@ if (like($stderr, $count_pattern, "call count: count is printed"))
        # to change across OSes and Curl updates, we're likely in trouble if we see
        # hundreds or thousands of calls.
        $stderr =~ $count_pattern;
-       cmp_ok($1, '<', 100, "call count is reasonably small");
+       unless (cmp_ok($1, '<', 100, "call count is reasonably small"))
+       {
+               diag "full stderr:\n$stderr";
+       }
 }
 
 # Stress test: make sure our builtin flow operates correctly even if the client