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

verify-kernel-boot-log.sh: fix missing boot logs on failure #1191

Merged
merged 1 commit into from
May 9, 2024

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented May 8, 2024

Provide a new, boot_logs.txt file no matter what happens. Note that file now includes user-space logs, not just kernel logs.

Also: fix bug where script times out and does not run when the SOF
firmware is not loaded: no need to define NO_POLL_FW_LOADING anymore.

The trick is to stop calling start_test(). verify-kernel-boot-log.sh is not an audio test!

Fixes sof-test issues #1036 and #1112, find more details there.

Provide a new, boot_logs.txt file no matter what happens. Note that file
now includes user-space logs, not just kernel logs.

Also: fix bug where script times out and does not run when the SOF
firmware is not loaded: no need to define NO_POLL_FW_LOADING anymore.

The trick is to stop calling `start_test()`. verify-kernel-boot-log.sh
is not an audio test!

Fixes sof-test issues thesofproject#1036 and thesofproject#1112, find more details there.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb marked this pull request as ready for review May 8, 2024 23:42
@marc-hb marc-hb requested a review from a team as a code owner May 8, 2024 23:42
@marc-hb
Copy link
Collaborator Author

marc-hb commented May 9, 2024

Wow, ALL hardware tests are 100% green!

The new boot_log.txt file is present in all of them.

{
local exit_code=$1

journalctl --boot > "$LOG_ROOT"/boot_log.txt
Copy link
Collaborator

@fredoh9 fredoh9 May 9, 2024

Choose a reason for hiding this comment

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

Normally I don't pay attention to user space log at boot. What can we expect more clues from user space log?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What can we expect more clues from user space log?

If you look at some examples, you'll see the added volume is low compared to SOF debug logs. One example on a fresh boot:

root@jf-lnlm-rvp-nocodec-3:~# journalctl -k | wc -l
1857
root@jf-lnlm-rvp-nocodec-3:~# journalctl -b | wc -l
2313

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A couple more after looking at diff -u <(journalctl -k) <(journalctl -b) | less

  • Network initialization
  • NTP init
  • sensors stuff (thermal)
  • other systemd logs

Copy link
Collaborator

@fredoh9 fredoh9 left a comment

Choose a reason for hiding this comment

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

Beauty of trap! Looks good.
Thanks a lot!

@fredoh9 fredoh9 requested a review from ssavati May 9, 2024 17:13
@marc-hb marc-hb merged commit c8565e8 into thesofproject:main May 9, 2024
7 checks passed
@marc-hb marc-hb deleted the fix-missing-boot-logs branch May 9, 2024 17:15
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