From: Andres Freund <andres@anarazel.de>
To: Daniel Gustafsson <daniel@yesql.se>
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 13:21:12 -0800
Message-ID: <20211202212112.ttklesxps5eqb533@alap3.anarazel.de> (raw)
In-Reply-To: <9ABB6DDC-A3B5-45FB-9EA4-3331079C09CE@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>
Hi,
On 2021-12-02 22:07:17 +0100, Daniel Gustafsson wrote:
> > On 2 Dec 2021, at 20:51, Andres Freund <andres@anarazel.de> wrote:
> >
> > Hi,
> >
> > On 2021-12-01 20:49:21 +0100, Daniel Gustafsson wrote:
> >> Looks like perl2host() was the missing piece, fairywren turned green with
> >> commit c3b34a0ff4.
> >
> > Does that work with MSVC? I rebased my CI patch ontop of this, and it fails on
> > windows:
> > https://cirrus-ci.com/task/6093088335593472?logs=ssl_test#L5
>
> I was under the impression that it did, but it seems that my Appveyor scripts
> had a bug which hid that =( Sorry for that.
I really want to get the CI stuff merged so stuff like this is easier going
forward... FWIW, I have a new colleague working on installing more of the
optional dependencies for windows - but we can add those later.
> This seems to be another case of Perl being perfectly happy to copy and manage
> the files, but Postgres not being able to read them since we'd otherwise die()
> a lot sooner. The error message is the same as when the msys directory wasn't
> fixed with perl2host:
> [04:05:47.204] # got: 'psql: error: connection to server at "127.0.0.1", port 59360 failed: certificate present, but not private key file "C:cirrussrctestssltmp_checktmp_test_AIn7/client.key"
>
> Looking at other tests, we pass a tempdir() to postgres just fine, so that
> clearly works. The one difference here is that the filename is added with
> "/client.key", so I have a feeling this is a delimiter issue where Windows
> expects a backslash? In src/test/recovery/t/025_stuck_on_old_timeline.pl we do
> the following, which IMO would be neat if perl2host (or a similar function)
> would do for us:
Hm. Isn't the problem that we are not adding enough of the other path
delimiters? The /client.key seems fine, the problem is that all the other
delimiters were swallowed. Or is that what you mean?
I think the difference might be that the most of the other tests do not pass
such paths to postgres via postgresql.conf (based on a *very* cursory grep). I
assume the guc machinery treats the \ as an escape, and that's why you're
seeing c:cirrussrc... instead of c:\cirrus\src\...
> my $archivedir_primary = $node_primary->archive_dir;
> $archivedir_primary =~ s!\\!/!g if $PostgreSQL::Test::Utils::windows_os;
> $node_primary->append_conf(
> 'postgresql.conf', qq(
> archive_command = '"$perlbin" "$FindBin::RealBin/cp_history_files" "%p" "$archivedir_primary/%f"'
> wal_keep_size=128MB
> ));
>
> I'll fix it, or revert if I can't make it work. Sorry for the breakage.
And this works because it uses *forward* slashes instad of backward slashes,
which then do not get escaped by the guc machinery.
Greetings,
Andres Freund
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: andres@anarazel.de, daniel@yesql.se, michael@paquier.xyz, tgl@sss.pgh.pa.us, andrew@dunslane.net
Subject: Re: pgsql: Add TAP tests for contrib/sslinfo
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>
* 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