-
Notifications
You must be signed in to change notification settings - Fork 59
sof-kernel-log-check: fix last_line / begin_line off-by-one error #366
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
Conversation
If the last line of kern.log was an error then the _next_ test was failing. Found thanks to the new fake_kern_error() function submitted separately. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
All the shellcheck warnings in https://travis-ci.org/github/thesofproject/sof-test/builds/725412899 were already there, this adds none. |
|
Interestingly, this makes a lot of tests fail in https://sof-ci.01.org/softestpr/PR366/build161/devicetest/. All of them seem to be because of: |
|
@marc-hb I check the CI result. The logs are from very beginning this boot. It should be filter out by our last_line cmd. I think your PR here may have something wrong. |
|
|
||
| begin_line=${1:-1} | ||
| last_line=${1:-0} | ||
| begin_line=$((last_line+1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be aware the if input is 0, we will have fallback.
# confirm begin_line is number, if it is not the number, direct using dmesg
[[ "${begin_line//[0-9]/}" ]] && begin_line=0
[[ "$begin_line" -eq 0 ]] && cmd="dmesg" || cmd="sed -n '$begin_line,\$p' /var/log/kern.log"
|
Made obsolete by #509 |
If the last line of kern.log was an error then the next test was failing.
Found thanks to the new fake_kern_error() function submitted separately.
Signed-off-by: Marc Herbert marc.herbert@intel.com