Re: pgsql: Add TAP tests for contrib/sslinfo - Mailing list pgsql-committers

From Daniel Gustafsson
Subject Re: pgsql: Add TAP tests for contrib/sslinfo
Date
Msg-id 9ABB6DDC-A3B5-45FB-9EA4-3331079C09CE@yesql.se
Whole thread Raw
In response to Re: pgsql: Add TAP tests for contrib/sslinfo  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-committers
> 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.

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
notprivate 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:

  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.

--
Daniel Gustafsson        https://vmware.com/




pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Add TAP tests for contrib/sslinfo
Next
From: Tom Lane
Date:
Subject: pgsql: On Windows, close the client socket explicitly during backend sh