Re: pg_regress: Treat child process failure as test failure - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: pg_regress: Treat child process failure as test failure
Date
Msg-id C1580930-4A9D-494D-A456-C789745EED48@yesql.se
Whole thread Raw
In response to Re: pg_regress: Treat child process failure as test failure  (Andres Freund <andres@anarazel.de>)
Responses Re: pg_regress: Treat child process failure as test failure
List pgsql-hackers
> On 26 Nov 2022, at 21:55, Andres Freund <andres@anarazel.de> wrote:
> On 2022-11-26 21:11:39 +0100, Daniel Gustafsson wrote:

>> The attached makes child failures an error condition for the test as a belts
>> and suspenders type check. Thoughts?
>
> I wonder if it's the right thing to treat a failed psql that's then also
> ignored as "failed (ignored)". Perhaps it'd be better to move the statuses[i]
> != 0 check to before the if (differ)?

I was thinking about that too, but I think you're right.  The "ignore" part is
about the test content and not the test run structure.

> It certainly is a bit confusing that we print a psql failure separately from
> the if "FAILED" vs "ok" bit.

I've moved the statuses[i] check before the differ check, such that there is a
separate block for this not mixed up with the differs check and printing.  It
does duplicate things a little bit but also makes it a lot clearer.

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


Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: MSVC vs Perl
Next
From: Ian Lawrence Barwick
Date:
Subject: CF 2022-11: entries "Waiting for Committer" but no recent activity