-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathverify-sof-firmware-load.sh
More file actions
executable file
·49 lines (36 loc) · 1.32 KB
/
verify-sof-firmware-load.sh
File metadata and controls
executable file
·49 lines (36 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
##
## Case Name: verify-sof-firmware-load
## Description:
## Check if the SOF fw loaded successfully at least once in the whole
## kernel logs. This test can PASS after unloading the drivers!
## Case step:
## Check kernel logs to search fw load info
## Expect result:
## 'sof boot complete' found at least once in the kernel logs
##
# source from the relative path of current folder
# shellcheck source=case-lib/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")"/../case-lib/lib.sh
func_opt_parse_option "$@"
disable_kernel_check_point
start_test
save_alsa_state
cmd="journalctl_cmd"
dlogi "Checking SOF Firmware load info in kernel log"
if sof_firmware_boot_complete; then
# Show messages again but with wallclock timestamps
# that can be matched with the ktimes just printed.
sof_firmware_boot_complete --output=short
# On some systems 'firmware boot complete' can be printed again on
# every resume from D3. These versions are printed only when the
# kernel driver is loaded.
grep_firmware_info_in_logs
exit 0
else # failed, show some logs
printf ' ------\n Check journalctl status: \n ---- \n'
systemctl --no-pager status systemd-journald* || true
journalctl_cmd --lines 50 || true
die "Cannot find any 'sof boot complete' message in logs since boot time"
fi