From ef307ba6844d81928d5d3918dc2f3f416cc1bbbf Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Tue, 7 Aug 2018 20:02:46 -0500 Subject: [PATCH 1/2] kmod_scripts: filter out DMA trace overflow The occurrence of DMA trace overflows has become so bad I need to filter out these error messages to test module load/unload. Sad but what can I say. Signed-off-by: Pierre-Louis Bossart --- kmod_scripts/sof_bootone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod_scripts/sof_bootone.sh b/kmod_scripts/sof_bootone.sh index 6bc5f27..0b533a6 100755 --- a/kmod_scripts/sof_bootone.sh +++ b/kmod_scripts/sof_bootone.sh @@ -8,7 +8,7 @@ sleep 1 unset FW_BOOT unset ERROR FW_BOOT=$(dmesg | grep sof-audio | grep "boot complete") -ERROR=$(dmesg | grep sof-audio | grep "error") +ERROR=$(dmesg | grep sof-audio | grep -v "DSP trace buffer overflow" | grep "error") if [ ! -z "$ERROR" ] || [ -z "$FW_BOOT" ] then From ea08faf5b0f3173a413206b9f9a9b8c6c28739b5 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Tue, 7 Aug 2018 20:21:07 -0500 Subject: [PATCH 2/2] kmod_scripts: look for timeout errors and stop loops Timeout errors happen randomly but need to be checked. This helps check issues reported at https://github.com/thesofproject/sof/issues/209 Signed-off-by: Pierre-Louis Bossart --- kmod_scripts/sof_bootloop.sh | 2 ++ kmod_scripts/sof_bootone.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kmod_scripts/sof_bootloop.sh b/kmod_scripts/sof_bootloop.sh index f1bc99b..da9296d 100755 --- a/kmod_scripts/sof_bootloop.sh +++ b/kmod_scripts/sof_bootloop.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + MAXLOOPS=100 COUNTER=0 diff --git a/kmod_scripts/sof_bootone.sh b/kmod_scripts/sof_bootone.sh index 0b533a6..92071fa 100755 --- a/kmod_scripts/sof_bootone.sh +++ b/kmod_scripts/sof_bootone.sh @@ -9,10 +9,13 @@ unset FW_BOOT unset ERROR FW_BOOT=$(dmesg | grep sof-audio | grep "boot complete") ERROR=$(dmesg | grep sof-audio | grep -v "DSP trace buffer overflow" | grep "error") +TIMEOUT=$(dmesg | grep sof-audio | grep "ipc timed out") -if [ ! -z "$ERROR" ] || [ -z "$FW_BOOT" ] +if [ ! -z "$ERROR" ] || [ -z "$FW_BOOT" ] || [ ! -z "$TIMEOUT" ] then - echo "boot failed" + dmesg > boot_fail.log + echo "boot failed, see boot_fail.log for details" + exit 1 else echo "boot success" fi