Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msueb-0000ra-1Y for pgsql-committers@arkaria.postgresql.org; Thu, 02 Dec 2021 22:34:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msueZ-0002Z9-FZ for pgsql-committers@arkaria.postgresql.org; Thu, 02 Dec 2021 22:34:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msueZ-0002Z0-80 for pgsql-committers@lists.postgresql.org; Thu, 02 Dec 2021 22:34:11 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msueW-00027U-Hg for pgsql-committers@lists.postgresql.org; Thu, 02 Dec 2021 22:34:10 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 41C092EF6E96 for ; Thu, 2 Dec 2021 23:34:07 +0100 (CET) Received: from s499.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 2DC322E35F56; Thu, 2 Dec 2021 23:34:07 +0100 (CET) Received: from s473.loopia.se (unknown [172.22.191.5]) by s499.loopia.se (Postfix) with ESMTP id 28EC91CE07A0; Thu, 2 Dec 2021 23:34:07 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s899.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with UTF8LMTP id PhullcCUrBGN; Thu, 2 Dec 2021 23:34:06 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from [192.168.72.144] (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s899.loopia.se (Postfix) with ESMTPSA id A1B372C8D5A1; Thu, 2 Dec 2021 23:34:06 +0100 (CET) From: Daniel Gustafsson Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_8C6C47D6-6C25-4B15-9816-AF8816903683" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: pgsql: Add TAP tests for contrib/sslinfo Date: Thu, 2 Dec 2021 23:34:06 +0100 In-Reply-To: <20211202212112.ttklesxps5eqb533@alap3.anarazel.de> Cc: Michael Paquier , Tom Lane , pgsql-committers@lists.postgresql.org, Andrew Dunstan To: Andres Freund References: <1632478.1638305700@sss.pgh.pa.us> <887628C4-6E1C-4DE5-BA8E-4252BA2B1A0D@yesql.se> <1636597.1638308177@sss.pgh.pa.us> <1686601.1638333261@sss.pgh.pa.us> <74D032CB-B5EE-4B39-AFBE-67F835A2CBDF@yesql.se> <50312478-6DB6-4A9A-99BF-2EACFF286149@yesql.se> <20211202195130.e7pprpsx4ell22sp@alap3.anarazel.de> <9ABB6DDC-A3B5-45FB-9EA4-3331079C09CE@yesql.se> <20211202212112.ttklesxps5eqb533@alap3.anarazel.de> X-Mailer: Apple Mail (2.3608.120.23.2.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_8C6C47D6-6C25-4B15-9816-AF8816903683 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 2 Dec 2021, at 22:21, Andres Freund wrote: > And this works because it uses *forward* slashes instad of backward = slashes, > which then do not get escaped by the guc machinery. Correct. Applying the same fix to the src/test/ssl/t/00X (per the = attached) makes the ssl tests pass in MSVC when using your Cirrus CI file from the = "Add CI" thread. -- Daniel Gustafsson https://vmware.com/ --Apple-Mail=_8C6C47D6-6C25-4B15-9816-AF8816903683 Content-Disposition: attachment; filename=fix_msvc.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="fix_msvc.diff" Content-Transfer-Encoding: 7bit commit af33a1e73f350dc1820d031708215745b5455e6f Author: Daniel Gustafsson Date: Thu Dec 2 22:31:15 2021 +0100 Convert backslash to forwardslash diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 4eb181bd04..45f8d4b530 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -56,6 +56,7 @@ foreach my $keyfile (@keys) chmod 0600, "$cert_tempdir/$keyfile" or die "failed to change permissions on $cert_tempdir/$keyfile: $!"; $key{$keyfile} = PostgreSQL::Test::Utils::perl2host("$cert_tempdir/$keyfile"); + $key{$keyfile} =~ s!\\!/!g if $PostgreSQL::Test::Utils::windows_os; } # Also make a copy of that explicitly world-readable. We can't @@ -67,7 +68,7 @@ copy("ssl/client.key", "$cert_tempdir/client_wrongperms.key") chmod 0644, "$cert_tempdir/client_wrongperms.key" or die "failed to change permissions on $cert_tempdir/client_wrongperms.key: $!"; $key{'client_wrongperms.key'} = PostgreSQL::Test::Utils::perl2host("$cert_tempdir/client_wrongperms.key"); - +$key{'client_wrongperms.key'} =~ s!\\!/!g if $PostgreSQL::Test::Utils::windows_os; #### Set up the server. note "setting up data directory"; diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index b965ff038a..1c14bb62e6 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -102,6 +102,7 @@ copy("ssl/client.key", "$cert_tempdir/client_scram.key") "couldn't copy ssl/client_key to $cert_tempdir/client_scram.key for permission change: $!"; chmod 0600, "$cert_tempdir/client_scram.key" or die "failed to change permissions on $cert_tempdir/client_scram.key: $!"; +$client_tmp_key =~ s!\\!/!g if $PostgreSQL::Test::Utils::windows_os; $node->connect_fails( "sslcert=ssl/client.crt sslkey=$client_tmp_key sslrootcert=invalid hostaddr=$SERVERHOSTADDR dbname=certdb user=ssltestuser channel_binding=require", "Cert authentication and channel_binding=require", diff --git a/src/test/ssl/t/003_sslinfo.pl b/src/test/ssl/t/003_sslinfo.pl index 448742129f..6130040283 100644 --- a/src/test/ssl/t/003_sslinfo.pl +++ b/src/test/ssl/t/003_sslinfo.pl @@ -44,6 +44,7 @@ copy("ssl/client_ext.key", "$cert_tempdir/client_ext.key") "couldn't copy ssl/client_ext.key to $cert_tempdir/client_ext.key for permissions change: $!"; chmod 0600, "$cert_tempdir/client_ext.key" or die "failed to change permissions on $cert_tempdir/client_ext.key: $!"; +$client_tmp_key =~ s!\\!/!g if $PostgreSQL::Test::Utils::windows_os; #### Set up the server. --Apple-Mail=_8C6C47D6-6C25-4B15-9816-AF8816903683--