Skip to content

Commit

Permalink
check-sof-logger: fail when there's only the header
Browse files Browse the repository at this point in the history
Found by chance while testing Zephyr.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed Mar 13, 2021
1 parent e525e4e commit 649d828
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test-case/check-sof-logger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,16 @@ fi
# '\.c\:[1-9]' to filter like '.c:6' this type keyword like:
# [3017136.770833] (11.302083) c0 SA src/lib/agent.c:65 ERROR validate(), ll drift detected, delta = 25549
fw_log_err=$(grep -i 'error' "$data_file" | grep -v '\.c\:[1-9]')
data_len=$(wc -l < "${data_file}")

# '[[:blank:]]TIMESTAMP.*CONTENT$' to filter the log header:
# TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
if [[ ! $(sed -n '/[[:blank:]]TIMESTAMP.*CONTENT$/p' "${data_file}") ]]; then
dloge "Log header not found in ${data_file}"
func_logger_exit 1
elif [[ "${data_len}" -lt 2 ]]; then
dloge "Nothing but the header in ${data_file}"
func_logger_exit 1
# we catch error from fw log
elif [[ $fw_log_err ]]; then
dloge "Error(s) found in firmware log ${data_file}"
Expand Down

0 comments on commit 649d828

Please sign in to comment.