From 1c4d14a5fb486c08f4cec6421ab878627cc1049d Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 26 Jun 2020 22:24:03 -0700 Subject: [PATCH] qemu-check.sh: restore error messages when test fails Fixes 428804e1c ("scripts/qemu-check.sh: add set -e") which failed to consider the case of an empty $IPC_REG or $IPC_MSG. Signed-off-by: Marc Herbert --- scripts/qemu-check.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-check.sh b/scripts/qemu-check.sh index 14e6730a1..57500490f 100755 --- a/scripts/qemu-check.sh +++ b/scripts/qemu-check.sh @@ -162,9 +162,12 @@ do SHM_IPC_REG_FILE=$(ls /dev/shm/ | grep -E $SHM_IPC_REG) # check if ready ipc header is in the ipc regs - IPC_REG=$(hexdump -C /dev/shm/"$SHM_IPC_REG_FILE" | grep "$READY_IPC") + IPC_REG=$(hexdump -C /dev/shm/"$SHM_IPC_REG_FILE" | + grep "$READY_IPC") || true + # check if ready ipc message is in the mbox - IPC_MSG=$(hexdump -C /dev/shm/$SHM_MBOX | grep -A 4 "$READY_MSG" | grep -A 4 "$OUTBOX_OFFSET") + IPC_MSG=$(hexdump -C /dev/shm/$SHM_MBOX | grep -A 4 "$READY_MSG" | + grep -A 4 "$OUTBOX_OFFSET") || true if [ "$IPC_REG" ]; then echo "ipc reg dump:"