mirror of
https://github.com/torvalds/linux
synced 2024-09-20 11:07:02 +00:00
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>
This commit is contained in:
parent
979570e029
commit
95f5783841
|
@ -840,7 +840,9 @@ sub __read_config {
|
||||||
|
|
||||||
if ($rest =~ /\sIF\s+(.*)/) {
|
if ($rest =~ /\sIF\s+(.*)/) {
|
||||||
# May be a ELSE IF section.
|
# May be a ELSE IF section.
|
||||||
if (!process_if($name, $1)) {
|
if (process_if($name, $1)) {
|
||||||
|
$if_set = 1;
|
||||||
|
} else {
|
||||||
$skip = 1;
|
$skip = 1;
|
||||||
}
|
}
|
||||||
$rest = "";
|
$rest = "";
|
||||||
|
|
Loading…
Reference in a new issue