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

Store multiple invocations of dmesg check for the same test in one file #3393

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

happz
Copy link
Collaborator

@happz happz commented Dec 3, 2024

This should prevent loosing dmesg reports in the case of tests that restart or reboot: all reports except the last one are lost.

The filename remains the same, but it's no longer overwritten. dmesg check invocations append to it, with proper headers:

## Acquired at 2024-12-03T13:12:23.536502+00:00

# stdout (812 lines)
[    0.000000] Linux version 6.11.4-301.fc41.x86_64 (mockbuild@9b6b61418589428cb880a7020233b56f) (gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3), GNU ld version 2.43.1-2.fc41) #1 SMP PREEMPT_DYNAMIC Sun Oct 20 15:02:33 UTC 2024
[    0.000000] Command line: BOOT_IMAGE=(hd0,gpt3)/vmlinuz-6.11.4-301.fc41.x86_64 no_timer_check console=tty1 console=ttyS0,115200n8 systemd.firstboot=off root=UUID=815e66c2-6a8a-4984-a890-1a3c710bf933 rootflags=subvol=root
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
...
## Acquired at 2024-12-03T13:12:23.596179+00:00
...
## Acquired at 2024-12-03T13:12:23.622283+00:00
...

Fixes #3317

Pull Request Checklist

  • implement the feature
  • extend the test coverage

@happz happz added the area | check Test check implementation label Dec 3, 2024
@happz happz added this to the 1.40 milestone Dec 3, 2024
@happz happz force-pushed the dmesg-multiple-reports-sharing-file branch from 3bda528 to 96a0bc2 Compare December 3, 2024 13:27
Copy link
Collaborator

@skycastlelily skycastlelily left a comment

Choose a reason for hiding this comment

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

LGTM^^

Copy link
Collaborator

@martinhoyer martinhoyer left a comment

Choose a reason for hiding this comment

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

Neat

@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Dec 5, 2024
@psss psss added the ci | full test Pull request is ready for the full test execution label Dec 6, 2024
This should prevent loosing dmesg reports in the case of tests that
restart or reboot: all reports except the last one are lost.

The filename remains the same, but it's no longer overwritten. `dmesg`
check invocations append to it, with proper headers:

```
\## Acquired at 2024-12-03T13:12:23.536502+00:00
[    0.000000] Linux version 6.11.4-301.fc41.x86_64 (mockbuild@9b6b61418589428cb880a7020233b56f) (gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3), GNU ld version 2.43.1-2.fc41) #1 SMP PREEMPT_DYNAMIC Sun Oct 20 15:02:33 UTC 2024
[    0.000000] Command line: BOOT_IMAGE=(hd0,gpt3)/vmlinuz-6.11.4-301.fc41.x86_64 no_timer_check console=tty1 console=ttyS0,115200n8 systemd.firstboot=off root=UUID=815e66c2-6a8a-4984-a890-1a3c710bf933 rootflags=subvol=root
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
...
\## Acquired at 2024-12-03T13:12:23.596179+00:00
...
\## Acquired at 2024-12-03T13:12:23.622283+00:00
...
```

Fixes #3317
@psss psss force-pushed the dmesg-multiple-reports-sharing-file branch from 96a0bc2 to 5835873 Compare December 6, 2024 10:46
@psss psss self-assigned this Dec 6, 2024
@psss psss merged commit 436dcbc into main Dec 6, 2024
19 of 20 checks passed
@psss psss deleted the dmesg-multiple-reports-sharing-file branch December 6, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | check Test check implementation ci | full test Pull request is ready for the full test execution status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check dmesg overwrites itself with tests that reboot
4 participants