Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: exit successfully if call trace is not from alsa #208

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tools/sof-kernel-log-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ project_key="sof-audio"
#echo "run $0 with parameter '$*' for check kernel message error"

if [ "$ignore_str" ]; then
err=$(eval $cmd|grep 'Call Trace' -A5 -B3)$(eval $cmd | grep $project_key | grep -E "$err_str"|grep -vE "$ignore_str")
err=$(eval "$cmd"|grep 'Call Trace' -A5 -B3)$(eval "$cmd" | grep "$project_key" | grep -E "$err_str"|grep -vE "$ignore_str")
else
err=$(eval $cmd|grep 'Call Trace' -A5 -B3)$(eval $cmd | grep $project_key | grep -E "$err_str")
err=$(eval "$cmd"|grep 'Call Trace' -A5 -B3)$(eval "$cmd" | grep "$project_key" | grep -E "$err_str")
fi

if [ "$err" ]; then
echo `date -u '+%Y-%m-%d %T %Z'` "[ERROR]" "Caught dmesg error"
echo "$(date -u '+%Y-%m-%d %T %Z') [ERROR] Caught dmesg error"
echo "===========================>>"
echo "$err"
echo "<<==========================="
# exclude none alsa trace, but still print trace message
snd_trace=$(echo "$err" | grep "snd")
aiChaoSONG marked this conversation as resolved.
Show resolved Hide resolved
[ -z "$snd_trace" ] && builtin exit 0
builtin exit 1
fi

Expand Down