summaryrefslogtreecommitdiff
path: root/src/test/modules
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-12-29 18:01:53 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-12-29 18:20:00 +0100
commitc5385929593dd8499cfb5d85ac322e8ee1819fd4 (patch)
treedf87a0618dea5cb1d41f0cd9e1faad27320c0438 /src/test/modules
parent7418767f11d11ca4003ed3e8e96296eabb2acfe1 (diff)
Make all Perl warnings fatal
There are a lot of Perl scripts in the tree, mostly code generation and TAP tests. Occasionally, these scripts produce warnings. These are probably always mistakes on the developer side (true positives). Typical examples are warnings from genbki.pl or related when you make a mess in the catalog files during development, or warnings from tests when they massage a config file that looks different on different hosts, or mistakes during merges (e.g., duplicate subroutine definitions), or just mistakes that weren't noticed because there is a lot of output in a verbose build. This changes all warnings into fatal errors, by replacing use warnings; by use warnings FATAL => 'all'; in all Perl files. Discussion: https://www.postgresql.org/message-id/flat/06f899fd-1826-05ab-42d6-adeb1fd5e200%40eisentraut.org
Diffstat (limited to 'src/test/modules')
-rw-r--r--src/test/modules/brin/t/01_workitems.pl2
-rw-r--r--src/test/modules/brin/t/02_wal_consistency.pl2
-rw-r--r--src/test/modules/commit_ts/t/001_base.pl2
-rw-r--r--src/test/modules/commit_ts/t/002_standby.pl2
-rw-r--r--src/test/modules/commit_ts/t/003_standby_2.pl2
-rw-r--r--src/test/modules/commit_ts/t/004_restart.pl2
-rw-r--r--src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl2
-rw-r--r--src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl2
-rw-r--r--src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl2
-rw-r--r--src/test/modules/test_custom_rmgrs/t/001_basic.pl2
-rw-r--r--src/test/modules/test_misc/t/001_constraint_validation.pl2
-rw-r--r--src/test/modules/test_misc/t/002_tablespace.pl2
-rw-r--r--src/test/modules/test_misc/t/003_check_guc.pl2
-rw-r--r--src/test/modules/test_misc/t/004_io_direct.pl2
-rw-r--r--src/test/modules/test_pg_dump/t/001_base.pl2
-rw-r--r--src/test/modules/worker_spi/t/001_worker_spi.pl2
-rw-r--r--src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl2
-rw-r--r--src/test/modules/xid_wraparound/t/002_limits.pl2
-rw-r--r--src/test/modules/xid_wraparound/t/003_wraparounds.pl2
19 files changed, 19 insertions, 19 deletions
diff --git a/src/test/modules/brin/t/01_workitems.pl b/src/test/modules/brin/t/01_workitems.pl
index 5f710742314..376c3a43f1c 100644
--- a/src/test/modules/brin/t/01_workitems.pl
+++ b/src/test/modules/brin/t/01_workitems.pl
@@ -4,7 +4,7 @@
# Verify that work items work correctly
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/brin/t/02_wal_consistency.pl b/src/test/modules/brin/t/02_wal_consistency.pl
index 8b2b244feb9..a588a28669f 100644
--- a/src/test/modules/brin/t/02_wal_consistency.pl
+++ b/src/test/modules/brin/t/02_wal_consistency.pl
@@ -3,7 +3,7 @@
# Verify WAL consistency
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/commit_ts/t/001_base.pl b/src/test/modules/commit_ts/t/001_base.pl
index ae3fc5f52d2..d6ea0c4c692 100644
--- a/src/test/modules/commit_ts/t/001_base.pl
+++ b/src/test/modules/commit_ts/t/001_base.pl
@@ -4,7 +4,7 @@
# Single-node test: value can be set, and is still present after recovery
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 59cc2b1244b..e843578ddb2 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -4,7 +4,7 @@
# Test simple scenario involving a standby
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index 5af511e369c..b38c3c0f268 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -4,7 +4,7 @@
# Test primary/standby scenario where the track_commit_timestamp GUC is
# repeatedly toggled on and off.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/commit_ts/t/004_restart.pl b/src/test/modules/commit_ts/t/004_restart.pl
index 8fe4bedb140..399268ebeee 100644
--- a/src/test/modules/commit_ts/t/004_restart.pl
+++ b/src/test/modules/commit_ts/t/004_restart.pl
@@ -3,7 +3,7 @@
# Testing of commit timestamps preservation across restarts
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
index c96c8d7a4de..b7ac65091ac 100644
--- a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
+++ b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
@@ -2,7 +2,7 @@
# Copyright (c) 2022, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
use File::Copy;
use FindBin;
use PostgreSQL::Test::Utils;
diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl
index 056fa5c6d2b..71a11ddf259 100644
--- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl
+++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl
@@ -2,7 +2,7 @@
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
diff --git a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
index 2b2c144ee28..c63e7bd394e 100644
--- a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
+++ b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
@@ -2,7 +2,7 @@
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
use File::Copy;
diff --git a/src/test/modules/test_custom_rmgrs/t/001_basic.pl b/src/test/modules/test_custom_rmgrs/t/001_basic.pl
index 50655d3788a..dc3d8302999 100644
--- a/src/test/modules/test_custom_rmgrs/t/001_basic.pl
+++ b/src/test/modules/test_custom_rmgrs/t/001_basic.pl
@@ -1,7 +1,7 @@
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
diff --git a/src/test/modules/test_misc/t/001_constraint_validation.pl b/src/test/modules/test_misc/t/001_constraint_validation.pl
index 5a07a5d36df..4d0ea0c59d8 100644
--- a/src/test/modules/test_misc/t/001_constraint_validation.pl
+++ b/src/test/modules/test_misc/t/001_constraint_validation.pl
@@ -4,7 +4,7 @@
# Verify that ALTER TABLE optimizes certain operations as expected
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/test_misc/t/002_tablespace.pl b/src/test/modules/test_misc/t/002_tablespace.pl
index f774a021a8a..220e2b073d4 100644
--- a/src/test/modules/test_misc/t/002_tablespace.pl
+++ b/src/test/modules/test_misc/t/002_tablespace.pl
@@ -3,7 +3,7 @@
# regression tests.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/test_misc/t/003_check_guc.pl b/src/test/modules/test_misc/t/003_check_guc.pl
index a5d680e82e7..0c222bada90 100644
--- a/src/test/modules/test_misc/t/003_check_guc.pl
+++ b/src/test/modules/test_misc/t/003_check_guc.pl
@@ -2,7 +2,7 @@
# postgresql.conf.sample.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/test_misc/t/004_io_direct.pl b/src/test/modules/test_misc/t/004_io_direct.pl
index dddcfb1aa96..e3f0966b8de 100644
--- a/src/test/modules/test_misc/t/004_io_direct.pl
+++ b/src/test/modules/test_misc/t/004_io_direct.pl
@@ -1,7 +1,7 @@
# Very simple exercise of direct I/O GUC.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use Fcntl;
use IO::File;
use PostgreSQL::Test::Cluster;
diff --git a/src/test/modules/test_pg_dump/t/001_base.pl b/src/test/modules/test_pg_dump/t/001_base.pl
index a5d5b9b35d3..25a80c8c663 100644
--- a/src/test/modules/test_pg_dump/t/001_base.pl
+++ b/src/test/modules/test_pg_dump/t/001_base.pl
@@ -2,7 +2,7 @@
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
diff --git a/src/test/modules/worker_spi/t/001_worker_spi.pl b/src/test/modules/worker_spi/t/001_worker_spi.pl
index ba1d281e81b..4759b55a608 100644
--- a/src/test/modules/worker_spi/t/001_worker_spi.pl
+++ b/src/test/modules/worker_spi/t/001_worker_spi.pl
@@ -3,7 +3,7 @@
# Test worker_spi module.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl b/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl
index 4cf579047ee..4121154a53c 100644
--- a/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl
+++ b/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl
@@ -2,7 +2,7 @@
# Test wraparound emergency autovacuum.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/xid_wraparound/t/002_limits.pl b/src/test/modules/xid_wraparound/t/002_limits.pl
index 6aeea19cdc8..7750473bc58 100644
--- a/src/test/modules/xid_wraparound/t/002_limits.pl
+++ b/src/test/modules/xid_wraparound/t/002_limits.pl
@@ -8,7 +8,7 @@
# been advanced.
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
diff --git a/src/test/modules/xid_wraparound/t/003_wraparounds.pl b/src/test/modules/xid_wraparound/t/003_wraparounds.pl
index be71b00a17c..283d1532c2a 100644
--- a/src/test/modules/xid_wraparound/t/003_wraparounds.pl
+++ b/src/test/modules/xid_wraparound/t/003_wraparounds.pl
@@ -4,7 +4,7 @@
#
use strict;
-use warnings;
+use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;