aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-09-26 14:48:17 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-09-26 14:48:17 -0400
commit95f57838418358e93212e9dddd60d3502c7f8e2e (patch)
tree41ee29ae494dfa2fb2ba93e186767d48e0bacd21 /tools/testing/ktest
parent979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff)
ktest: Fix ELSE IF statements
The ELSE IF statements do not work as expected if another ELSE statement follows. This is because the $if_set is not set. If the ELSE IF condition is true, the following ELSE should be ignored. But because the $if_set is not set, the following ELSE will also be executed. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 52b7959cd513..c05bcd293d8c 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -840,7 +840,9 @@ sub __read_config {
840 840
841 if ($rest =~ /\sIF\s+(.*)/) { 841 if ($rest =~ /\sIF\s+(.*)/) {
842 # May be a ELSE IF section. 842 # May be a ELSE IF section.
843 if (!process_if($name, $1)) { 843 if (process_if($name, $1)) {
844 $if_set = 1;
845 } else {
844 $skip = 1; 846 $skip = 1;
845 } 847 }
846 $rest = ""; 848 $rest = "";