pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <daniel@yesql.se>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org, Andrew Dunstan <andrew@dunslane.net>
Subject: Re: pgsql: Add TAP tests for contrib/sslinfo
Date: Thu, 2 Dec 2021 23:34:06 +0100
Message-ID: <B9497422-6B0E-48FF-B5E9-E3820AF21320@yesql.se> (raw)
In-Reply-To: <20211202212112.ttklesxps5eqb533@alap3.anarazel.de>
References: <1632478.1638305700@sss.pgh.pa.us>
	<887628C4-6E1C-4DE5-BA8E-4252BA2B1A0D@yesql.se>
	<1636597.1638308177@sss.pgh.pa.us>
	<BF937964-0854-49DA-A4F4-51F4287EB304@yesql.se>
	<1686601.1638333261@sss.pgh.pa.us>
	<YacT3tm97xziSUFw@paquier.xyz>
	<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>

> On 2 Dec 2021, at 22:21, Andres Freund <andres@anarazel.de> 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/

Attachments:

fix_msvc.diff (application/octet-stream, 2.5K) download commit af33a1e73f350dc1820d031708215745b5455e6f Author: Daniel Gustafsson <daniel@yesql.se> 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.

view thread (24+ messages)  latest in thread

Message-ID: <B9497422-6B0E-48FF-B5E9-E3820AF21320@yesql.se>
Permalink:  ../B9497422-6B0E-48FF-B5E9-E3820AF21320@yesql.se/
Also on:    postgresql.org/message-id/B9497422-6B0E-48FF-B5E9-E3820AF21320@yesql.se

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: daniel@yesql.se, andres@anarazel.de, michael@paquier.xyz, tgl@sss.pgh.pa.us, andrew@dunslane.net
  Subject: Re: pgsql: Add TAP tests for contrib/sslinfo
  In-Reply-To: <B9497422-6B0E-48FF-B5E9-E3820AF21320@yesql.se>
  References: <1632478.1638305700@sss.pgh.pa.us> <887628C4-6E1C-4DE5-BA8E-4252BA2B1A0D@yesql.se> <1636597.1638308177@sss.pgh.pa.us> <BF937964-0854-49DA-A4F4-51F4287EB304@yesql.se> <1686601.1638333261@sss.pgh.pa.us> <YacT3tm97xziSUFw@paquier.xyz> <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> <B9497422-6B0E-48FF-B5E9-E3820AF21320@yesql.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox