diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-12-29 18:01:53 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-12-29 18:20:00 +0100 |
commit | c5385929593dd8499cfb5d85ac322e8ee1819fd4 (patch) | |
tree | df87a0618dea5cb1d41f0cd9e1faad27320c0438 /src/bin/pg_rewind/t | |
parent | 7418767f11d11ca4003ed3e8e96296eabb2acfe1 (diff) | |
download | postgresql-c5385929593dd8499cfb5d85ac322e8ee1819fd4.tar.gz postgresql-c5385929593dd8499cfb5d85ac322e8ee1819fd4.zip |
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/bin/pg_rewind/t')
-rw-r--r-- | src/bin/pg_rewind/t/001_basic.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/002_databases.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/003_extrafiles.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/005_same_timeline.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/006_options.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/007_standby_source.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/008_min_recovery_point.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/009_growing_files.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/RewindTest.pm | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index c7b48255a71..842f6c7fbe4 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl index 0d480aedb48..313b2486e17 100644 --- a/src/bin/pg_rewind/t/002_databases.pl +++ b/src/bin/pg_rewind/t/002_databases.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index fd2bee5d208..6e040239c4c 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -4,7 +4,7 @@ # Test how pg_rewind reacts to extra files and directories in the data dirs. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl index 5fb7fa9077c..7d1bb65cae2 100644 --- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl +++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl @@ -5,7 +5,7 @@ # Test pg_rewind when the target's pg_wal directory is a symlink. # use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; use File::Path qw(rmtree); use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_rewind/t/005_same_timeline.pl b/src/bin/pg_rewind/t/005_same_timeline.pl index b4ef05e5607..57e04b0ce24 100644 --- a/src/bin/pg_rewind/t/005_same_timeline.pl +++ b/src/bin/pg_rewind/t/005_same_timeline.pl @@ -6,7 +6,7 @@ # on the same timeline runs successfully. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/006_options.pl b/src/bin/pg_rewind/t/006_options.pl index 4b6e39a47c7..c346b370a66 100644 --- a/src/bin/pg_rewind/t/006_options.pl +++ b/src/bin/pg_rewind/t/006_options.pl @@ -5,7 +5,7 @@ # Test checking options of pg_rewind. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/007_standby_source.pl b/src/bin/pg_rewind/t/007_standby_source.pl index 4fd1ed001cf..fab84a4bbb0 100644 --- a/src/bin/pg_rewind/t/007_standby_source.pl +++ b/src/bin/pg_rewind/t/007_standby_source.pl @@ -25,7 +25,7 @@ # as is. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/008_min_recovery_point.pl b/src/bin/pg_rewind/t/008_min_recovery_point.pl index d4c89451e65..287e4555b55 100644 --- a/src/bin/pg_rewind/t/008_min_recovery_point.pl +++ b/src/bin/pg_rewind/t/008_min_recovery_point.pl @@ -31,7 +31,7 @@ # nodes. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/009_growing_files.pl b/src/bin/pg_rewind/t/009_growing_files.pl index cf60a04ae71..016f7736e77 100644 --- a/src/bin/pg_rewind/t/009_growing_files.pl +++ b/src/bin/pg_rewind/t/009_growing_files.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm index 8fbbd521cb5..23144f19e86 100644 --- a/src/bin/pg_rewind/t/RewindTest.pm +++ b/src/bin/pg_rewind/t/RewindTest.pm @@ -32,7 +32,7 @@ package RewindTest; # to run psql against the primary and standby servers, respectively. use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Exporter 'import'; |