pgsql: Better handle interrupting TAP tests

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Better handle interrupting TAP tests
Date: 2022-10-19 15:37:04
Message-ID: E1olB7v-0035BS-LU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Better handle interrupting TAP tests

Set up a signal handler for INT/TERM so that we run our END block if we
get them. In END, if the exit status indicates a problem, call
_update_pid(-1) to improve chances of the stop working in case start()
hasn't returned yet.

Also, change END's teardown_node() so that it passes fail_ok=>1, so that
if a node fails to stop, we still stop the other nodes in the same test.

Per complaint from Andres Freund.

This doesn't seem important enough to backpatch, at least for now.

Discussion: https://postgr.es/m/20220930040734.mbted42oiynhn2t6@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/460c0076e8de6233eee53f4d6c175b04d8d41de9

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2022-10-20 04:23:45 pgsql: Fix assertion failures while processing NEW_CID record in logica
Previous Message Alvaro Herrera 2022-10-19 10:50:29 pgsql: Get rid of XLogCtlInsert->forcePageWrites