Skip to content

Commit a2bec2c

Browse files
committed
verify-sof-firmware-load: print wallclocks timestamps too
Both ktimes and wallclock timestamps are useful but using sometimes the former and other times the latter can make troubleshooting failures more difficult. In this case print both. It is especially useful here considering this test PASSes after unloading the driver. Also update the -help message that was out of date with recent changes and move logs after journalctl status in case of failure. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent b480f7b commit a2bec2c

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

test-case/verify-sof-firmware-load.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ set -e
55
##
66
## Case Name: verify-sof-firmware-load
77
## Description:
8-
## Check if the SOF fw loaded successfully in the kernel logs
8+
## Check if the SOF fw loaded successfully at least once in the whole
9+
## kernel logs. This test can PASS after unloading the drivers!
910
## Case step:
1011
## Check kernel logs to search fw load info
1112
## Expect result:
12-
## Get fw version info in dmesg
13-
## sof-audio-pci 0000:00:0e.0: Firmware info: version 1:1:0-e5fe2
14-
## sof-audio-pci 0000:00:0e.0: Firmware: ABI 3:11:0 Kernel ABI 3:11:0
13+
## 'sof boot complete' found at least once in the kernel logs
1514
##
1615

1716
# source from the relative path of current folder
@@ -27,13 +26,21 @@ cmd="journalctl_cmd"
2726
dlogi "Checking SOF Firmware load info in kernel log"
2827
if sof_firmware_boot_complete; then
2928

29+
# Show messages again but with wallclock timestamps
30+
# that can be matched with the ktimes just printed.
31+
sof_firmware_boot_complete --output=short
32+
33+
# On some systems 'firmware boot complete' can be printed again on
34+
# every resume from D3. These versions are printed only when the
35+
# kernel driver is loaded.
3036
grep_firmware_info_in_logs
3137
exit 0
3238

3339
else # failed, show some logs
3440

35-
journalctl_cmd --lines 50 || true
3641
printf ' ------\n Check journalctl status: \n ---- \n'
3742
systemctl --no-pager status systemd-journald* || true
43+
journalctl_cmd --lines 50 || true
44+
3845
die "Cannot find any 'sof boot complete' message in logs since boot time"
3946
fi

0 commit comments

Comments
 (0)