Re: bailing out in tap tests nearly always a bad idea

From: Andres Freund <andres(at)anarazel(dot)de>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: bailing out in tap tests nearly always a bad idea
Date: 2022-02-22 17:28:37
Message-ID: 20220222172837.m4clwh7zpzw6hmtc@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-02-22 17:37:11 Re: remove more archiving overhead
Previous Message Andres Freund 2022-02-22 17:13:31 Re: TAP output format in pg_regress