Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95f57838 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

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: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 979570e0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 = "";