-
Notifications
You must be signed in to change notification settings - Fork 564
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
[tests] Rework journal size calculation for tests #3962
base: main
Are you sure you want to change the base?
Conversation
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Starting this as a draft. This is a first attempt at solving the issue in 3853. I'm sure there are more elegant ways to do so, so please let me know your thoughts. |
I see just bad options here :) I dont want to undermine idea that I came up with. But I dont like running plain |
Yes, that's one possibility. We have a timeout as well so we can control the capture somehow.
We could modify the sizes on the actual command, so instead of: -o logs --journal-size=20 --log-size=10 We reduce these to half of less than that. Unless 20M and 10M are there because of a specific scenario. And a third option could be to generate at least 20M anyway, without checking the current size. We have already a disclaimer in the test:
So the expectation is set already. |
When you repeatedly run same test on your system, you get journal logs redundantly bloated. Each option has its gotcha :) Maybe a "compromise" in:
The 3times more than what we need should be sufficiently high (really?) to prevent the phenomena I discovered, while lowering the test's sizes and having a upper limit ("less than 30MB") limits the journal bloating..? |
I think this could work. I'll modify this PR and send it again |
In 3853 it was discovered that size calculations via get_usage() were not corresponding to the expected size, and the tests were failing sometimes. This commit tries to fix the problem by calling 'journalctl' directly and then calculating the size on the output. Related: sosreport#3853 Signed-off-by: Jose Castillo <[email protected]>
ce45fd5
to
556d845
Compare
In 3853 it was discovered that size calculations via get_usage() were not corresponding to the expected size, and the tests were failing sometimes.
This commit tries to fix the problem by calling
'journalctl' directly and then calculating the size on the output.
Related: #3853
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines