pgsql: Improve range checks of options for pg_test_fsync and pg_test_ti

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve range checks of options for pg_test_fsync and pg_test_ti
Date: 2020-09-28 01:15:13
Message-ID: E1kMhl3-00076X-QM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve range checks of options for pg_test_fsync and pg_test_timing

Both tools never had safeguard checks for the options provided, and it
was possible to make pg_test_fsync run an infinite amount of time or
pass down buggy values to pg_test_timing.

These behaviors have existed for a long time, with no actual complaints,
so no backpatch is done. Basic TAP tests are introduced for both tools.

Author: Michael Paquier
Reviewed-by: Peter Eisentraut
Discussion: https://postgr.es/m/20200806062759.GE16470@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4d29e6dbd0bb6d8c3a48d0f3c7d65dc1def1b07e

Modified Files
--------------
src/bin/pg_test_fsync/.gitignore | 2 ++
src/bin/pg_test_fsync/Makefile | 6 ++++
src/bin/pg_test_fsync/pg_test_fsync.c | 28 +++++++++++++++---
src/bin/pg_test_fsync/t/001_basic.pl | 25 ++++++++++++++++
src/bin/pg_test_timing/.gitignore | 2 ++
src/bin/pg_test_timing/Makefile | 6 ++++
src/bin/pg_test_timing/pg_test_timing.c | 51 ++++++++++++++++++++-------------
src/bin/pg_test_timing/t/001_basic.pl | 25 ++++++++++++++++
8 files changed, 121 insertions(+), 24 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2020-09-28 01:47:53 pgsql: Improve pg_list.h's linitial(), lsecond() and co macros
Previous Message Tom Lane 2020-09-27 16:51:51 pgsql: Move resolution of AlternativeSubPlan choices to the planner.