-
Notifications
You must be signed in to change notification settings - Fork 602
Fix tests when -DSILENT_NO_TAINT_SUPPORT is defined #20972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
988dc01
cb0a8c7
f7ef137
1e7ac3b
bca1c72
d4fa19e
c61fb35
e4213b9
5d6a7e4
e5fbeee
8353261
407081d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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/; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you only checking SILENT_NO_TAINT_SUPPORT? Shouldn't this be |
||
|
|
||
| no warnings 'locale'; # We test even weird locales; and do some scary things | ||
| # in ok locales | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 = | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the change of naming style? All the rest of this file is snake case.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency with the |
||
| (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 { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would lose these checks entirely. I am very hopeful that we will never have a config variable called "taint_support".