Re: pg_regress: Treat child process failure as test failure

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_regress: Treat child process failure as test failure
Date: 2022-11-26 21:46:24
Message-ID: C1580930-4A9D-494D-A456-C789745EED48@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 26 Nov 2022, at 21:55, Andres Freund <andres(at)anarazel(dot)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 Content-Type Size
v2-0001-Consider-a-failed-test-process-as-a-failed-test.patch application/octet-stream 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Lawrence Barwick 2022-11-27 00:43:47 CF 2022-11: entries "Waiting for Committer" but no recent activity
Previous Message Andrew Dunstan 2022-11-26 21:25:29 Re: MSVC vs Perl