From 01150ac34b34b1e2b7ac65acacbb4d472a40b883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sun, 26 Apr 2026 15:21:29 -0300 Subject: [PATCH] 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 --- xCAT-test/xcattest | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 1a80e1fe0..708ae79ca 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -1229,6 +1229,7 @@ sub load_case { } } close($fd); + $newcmdstart = 0; } my @wrong_cases = ();