From 7d03fa3cd5407f4d8ea023ae836812f762a36a13 Mon Sep 17 00:00:00 2001 From: Srikanth Muppandam Date: Fri, 8 May 2026 17:49:24 +0530 Subject: [PATCH] lava: emit testcase signals using direct printf Update send-to-lava.sh to emit buffered LAVA testcase signals using the shell builtin printf instead of cat. This keeps the signal emission path shorter and adds clean newline boundaries around each signal, reducing the chance of malformed LAVA testcase parsing when serial console output is noisy. This does not suppress or modify kernel/dmesg logging. Kernel logs remain untouched, and the change is limited to userspace signal emission. Signed-off-by: Srikanth Muppandam --- Runner/utils/send-to-lava.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Runner/utils/send-to-lava.sh b/Runner/utils/send-to-lava.sh index 6cebc36c..a89a2e21 100755 --- a/Runner/utils/send-to-lava.sh +++ b/Runner/utils/send-to-lava.sh @@ -28,10 +28,16 @@ else echo "[WARNING] Result file missing: $RESULT_FILE" >&2 fi -# Emit signals in one clean atomic flush +# Emit signals using shell builtin printf. +# Do not use cat. Do not touch printk/dmesg. if [ -s "$SIGNAL_FILE" ]; then - sleep 1 # small delay to let dmesg calm - cat "$SIGNAL_FILE" + while IFS= read -r signal_line || [ -n "$signal_line" ]; do + [ -n "$signal_line" ] || continue + + # Blank lines help if previous console output did not end cleanly. + # The signal itself is still emitted only once. + printf '\n%s\n\n' "$signal_line" + done < "$SIGNAL_FILE" fi # Cleanup