Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Sep 8, 2020

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

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>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Sep 8, 2020

All the shellcheck warnings in https://travis-ci.org/github/thesofproject/sof-test/builds/725412899 were already there, this adds none.

@marc-hb marc-hb requested a review from xiulipan September 8, 2020 23:40
@marc-hb
Copy link
Collaborator Author

marc-hb commented Sep 9, 2020

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:
Initramfs unpacking failed: Decoding failed or EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro or both. Will investigate.

@xiulipan
Copy link
Contributor

xiulipan commented Sep 9, 2020

@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.

 Sep  8 23:32:35 sh-bdw-wsb-rt286-02 kernel: [    0.425729] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
Sep  8 23:32:35 sh-bdw-wsb-rt286-02 kernel: [    0.704764] Initramfs unpacking failed: Decoding failed
Sep  8 23:32:35 sh-bdw-wsb-rt286-02 kernel: [    3.368895] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro


begin_line=${1:-1}
last_line=${1:-0}
begin_line=$((last_line+1))
Copy link
Contributor

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"

@marc-hb
Copy link
Collaborator Author

marc-hb commented Oct 24, 2020

Will hopefully be made useless by #470. Holding my breath.

Now #509

@marc-hb
Copy link
Collaborator Author

marc-hb commented Dec 1, 2020

Made obsolete by #509

@marc-hb marc-hb closed this Dec 1, 2020
@marc-hb marc-hb deleted the off-last-line branch July 22, 2021 00:30
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.

2 participants