pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Switch psql's TAP test for query cancellation to use IPC::Run::s
Date: Wed, 13 Sep 2023 01:13:21 +0000
Message-ID: <E1qgERU-003Z2W-RJ@gemulon.postgresql.org> (raw)

Switch psql's TAP test for query cancellation to use IPC::Run::signal()

Previously, the test relied on a trick with a shell to retrieve the PID
of the psql session to be stopped with SIGINT, that was skipped on
Windows.  This commit changes the test to use IPC::Run::signal()
instead, which still does not work on Windows, but for a different
reason: SIGINT would stop the test before finishing.

This should allow the test to run on non-Windows platforms where PPID is
not supported (like NetBSD), spreading it a bit more across the
buildfarm.  And the logic of the test is simpler.

It is the first time in the tree that IPC::Run::signal() is used, so, as
a matter of safety (or just call that as me having cold feet), no
backpatch is done, at least for now.

Author: Yugo NAGATA
Reviewed-by: Fabien Coelho
Discussion: https://postgr.es/m/20230810125935.22c2922ea5250ba79358965b@sraoss.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/522a31ac873d7c6b02677f6d119c089a7dd09dd1

Modified Files
--------------
src/bin/psql/t/020_cancel.pl | 38 ++------------------------------------
1 file changed, 2 insertions(+), 36 deletions(-)



Message-ID: <E1qgERU-003Z2W-RJ@gemulon.postgresql.org>
Permalink:  ../E1qgERU-003Z2W-RJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qgERU-003Z2W-RJ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Switch psql's TAP test for query cancellation to use IPC::Run::s
  In-Reply-To: <E1qgERU-003Z2W-RJ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox