diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 79c5aaae57ff..3ca0511da291 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -263,6 +263,7 @@ jobs: - "-Duserelocatableinc" - "-Dcc='clang'" - "-Dcc='g++'" + - "-Accflags=-DSILENT_NO_TAINT_SUPPORT" steps: - name: Install System dependencies diff --git a/lib/locale.t b/lib/locale.t index 66dcf057932c..00cb43f15870 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -36,7 +36,9 @@ my $is_ebcdic = ord("A") == 193; my $os = lc $^O; # Configure now lets you build a perl that silently ignores taint features -my $NoTaintSupport = exists($Config{taint_support}) && !$Config{taint_support}; +my $NoTaintSupport = + (exists($Config{taint_support}) && !$Config{taint_support}) || + $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/; no warnings 'locale'; # We test even weird locales; and do some scary things # in ok locales diff --git a/lib/overload.t b/lib/overload.t index adb57d3ee20d..ef10fa92ab2d 100644 --- a/lib/overload.t +++ b/lib/overload.t @@ -1,17 +1,18 @@ #!./perl -T +use Config; BEGIN { chdir 't' if -d 't'; @INC = '../lib'; - require Config; - if (($Config::Config{'extensions'} !~ m!\bList/Util\b!) ){ + if (($Config{'extensions'} !~ m!\bList/Util\b!) ){ print "1..0 # Skip -- Perl configured without List::Util module\n"; exit 0; } } -my $no_taint_support = exists($Config::Config{taint_support}) - && !$Config::Config{taint_support}; +my $NoTaintSupport = + (exists($Config{taint_support}) && !$Config{taint_support}) || + $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/; my %skip_fetch_count_when_no_taint = ( '<${$ts}> RT57012_OV' => 1, @@ -24,7 +25,7 @@ my %skip_fetch_count_when_no_taint = ( sub is_if_taint_supported { my ($got, $expected, $name, @mess) = @_; - if ($expected && $no_taint_support) { + if ($expected && $NoTaintSupport) { return skip("your perl was built without taint support"); } else { @@ -2052,7 +2053,7 @@ foreach my $op (qw(<=> == != < <= > >=)) { my $exp_fetch = ($var eq '$ts') ? $exp_fetch_s : $exp_fetch_a; SKIP: { - if ($skip_fetch_count_when_no_taint{$desc} && $no_taint_support) { + if ($skip_fetch_count_when_no_taint{$desc} && $NoTaintSupport) { skip("your perl was built without taint support"); } else { diff --git a/lib/perl5db.t b/lib/perl5db.t index c38e9994bc3a..5acff938b7cd 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -687,8 +687,10 @@ sub _calc_trace_wrapper } # taint tests -if (!exists($Config{taint_support}) || $Config{taint_support}) -{ +if ( + (!exists($Config{taint_support}) || $Config{taint_support}) && + $Config{ccflags} !~ /-DSILENT_NO_TAINT_SUPPORT/ +) { my $wrapper = _calc_trace_wrapper( { prog => '../lib/perl5db/t/taint', diff --git a/t/lib/warnings/taint b/t/lib/warnings/taint index 12bcc2597551..860869090720 100644 --- a/t/lib/warnings/taint +++ b/t/lib/warnings/taint @@ -10,7 +10,7 @@ def # taint.c use Config; BEGIN { - if ( exists($Config{taint_support}) && not $Config{taint_support}) { + if ( (exists($Config{taint_support}) && not $Config{taint_support}) || $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/) { print "SKIPPED\n# your perl was built without taint support\n"; exit 0; } @@ -30,7 +30,7 @@ def # taint.c use Config; BEGIN { - if ( exists($Config{taint_support}) && not $Config{taint_support}) { + if ( (exists($Config{taint_support}) && not $Config{taint_support}) || $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/) { print "SKIPPED\n# your perl was built without taint support\n"; exit 0; } @@ -58,7 +58,7 @@ def # taint.c use Config; BEGIN { - if ( exists($Config{taint_support}) && not $Config{taint_support}) { + if ( (exists($Config{taint_support}) && not $Config{taint_support}) || $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/) { print "SKIPPED\n# your perl was built without taint support\n"; exit 0; } diff --git a/t/op/taint.t b/t/op/taint.t index daeb164efafe..b2c308b3d7c6 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -18,7 +18,9 @@ use strict; use warnings; use Config; -my $NoTaintSupport = exists($Config{taint_support}) && !$Config{taint_support}; +my $NoTaintSupport = + (exists($Config{taint_support}) && !$Config{taint_support}) || + $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/; if ($NoTaintSupport) { skip_all("your perl was built without taint support"); diff --git a/t/perf/taint.t b/t/perf/taint.t index 22a35608e2e4..7206184fefa3 100644 --- a/t/perf/taint.t +++ b/t/perf/taint.t @@ -20,7 +20,10 @@ BEGIN { require Config; import Config; require './test.pl'; skip_all_if_miniperl("No Scalar::Util under miniperl"); - if (exists($Config{taint_support}) && !$Config{taint_support}) { + if ( + (exists($Config{taint_support}) && !$Config{taint_support}) || + $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/ + ) { skip_all("built without taint support"); } } diff --git a/t/run/runenv.t b/t/run/runenv.t index b32b4f20a9e7..40d972a220bb 100644 --- a/t/run/runenv.t +++ b/t/run/runenv.t @@ -124,7 +124,10 @@ try({PERL5OPT => '-w -w'}, ''); SKIP: { - if (exists($Config{taint_support}) && !$Config{taint_support}) { + if ( + (exists($Config{taint_support}) && !$Config{taint_support}) || + $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/ + ) { skip("built without taint support", 2); } try({PERL5OPT => '-t'}, diff --git a/t/run/switcht.t b/t/run/switcht.t index 533d8be992fd..8b12bc33df5e 100644 --- a/t/run/switcht.t +++ b/t/run/switcht.t @@ -8,7 +8,10 @@ BEGIN { use Config; -if (exists($Config{taint_support}) && !$Config{taint_support}) { +if ( + (exists($Config{taint_support}) && !$Config{taint_support}) || + $Config{ccflags} =~ /-DSILENT_NO_TAINT_SUPPORT/ +) { skip_all("perl built without taint support"); }