Improve range checks of options for pg_test_fsync and pg_test_timing
authorMichael Paquier
Mon, 28 Sep 2020 01:13:59 +0000 (10:13 +0900)
committerMichael Paquier
Mon, 28 Sep 2020 01:13:59 +0000 (10:13 +0900)
commit4d29e6dbd0bb6d8c3a48d0f3c7d65dc1def1b07e
tree7ae033edad03f0d011369d32721ceb558bc6f38e
parent41efb8340877e8ffd0023bb6b2ef22ffd1ca014d
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[email protected]
src/bin/pg_test_fsync/.gitignore
src/bin/pg_test_fsync/Makefile
src/bin/pg_test_fsync/pg_test_fsync.c
src/bin/pg_test_fsync/t/001_basic.pl [new file with mode: 0644]
src/bin/pg_test_timing/.gitignore
src/bin/pg_test_timing/Makefile
src/bin/pg_test_timing/pg_test_timing.c
src/bin/pg_test_timing/t/001_basic.pl [new file with mode: 0644]