Replace Test::More plans with done_testing

Daniel Gustafsson <dgustafsson@postgresql.org>

Commit: 549ec201d6132b7c7ee11ee90a4e02119259ba5b
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2022-02-11T19:54:44Z
Releases: 15.0
Replace Test::More plans with done_testing

Rather than doing manual book keeping to plan the number of tests to run
in each TAP suite, conclude each run with done_testing() summing up the
the number of tests that ran. This removes the need for maintaning and
updating the plan count at the expense of an accurate count of remaining
during the test suite runtime.

This patch has been discussed a number of times, often in the context of
other patches which updates tests, so a larger number of discussions can
be found in the archives.

Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/DD399313-3D56-4666-8079-88949DAC870F@yesql.se

Files

PathChange+/−
contrib/amcheck/t/001_verify_heapam.pl modified +3 −1
contrib/amcheck/t/002_cic.pl modified +1 −1
contrib/amcheck/t/003_cic_2pc.pl modified +1 −1
contrib/auto_explain/t/001_auto_explain.pl modified +3 −1
contrib/bloom/t/001_wal.pl modified +3 −1
contrib/oid2name/t/001_basic.pl modified +3 −1
contrib/test_decoding/t/001_repl_stats.pl modified +3 −1
contrib/vacuumlo/t/001_basic.pl modified +3 −1
src/bin/initdb/t/001_initdb.pl modified +3 −1
src/bin/pg_amcheck/t/001_basic.pl modified +3 −1
src/bin/pg_amcheck/t/002_nonesuch.pl modified +3 −1
src/bin/pg_amcheck/t/003_check.pl modified +3 −1
src/bin/pg_amcheck/t/004_verify_heapam.pl modified +2 −1
src/bin/pg_amcheck/t/005_opclass_damage.pl modified +3 −1
src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl modified +3 −1
src/bin/pg_basebackup/t/020_pg_receivewal.pl modified +3 −1
src/bin/pg_basebackup/t/030_pg_recvlogical.pl modified +3 −1
src/bin/pg_checksums/t/001_basic.pl modified +3 −1
src/bin/pg_checksums/t/002_actions.pl modified +3 −1
src/bin/pg_config/t/001_pg_config.pl modified +3 −1
src/bin/pg_controldata/t/001_pg_controldata.pl modified +3 −1
src/bin/pg_ctl/t/001_start_stop.pl modified +3 −1
src/bin/pg_ctl/t/002_status.pl modified +3 −1
src/bin/pg_ctl/t/003_promote.pl modified +3 −1
src/bin/pg_ctl/t/004_logrotate.pl modified +3 −1
src/bin/pg_dump/t/001_basic.pl modified +3 −1
src/bin/pg_dump/t/002_pg_dump.pl modified +2 −76
src/bin/pg_dump/t/003_pg_dump_with_server.pl modified +3 −1
src/bin/pg_dump/t/010_dump_connstr.pl modified +2 −4
src/bin/pg_resetwal/t/001_basic.pl modified +3 −1
src/bin/pg_resetwal/t/002_corrupted.pl modified +3 −1
src/bin/pg_rewind/t/001_basic.pl modified +2 −2
src/bin/pg_rewind/t/002_databases.pl modified +2 −2
src/bin/pg_rewind/t/003_extrafiles.pl modified +2 −2
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl modified +2 −2
src/bin/pg_rewind/t/005_same_timeline.pl modified +3 −2
src/bin/pg_rewind/t/006_options.pl modified +3 −1
src/bin/pg_rewind/t/007_standby_source.pl modified +2 −2
src/bin/pg_rewind/t/008_min_recovery_point.pl modified +3 −1
src/bin/pg_test_fsync/t/001_basic.pl modified +3 −1
src/bin/pg_test_timing/t/001_basic.pl modified +3 −1
src/bin/pg_verifybackup/t/001_basic.pl modified +3 −1
src/bin/pg_verifybackup/t/002_algorithm.pl modified +3 −1
src/bin/pg_verifybackup/t/003_corruption.pl modified +3 −1
src/bin/pg_verifybackup/t/004_options.pl modified +3 −1
src/bin/pg_verifybackup/t/005_bad_manifest.pl modified +3 −1
src/bin/pg_verifybackup/t/006_encoding.pl modified +3 −1
src/bin/pg_verifybackup/t/007_wal.pl modified +3 −1
src/bin/pg_verifybackup/t/008_untar.pl modified +3 −1
src/bin/pg_verifybackup/t/009_extract.pl modified +3 −2
src/bin/pg_verifybackup/t/010_client_untar.pl modified +3 −1
src/bin/pg_waldump/t/001_basic.pl modified +3 −1
src/bin/psql/t/001_basic.pl modified +3 −1
src/bin/psql/t/020_cancel.pl modified +3 −1
src/bin/scripts/t/010_clusterdb.pl modified +3 −1
src/bin/scripts/t/011_clusterdb_all.pl modified +3 −1
src/bin/scripts/t/020_createdb.pl modified +3 −1
src/bin/scripts/t/040_createuser.pl modified +3 −1
src/bin/scripts/t/050_dropdb.pl modified +3 −1
src/bin/scripts/t/070_dropuser.pl modified +3 −1
src/bin/scripts/t/080_pg_isready.pl modified +3 −1
src/bin/scripts/t/090_reindexdb.pl modified +3 −1
src/bin/scripts/t/091_reindexdb_all.pl modified +3 −1
src/bin/scripts/t/100_vacuumdb.pl modified +3 −1
src/bin/scripts/t/101_vacuumdb_all.pl modified +3 −1
src/bin/scripts/t/102_vacuumdb_stages.pl modified +3 −1
src/bin/scripts/t/200_connstr.pl modified +3 −1
src/test/authentication/t/001_password.pl modified +2 −5
src/test/authentication/t/002_saslprep.pl modified +2 −4
src/test/kerberos/t/001_auth.pl modified +3 −5
src/test/ldap/t/001_auth.pl modified +3 −5
src/test/modules/brin/t/01_workitems.pl modified +3 −1
src/test/modules/commit_ts/t/001_base.pl modified +3 −1
src/test/modules/commit_ts/t/002_standby.pl modified +3 −1
src/test/modules/commit_ts/t/003_standby_2.pl modified +3 −1
src/test/modules/commit_ts/t/004_restart.pl modified +3 −1
src/test/modules/test_misc/t/001_constraint_validation.pl modified +3 −1
src/test/modules/test_misc/t/002_tablespace.pl modified +3 −1
src/test/modules/test_misc/t/003_check_guc.pl modified +3 −1
src/test/modules/test_pg_dump/t/001_base.pl modified +2 −38
src/test/perl/README modified +5 −2
src/test/recovery/t/001_stream_rep.pl modified +3 −1
src/test/recovery/t/002_archiving.pl modified +3 −1
src/test/recovery/t/003_recovery_targets.pl modified +3 −1
src/test/recovery/t/004_timeline_switch.pl modified +3 −1
src/test/recovery/t/005_replay_delay.pl modified +3 −1
src/test/recovery/t/006_logical_decoding.pl modified +3 −1
src/test/recovery/t/007_sync_rep.pl modified +3 −1
src/test/recovery/t/008_fsm_truncation.pl modified +3 −1
src/test/recovery/t/009_twophase.pl modified +3 −1
src/test/recovery/t/010_logical_decoding_timelines.pl modified +3 −1
src/test/recovery/t/011_crash_recovery.pl modified +2 −2
src/test/recovery/t/012_subtransactions.pl modified +3 −1
src/test/recovery/t/013_crash_restart.pl modified +2 −3
src/test/recovery/t/014_unlogged_reinit.pl modified +3 −1
src/test/recovery/t/015_promotion_pages.pl modified +3 −1
src/test/recovery/t/016_min_consistency.pl modified +3 −1
src/test/recovery/t/017_shm.pl modified +2 −4
src/test/recovery/t/018_wal_optimize.pl modified +3 −1
src/test/recovery/t/019_replslot_limit.pl modified +3 −1
src/test/recovery/t/020_archive_status.pl modified +3 −1
src/test/recovery/t/021_row_visibility.pl modified +3 −1
src/test/recovery/t/022_crash_temp_files.pl modified +2 −5
src/test/recovery/t/023_pitr_prepared_xact.pl modified +3 −1
src/test/recovery/t/024_archive_recovery.pl modified +3 −1
src/test/recovery/t/025_stuck_on_old_timeline.pl modified +3 −1
src/test/recovery/t/026_overwrite_contrecord.pl modified +2 −2
src/test/recovery/t/027_stream_regress.pl modified +2 −4
src/test/ssl/t/001_ssltests.pl modified +2 −4
src/test/ssl/t/002_scram.pl modified +1 −3
src/test/ssl/t/003_sslinfo.pl modified +2 −4
src/test/subscription/t/001_rep_changes.pl modified +3 −1
src/test/subscription/t/002_types.pl modified +3 −1
src/test/subscription/t/003_constraints.pl modified +3 −1
src/test/subscription/t/004_sync.pl modified +3 −1
src/test/subscription/t/005_encoding.pl modified +3 −1
src/test/subscription/t/006_rewrite.pl modified +3 −1
src/test/subscription/t/007_ddl.pl modified +3 −1
src/test/subscription/t/008_diff_schema.pl modified +3 −1
src/test/subscription/t/009_matviews.pl modified +3 −1
src/test/subscription/t/010_truncate.pl modified +3 −1
src/test/subscription/t/011_generated.pl modified +3 −1
src/test/subscription/t/012_collation.pl modified +3 −5
src/test/subscription/t/013_partition.pl modified +3 −1
src/test/subscription/t/014_binary.pl modified +3 −1
src/test/subscription/t/015_stream.pl modified +3 −1
src/test/subscription/t/016_stream_subxact.pl modified +3 −1
src/test/subscription/t/017_stream_ddl.pl modified +3 −1
src/test/subscription/t/018_stream_subxact_abort.pl modified +3 −1
src/test/subscription/t/019_stream_subxact_ddl_abort.pl modified +3 −1
src/test/subscription/t/020_messages.pl modified +3 −1
src/test/subscription/t/021_twophase.pl modified +3 −1
src/test/subscription/t/022_twophase_cascade.pl modified +3 −1
src/test/subscription/t/023_twophase_stream.pl modified +3 −1
src/test/subscription/t/024_add_drop_pub.pl modified +3 −1
src/test/subscription/t/025_rep_changes_for_schema.pl modified +3 −1
src/test/subscription/t/026_worker_stats.pl modified +3 −1
src/test/subscription/t/027_nosuperuser.pl modified +3 −1
src/test/subscription/t/100_bugs.pl modified +3 −1

Discussion