Re: pg_regress: Treat child process failure as test failure
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Andres Freund <andres@anarazel.de>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-26T21:46:24Z
Lists: pgsql-hackers
Attachments
- v2-0001-Consider-a-failed-test-process-as-a-failed-test.patch (application/octet-stream) patch v2-0001
> 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/
Commits
-
Consider a failed process as a failed test in pg_regress
- 337903a16fb0 16.0 landed