diff options
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 89c2257bed98..ea43dd2f2fd5 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -684,11 +684,8 @@ sub set_value { | |||
684 | } | 684 | } |
685 | ${$overrides}{$lvalue} = $prvalue; | 685 | ${$overrides}{$lvalue} = $prvalue; |
686 | } | 686 | } |
687 | if ($rvalue =~ /^\s*$/) { | 687 | |
688 | delete $opt{$lvalue}; | 688 | $opt{$lvalue} = $prvalue; |
689 | } else { | ||
690 | $opt{$lvalue} = $prvalue; | ||
691 | } | ||
692 | } | 689 | } |
693 | 690 | ||
694 | sub set_eval { | 691 | sub set_eval { |
@@ -3947,12 +3944,22 @@ for (my $i = 0, my $repeat = 1; $i <= $opt{"NUM_TESTS"}; $i += $repeat) { | |||
3947 | } | 3944 | } |
3948 | } | 3945 | } |
3949 | 3946 | ||
3947 | sub option_defined { | ||
3948 | my ($option) = @_; | ||
3949 | |||
3950 | if (defined($opt{$option}) && $opt{$option} !~ /^\s*$/) { | ||
3951 | return 1; | ||
3952 | } | ||
3953 | |||
3954 | return 0; | ||
3955 | } | ||
3956 | |||
3950 | sub __set_test_option { | 3957 | sub __set_test_option { |
3951 | my ($name, $i) = @_; | 3958 | my ($name, $i) = @_; |
3952 | 3959 | ||
3953 | my $option = "$name\[$i\]"; | 3960 | my $option = "$name\[$i\]"; |
3954 | 3961 | ||
3955 | if (defined($opt{$option})) { | 3962 | if (option_defined($option)) { |
3956 | return $opt{$option}; | 3963 | return $opt{$option}; |
3957 | } | 3964 | } |
3958 | 3965 | ||
@@ -3960,13 +3967,13 @@ sub __set_test_option { | |||
3960 | if ($i >= $test && | 3967 | if ($i >= $test && |
3961 | $i < $test + $repeat_tests{$test}) { | 3968 | $i < $test + $repeat_tests{$test}) { |
3962 | $option = "$name\[$test\]"; | 3969 | $option = "$name\[$test\]"; |
3963 | if (defined($opt{$option})) { | 3970 | if (option_defined($option)) { |
3964 | return $opt{$option}; | 3971 | return $opt{$option}; |
3965 | } | 3972 | } |
3966 | } | 3973 | } |
3967 | } | 3974 | } |
3968 | 3975 | ||
3969 | if (defined($opt{$name})) { | 3976 | if (option_defined($name)) { |
3970 | return $opt{$name}; | 3977 | return $opt{$name}; |
3971 | } | 3978 | } |
3972 | 3979 | ||