Skip to content

Commit 83f5e41

Browse files
committed
sof-kernel-log-check.sh: add new "${sof_local_extra_kernel_ignores[@]}"
Leverage the new local_config.bash files to implement device-specific excludes. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent f94cdc7 commit 83f5e41

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

tools/sof-kernel-log-check.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,18 @@ ignore_str="$ignore_str"'|nvme0: Admin Cmd\(0x[[:digit:]]+\), I/O Error \(sct 0x
419419
# SDW related logs
420420
#
421421

422+
# This expects an array like for instance:
423+
# sof_local_extra_kernel_ignores=(-e 'error 1' -e err2)
424+
# Arrays
425+
# - provide whitespace/quoting safety
426+
# - can be empty/optional
427+
# - can be arbitrarily complex. Best avoided but only on specific systems anyway.
428+
# shellcheck disable=SC2154
429+
if &>/dev/null declare -p sof_local_extra_kernel_ignores; then
430+
dlogw "Ignoring extra errors on this particular system:"
431+
declare -p sof_local_extra_kernel_ignores
432+
fi
433+
422434
# confirm begin_timestamp is in UNIX timestamp format, otherwise search full log
423435
if [[ $begin_timestamp =~ ^[0-9]{10} ]]; then
424436
cmd="journalctl_cmd --since=@$begin_timestamp"
@@ -429,7 +441,7 @@ fi
429441
declare -p cmd
430442

431443
if err=$($cmd --priority=err |
432-
grep -v -E -e "$ignore_str"); then
444+
grep -v -E -e "$ignore_str" "${sof_local_extra_kernel_ignores[@]}"); then
433445

434446
type journalctl_cmd
435447
echo "$(date -u '+%Y-%m-%d %T %Z')" "[ERROR]" "Caught kernel log error"

0 commit comments

Comments
 (0)