Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d49837

Browse files
committed
Follow-up fixes for "Make all Perl warnings fatal"
Mostly, we need to check whether $ENV{PG_TEST_EXTRA} is set before doing regular expression matches against it.
1 parent 2c321ce commit 9d49837

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

src/interfaces/libpq/t/004_load_balance_dns.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PostgreSQL::Test::Cluster;
77
use Test::More;
88

9-
if ($ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
9+
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
1010
{
1111
plan skip_all =>
1212
'Potentially unsafe test load_balance not enabled in PG_TEST_EXTRA';

src/test/kerberos/t/001_auth.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{
2929
plan skip_all => 'GSSAPI/Kerberos not supported by this build';
3030
}
31-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
31+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
3232
{
3333
plan skip_all =>
3434
'Potentially unsafe test GSSAPI/Kerberos not enabled in PG_TEST_EXTRA';
@@ -203,7 +203,7 @@
203203

204204
END
205205
{
206-
kill 'INT', `cat $kdc_pidfile` if -f $kdc_pidfile;
206+
kill 'INT', `cat $kdc_pidfile` if defined($kdc_pidfile) && -f $kdc_pidfile;
207207
}
208208

209209
note "setting up PostgreSQL instance";

src/test/ldap/t/001_auth.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
plan skip_all => 'LDAP not supported by this build';
2020
}
21-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
21+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
2222
{
2323
plan skip_all =>
2424
'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';

src/test/ldap/t/002_bindpasswd.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
plan skip_all => 'LDAP not supported by this build';
2020
}
21-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
21+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
2222
{
2323
plan skip_all =>
2424
'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';

src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
plan skip_all => 'LDAP not supported by this build';
2222
}
23-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
23+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
2424
{
2525
plan skip_all =>
2626
'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';

src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PostgreSQL::Test::Utils;
88
use Test::More;
99

10-
if ($ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
10+
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
1111
{
1212
plan skip_all => "test xid_wraparound not enabled in PG_TEST_EXTRA";
1313
}

src/test/modules/xid_wraparound/t/002_limits.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Test::More;
1515
use Time::HiRes qw(usleep);
1616

17-
if ($ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
17+
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
1818
{
1919
plan skip_all => "test xid_wraparound not enabled in PG_TEST_EXTRA";
2020
}

src/test/modules/xid_wraparound/t/003_wraparounds.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Test::More;
1111
use Time::HiRes qw(usleep);
1212

13-
if ($ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
13+
if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bxid_wraparound\b/)
1414
{
1515
plan skip_all => "test xid_wraparound not enabled in PG_TEST_EXTRA";
1616
}

src/test/ssl/t/001_ssltests.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
plan skip_all => 'OpenSSL not supported by this build';
1919
}
20-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
20+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
2121
{
2222
plan skip_all =>
2323
'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';

src/test/ssl/t/002_scram.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
plan skip_all => 'OpenSSL not supported by this build';
2222
}
23-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
23+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
2424
{
2525
plan skip_all =>
2626
'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';

src/test/ssl/t/003_sslinfo.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
plan skip_all => 'OpenSSL not supported by this build';
2020
}
21-
elsif ($ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
21+
elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bssl\b/)
2222
{
2323
plan skip_all =>
2424
'Potentially unsafe test SSL not enabled in PG_TEST_EXTRA';

0 commit comments

Comments
 (0)