mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-06-20 02:21:05 +00:00
fix: reset newcmdstart between files in xcattest load_case
When a test case file is missing the end marker and the last line is a cmd: directive, $newcmdstart stays set. The parser then appends lines from the next file into the current command. If that next file is a shell script (like simulatorctl.sh in the testcase tree), thousands of lines of Perl/bash get concatenated and executed. Reset $newcmdstart after closing each file to prevent state leaking between files. Fixes #5255
This commit is contained in:
@@ -1229,6 +1229,7 @@ sub load_case {
|
||||
}
|
||||
}
|
||||
close($fd);
|
||||
$newcmdstart = 0;
|
||||
}
|
||||
|
||||
my @wrong_cases = ();
|
||||
|
||||
Reference in New Issue
Block a user