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

Conversation

aiChaoSONG
Copy link

@aiChaoSONG aiChaoSONG commented Apr 26, 2020

Previouly, every call trace will fail the test
case, that's not correct. Only ALSA related
call trace should fail the test case.

This patch checks call trace message, and
only failed test case with ALSA related
call trace.

fix #184

Copy link
Contributor

@Bin-QA Bin-QA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost is good

tools/sof-kernel-log-check.sh Outdated Show resolved Hide resolved
tools/sof-kernel-log-check.sh Show resolved Hide resolved
Previouly, every call trace will fail the test
case, that's not correct. Only ALSA related
call trace should fail the test case.

This patch checks call trace message, and
only failed test case with ALSA related
call trace.

Signed-off-by: Amery Song <chao.song@intel.com>
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring the code style issues for now, this change ignores every single non-snd Call Trace in every test, correct? That's extremely dangerous. Issue #167 is about ignoring one specific trace in one specific test.

More generally speaking, could the majority of this script be replaced by something much shorter like this?

journalctl --dmesg -p 3 | grep -v -e '$ignore_issue_123" -e "$ignore_dma_trace"

@marc-hb marc-hb requested a review from lgirdwood April 27, 2020 01:16
@aiChaoSONG
Copy link
Author

aiChaoSONG commented Apr 27, 2020

@marc-hb Sorry for made a mistake. the issue should be #184 , not #167. #184 reported "a none SOF call trace caused one test case failed", but in fact that call trace is related to sound. As you said, ignore all call traces other than sound is dangerous. Let's close this for the issue is related to sound. I will try to use journalctl to refine error collection in another PR.

@aiChaoSONG aiChaoSONG closed this Apr 27, 2020
@aiChaoSONG aiChaoSONG deleted the snd_trace branch April 27, 2020 01:36
@aiChaoSONG
Copy link
Author

@Bin-QA I think Marc's suggestion is good, is there any possibility to use this: journalctl --dmesg -p 3 | grep -v -e '$ignore_issue_123" -e "$ignore_dma_trace"

@Bin-QA
Copy link
Contributor

Bin-QA commented Apr 27, 2020

how to clean buffer?
we force on current, like current case, current loop
so we need to clean the buffer
we not just force the kernel boot log

@aiChaoSONG it can use for upgrade: tools/sof-kernel-dump.sh
for the current kernel dump

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 27, 2020

test3_start=$(date +%s)
run_test3
test3_end=$(date +%s)
journalctl --boot --since=@"$test3_start" --until=@"$test3_end"

dmesg -c is more like a hack.

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 28, 2020

Longer example

test3_start=$(date +%s)
run_test3
test3_end=$(date +%s)
# Errors or worse
journalctl --boot --since=@"$test3_start" --until=@"$test3_end" -p 3
# Warnings only
journalctl --boot --since=@"$test3_start" --until=@"$test3_end" -p 4..4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]check-suspend-resume.sh test failed with non sof issue Call Trace in dmesg
3 participants