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 <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
Pierre-Louis Bossart 2018-08-07 20:21:07 -05:00
parent ef307ba684
commit ea08faf5b0
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
MAXLOOPS=100 MAXLOOPS=100
COUNTER=0 COUNTER=0

View File

@ -9,10 +9,13 @@ unset FW_BOOT
unset ERROR unset ERROR
FW_BOOT=$(dmesg | grep sof-audio | grep "boot complete") FW_BOOT=$(dmesg | grep sof-audio | grep "boot complete")
ERROR=$(dmesg | grep sof-audio | grep -v "DSP trace buffer overflow" | grep "error") 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 then
echo "boot failed" dmesg > boot_fail.log
echo "boot failed, see boot_fail.log for details"
exit 1
else else
echo "boot success" echo "boot success"
fi fi