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

Feature: dmesg-like test check plugin using the journal #3267

Open
dennisbrendel opened this issue Oct 8, 2024 · 1 comment
Open

Feature: dmesg-like test check plugin using the journal #3267

dennisbrendel opened this issue Oct 8, 2024 · 1 comment
Labels
area | check Test check implementation

Comments

@dennisbrendel
Copy link

There are tests out there that as part of their logic clear the kernel message ring buffer. This could render the dmesg check plugin useless, because it only checks the delta between test start and test end. In addition it's not always desired that the ring buffer is cleared when using the dmesg check plugin.

A good way to not be intrusive and get everything that was logged during test execution is getting the information from the journal, if the system has journald running.

An alternative to that is to watch and parse /dev/kmsg, but that means re-implementing partially what dmesg or journald do, so I think it's not the desired way.

@happz happz added the area | check Test check implementation label Oct 8, 2024
@happz
Copy link
Collaborator

happz commented Oct 8, 2024

There are tests out there that as part of their logic clear the kernel message ring buffer. This could render the dmesg check plugin useless, because it only checks the delta between test start and test end.

I'm afraid cases like this will be hard to amend in general, as long as a test messes with what a check observes, there will always be space for misunderstanding and unexpected outcomes. Reading your comments below, there seems to be a way how to avoid such a problem in this case, but "you're on your own" might be valid answer.

In addition it's not always desired that the ring buffer is cleared when using the dmesg check plugin.

We can add a key to control this behavior. It is there to limit the scope of saved data to the duration of a single test.

A good way to not be intrusive and get everything that was logged during test execution is getting the information from the journal, if the system has journald running.

It could be the first option, but without (running) journald, dmesg check may very well fall back to the current implementation.

An alternative to that is to watch and parse /dev/kmsg, but that means re-implementing partially what dmesg or journald do, so I think it's not the desired way.

+1, definitely not what I would like to work on.

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

No branches or pull requests

2 participants