Skip to content

hijack.sh: exit_handler: collect dmesg throughout the whole test#1348

Open
ekurdybx wants to merge 1 commit intothesofproject:mainfrom
ekurdybx:exit-handler-on-sigterm
Open

hijack.sh: exit_handler: collect dmesg throughout the whole test#1348
ekurdybx wants to merge 1 commit intothesofproject:mainfrom
ekurdybx:exit-handler-on-sigterm

Conversation

@ekurdybx
Copy link
Contributor

@ekurdybx ekurdybx commented Mar 2, 2026

Start collecting dmesg in the beggining of the test and run collection in the background. This will ensure having dmesg logs saved in case of github exiting the test with sigkill.

@ekurdybx ekurdybx force-pushed the exit-handler-on-sigterm branch 3 times, most recently from 5704306 to 2339704 Compare March 3, 2026 13:24
@ekurdybx ekurdybx changed the title lib.sh: run func_exit_handler on sigterm hijack.sh: exit_handler: collect dmesg throughout the whole test Mar 3, 2026
Start collecting dmesg logs in the beggining of the test and run
collection in the background.

Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
@ekurdybx ekurdybx force-pushed the exit-handler-on-sigterm branch from 2339704 to b7d2f35 Compare March 3, 2026 13:38
@ekurdybx ekurdybx marked this pull request as ready for review March 3, 2026 14:04
@ekurdybx ekurdybx requested review from a team, golowanow, lgirdwood and marc-hb as code owners March 3, 2026 14:04
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.

Nice idea! I remember running journalctl -b -1 many times after a crash and reboot. Not always possible when it's a CI system that not everyone has access to.

However this is currently dropping the "empty logs" safety check and the sync. I think these can just stay more or less "as is" in the same place; why remove them?

We had many "green failures" situations in the past and one of the most infamous sof-test bugs caused logs to be entirely missing (#297). Then, sof-test was proudly claiming zero error found! Best way to make all the tests pass: kill the messenger :-)

sudo bash -c "${mtraceCmd[*]} &" >& "$clogfile"
}

func_dmesg_collect() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
func_dmesg_collect() {
func_kmsg_collect() {

The dmesg command has a number of issues compared to journalctl and I think (and hope) hasn't been used for a long time.

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.

4 participants