Skip to content

Commit

Permalink
ktest: Fix ELSE IF statements
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 26, 2012
1 parent 979570e commit 95f5783
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,9 @@ sub __read_config {

if ($rest =~ /\sIF\s+(.*)/) {
# May be a ELSE IF section.
if (!process_if($name, $1)) {
if (process_if($name, $1)) {
$if_set = 1;
} else {
$skip = 1;
}
$rest = "";
Expand Down

0 comments on commit 95f5783

Please sign in to comment.