On 2/24/18 10:12, Peter Eisentraut wrote: > On 2/24/18 07:37, Michael Paquier wrote: >> On Fri, Feb 23, 2018 at 01:57:44PM -0500, Peter Eisentraut wrote: >>> Oh. I actually had that file as 0600 in my checked-out tree, probably >>> from earlier experiments. Fixed that. And I also changed it to make >>> another temp file that is explicitly 0644, because we can't rely on that >>> being the default either. >> >> Thanks for fixing the first one. I also like the second change. This >> patch looks fine to me. > > committed
This contains a slight problem: The tests contain two different branches, depending on whether tls-server-end-point is supported. But these branches run a different number of tests, so the test count of the top of the test file might be wrong. Here is a patch that restructures this to count the tests more dynamically. Thoughts? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>From c96f5ce5cabae3bedb8d07164f2a7d3bba82f4bc Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <pete...@gmx.net> Date: Tue, 6 Mar 2018 14:49:07 -0500 Subject: [PATCH] Fix test counting in SSL tests The branch that does not support tls-server-end-point runs more tests, so we need to structure the test counting dynamically. --- src/test/ssl/t/002_scram.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index 3d7f9abfbe..a805a3196b 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -8,15 +8,13 @@ use ServerSetup; use File::Copy; -if ($ENV{with_openssl} eq 'yes') -{ - plan tests => 6; -} -else +if ($ENV{with_openssl} ne 'yes') { plan skip_all => 'SSL not supported by this build'; } +my $number_of_tests = 6; + # This is the hostname used to connect to the server. my $SERVERHOSTADDR = '127.0.0.1'; @@ -70,8 +68,11 @@ "scram_channel_binding=tls-server-end-point", qr/channel binding type "tls-server-end-point" is not supported by this build/, "SCRAM authentication with tls-server-end-point as channel binding"); + $number_of_tests++; } test_connect_fails($common_connstr, "scram_channel_binding=not-exists", qr/unsupported SCRAM channel-binding type/, "SCRAM authentication with invalid channel binding"); + +done_testing($number_of_tests); base-commit: 286c0ab257f8dde8e5494426b86c38f3877ae5c2 -- 2.16.2