From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace use of stat()[7] by -s switch in TAP tests to retrieve f
Date: Mon, 02 Oct 2023 23:37:09 +0000
Message-ID: <E1qnSTN-007CqI-8g@gemulon.postgresql.org> (raw)
Replace use of stat()[7] by -s switch in TAP tests to retrieve file size
The list form of stat() is an inelegant API as it relies on the position
of the file size in the list returned in result. Like in any other
places of the tree, replace that with a -s switch instead.
Another suggestion from Dagfinn is File::Stat, which we've been already
using for some other fields. It really comes down to a matter of taste
to choose that over -s, and the latter is more used in the tree.
Author: Bertrand Drouvot
Reviewed-by: Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/b2020df7-d0fc-4ea5-b2a9-7efc6d36b2ac@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6c77bb42ab0eb3f79e934ed3c97568119cca7b5f
Modified Files
--------------
src/bin/pg_controldata/t/001_pg_controldata.pl | 2 +-
src/bin/pg_resetwal/t/002_corrupted.pl | 2 +-
src/test/recovery/t/019_replslot_limit.pl | 14 +++-----------
3 files changed, 5 insertions(+), 13 deletions(-)
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: Replace use of stat()[7] by -s switch in TAP tests to retrieve f
In-Reply-To: <E1qnSTN-007CqI-8g@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