Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-03 Thread Daniel Gustafsson
> On 2 Dec 2021, at 23:54, Andres Freund wrote: > Cool. I guess you're coming to commit something like that? After another successful pass with MSVC in the CI setup I've pushed this now. -- Daniel Gustafsson https://vmware.com/

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Daniel Gustafsson
> On 2 Dec 2021, at 23:54, Andres Freund wrote: > > Hi, > > On 2021-12-02 23:34:06 +0100, Daniel Gustafsson wrote: >>> 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

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Andres Freund
Hi, On 2021-12-02 23:34:06 +0100, Daniel Gustafsson wrote: > > 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/

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Daniel Gustafsson
> 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

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Andres Freund
Hi, On 2021-12-02 22:07:17 +0100, Daniel Gustafsson wrote: > > On 2 Dec 2021, at 20:51, Andres Freund 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. > > > >

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Andres Freund
Hi, On 2021-12-02 15:59:44 -0500, Andrew Dunstan wrote: > On 12/2/21 14:51, Andres Freund wrote: > > 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

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Daniel Gustafsson
> On 2 Dec 2021, at 20:51, Andres Freund 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 o

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Andrew Dunstan
On 12/2/21 14:51, Andres Freund 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: >

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-02 Thread Andres Freund
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_

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Tom Lane
Michael Paquier writes: > On Wed, Dec 01, 2021 at 04:04:09PM -0500, Tom Lane wrote: >> I agree that some docs about this would be nice, but I think the rules >> for when to use perl2host are more complex than what you suggest here. >> Perhaps Andrew can clarify. > It seems to me that the rule app

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Michael Paquier
On Wed, Dec 01, 2021 at 04:04:09PM -0500, Tom Lane wrote: > I agree that some docs about this would be nice, but I think the rules > for when to use perl2host are more complex than what you suggest here. > Perhaps Andrew can clarify. +When passing a path from the Perl test code to PostgreSQL, like

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Tom Lane
Daniel Gustafsson writes: > Would it make sense to add something like the attached to the Portability > section in the src/test/perl/README? It definitely would've helped me with > this particular issue, but that's admittedly a pretty limited samplesize. I agree that some docs about this would b

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 20:49, Daniel Gustafsson wrote: > Looks like perl2host() was the missing piece, fairywren turned green with > commit c3b34a0ff4. Thanks for pointing me in the right direction, I will > draft > a small paragraph on this to the TAP test README for other to learn from. Would i

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 12:49, Daniel Gustafsson wrote: > >> On 1 Dec 2021, at 07:19, Michael Paquier wrote: >> >> On Tue, Nov 30, 2021 at 11:34:21PM -0500, Tom Lane wrote: >>> Daniel Gustafsson writes: Oh, interesting, I hadn't realized that. I'll go do that instead then. >>> >>> ... okay,

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 07:19, Michael Paquier wrote: > > On Tue, Nov 30, 2021 at 11:34:21PM -0500, Tom Lane wrote: >> Daniel Gustafsson writes: >>> Oh, interesting, I hadn't realized that. I'll go do that instead then. >> >> ... okay, so all we learned is that it really is an ENOENT failure. >> >

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Michael Paquier
On Tue, Nov 30, 2021 at 11:34:21PM -0500, Tom Lane wrote: > Daniel Gustafsson writes: > > Oh, interesting, I hadn't realized that. I'll go do that instead then. > > ... okay, so all we learned is that it really is an ENOENT failure. > > At this point my guess is that the test is copying the key

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: > Oh, interesting, I hadn't realized that. I'll go do that instead then. ... okay, so all we learned is that it really is an ENOENT failure. At this point my guess is that the test is copying the key file to the wrong place because of an MSys path issue. I don't know t

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 22:36, Tom Lane wrote: > > Daniel Gustafsson writes: >> That seems like a change worthy of doing regardless, so +1 on trying this. >> We >> can't use %m in frontend though can we? > > Yes we can, since v12 or whenever we started using our own snprintf always. Oh, interes

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: > That seems like a change worthy of doing regardless, so +1 on trying this. We > can't use %m in frontend though can we? Yes we can, since v12 or whenever we started using our own snprintf always. regards, tom lane

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 21:55, Tom Lane wrote: > > Daniel Gustafsson writes: >> Scratch that, all the copying for tests 001 through 003 had failed. I >> clearly >> need another coffee. >> The question still stands though, does anyone have any ideas on what could've >> happened as I'm currently dr

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: > Scratch that, all the copying for tests 001 through 003 had failed. I clearly > need another coffee. > The question still stands though, does anyone have any ideas on what could've > happened as I'm currently drawing a blank? Dunno, but it strikes me that the libpq co

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 17:40, Daniel Gustafsson wrote: > >> On 30 Nov 2021, at 11:50, Daniel Gustafsson >> wrote: >> >> Add TAP tests for contrib/sslinfo > > This just failed on fairywren with the below: > > not ok 1 - certificate authorization succeeds with correct client cert in > PEM form

Re: pgsql: Add TAP tests for contrib/sslinfo

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 11:50, Daniel Gustafsson > wrote: > > Add TAP tests for contrib/sslinfo This just failed on fairywren with the below: not ok 1 - certificate authorization succeeds with correct client cert in PEM format # Failed test 'certificate authorization succeeds with correct