From 3610a767f69ff5303d5ee15974f24f8bf9259738 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin Date: Wed, 22 Apr 2026 08:38:08 +0200 Subject: [PATCH] BUG/MINOR: reg-tests: make shell syntax errors fatal Detect shell parser errors in test LOG files right after vtest execution and mark the run as failed when such errors are found. This turns malformed feature cmd expressions from warning-like diagnostics into hard failures, so broken test conditions are caught reliably. --- scripts/run-regtests.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index a07c15dca..0fda975f2 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -379,6 +379,11 @@ if [ -n "$testlist" ]; then cmd="$VTEST_PROGRAM -b $((2<<20)) -k -t ${VTEST_TIMEOUT} -L $verbose $debug $jobcount $vtestparams $testlist" eval $cmd _vtresult=$? + grep -rE --include="LOG" 'sh: -c: line [0-9]+: syntax error|syntax error near unexpected token|Syntax error' "$TESTDIR" + if [ $? -eq 0 ]; then + echo "########################## Fatal shell syntax errors ##########################" + _vtresult=1 + fi else echo "No tests found that meet the required criteria" fi -- 2.47.3