Re: bailing out in tap tests nearly always a bad idea - Mailing list pgsql-hackers

From Andres Freund
Subject Re: bailing out in tap tests nearly always a bad idea
Date
Msg-id 20220222172837.m4clwh7zpzw6hmtc@alap3.anarazel.de
Whole thread Raw
In response to Re: bailing out in tap tests nearly always a bad idea  (Andres Freund <andres@anarazel.de>)
Responses Re: bailing out in tap tests nearly always a bad idea  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

On 2022-02-14 09:46:20 -0800, Andres Freund wrote:
> > t/die-immediately.t .... aieee at t/die-immediately.t line 1.
> > t/die-immediately.t .... Dubious, test returned 255 (wstat 65280, 0xff00)
> > No subtests run
> 
> Hm. Looks different when a test is including our test helpers.
> 
> t/000_die_pg_test_utils.pl .. Dubious, test returned 25 (wstat 6400, 0x1900)
> No subtests run
> t/000_die_test_more.pl ...... error at t/000_die_test_more.pl line 2.
> t/000_die_test_more.pl ...... Dubious, test returned 255 (wstat 65280, 0xff00)
> No subtests run
> 
> So I think we broke something... I think it's the log file redirection stuff
> in INIT.

Any chance somebody with more perl knowledge could look into this? Clearly our
effort to copy all the output the original file descriptors isn't successful
here.

$ perl -I /home/andres/src/postgresql/src/test/perl/ -e "use PostgreSQL::Test::Utils; die 'blorb';"
$ perl -I /home/andres/src/postgresql/src/test/perl/ -e "use Test::More; die 'blorb';"
blorb at -e line 1.

(note that the former will create a tmp_check in your current directory)

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: TAP output format in pg_regress
Next
From: Nathan Bossart
Date:
Subject: Re: remove more archiving overhead