Skip to content

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

Merged
marc-hb merged 1 commit into
thesofproject:mainfrom
marc-hb:fix-missing-boot-logs
May 9, 2024
Merged

marc-hb merged 1 commit into
thesofproject:mainfrom
marc-hb:fix-missing-boot-logs

Conversation

@marc-hb

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

Copy link
Copy Markdown
Collaborator

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

marc-hb commented May 9, 2024

Copy link
Copy Markdown
Collaborator Author

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

@fredoh9 fredoh9 May 9, 2024 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

@fredoh9 fredoh9 left a comment

Copy link
Copy Markdown
Contributor

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