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

check dmesg overwrites itself with tests that reboot #3317

Closed
sbertramrh opened this issue Oct 24, 2024 · 0 comments · Fixed by #3393
Closed

check dmesg overwrites itself with tests that reboot #3317

sbertramrh opened this issue Oct 24, 2024 · 0 comments · Fixed by #3393
Assignees
Labels
area | check Test check implementation
Milestone

Comments

@sbertramrh
Copy link

tmt-reboots dmesg-after will run when the reboot is called. Not an issue in general but the problem occurs when the test completes or has multiple reboots, the name of the file used to save it is the same.
/var/tmp/tmt/run-022/kernel-automotive/plans/sst_kernel_ft/memory/plan/execute/data/guest/default-0/external_er/memory/config_memtest/config_memtest-1/checks/dmesg-after-test.txt
So it will be overwritten each time and only the very last one will remain. I think the same is happening with the dmesg-before-test.txt as well. Can we index this during a single test run so that we have the contents of all the captures?

Can we create the log file capture from dmesg with the epoch date appended in the name, so something like:
dmesg-after-test-$(date +%s).txt?
Or equivalent for python syntax.

@happz happz added the area | check Test check implementation label Oct 24, 2024
@happz happz self-assigned this Oct 24, 2024
@happz happz added this to the 1.39 milestone Oct 24, 2024
@martinhoyer martinhoyer modified the milestones: 1.39, 1.40 Nov 19, 2024
happz added a commit that referenced this issue 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:

```

[    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
...
...
...
```

Fixes #3317
happz added a commit that referenced this issue 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
[    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 pushed a commit that referenced this issue 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 closed this as completed in #3393 Dec 6, 2024
@psss psss closed this as completed in 436dcbc Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | check Test check implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants