-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test: Update journal check in TestHistoryMetrics.testEvents to current systemd #20317
Conversation
8a2c9ac
to
ce39e07
Compare
This AppArmor failure was previously hidden by the naughty. |
test/verify/check-metrics
Outdated
|
||
if self.machine.image == "centos-8-stream" or self.machine.image.startswith("rhel-8-"): | ||
# Also, older systemds get a slightly wrong log window with --since/until | ||
if re.search(r"centos-[89]|rhel-[89]|debian-stable|ubuntu-2204|ubuntu-stable", self.machine.image): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I almost wonder why we don't do version detection of systemd?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two reasons from my POV: systemd has fractional versions and lots of distro patches, and I don't want to carry the old test variant around for a couple of years.
test/verify/check-metrics
Outdated
@@ -416,8 +416,8 @@ class TestHistoryMetrics(testlib.MachineCase): | |||
# Now add the journal | |||
# Journal was recorded on Fedora 33 and when trying to use it with older systemd it fails with: | |||
# `Journal file /var/log/journal/*/journal.journal uses an unsupported feature, ignoring file.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is still relevant but also not relevant anymore as we now skip for a different reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I updated the comment. While I was at it, I also dropped the RHEL 8 bits, as we don't test that any more.
…t systemd `journalctl` recently updated its precise behavior wrt. matching `--since` and `--until` against journal files, see [1]. This caused the displayed log window for the "load" spike event to shift from the earlier "Created slice cockpittest.slice" to the later "load-hog.service" region, so that the old expected strings don't match any more. Update the expected strings for load-hog.service -- this actually makes sense as this is the "load" spike event, so it feels like earlier systemd versions got this wrong. Skip the test on more old OSes. This will stop skipping this test as a naughty match for cockpit-project/bots#5106 -- this is established behaviour now. Fixes cockpit-project#20302 [1] systemd/systemd#28746
ce39e07
to
eb9e61d
Compare
journalctl
recently updated its precise behavior wrt. matching--since
and--until
against journal files, see [1]. This caused thedisplayed log window for the "load" spike event to shift from the
earlier "Created slice cockpittest.slice" to the later
"load-hog.service" region, so that the old expected strings don't match
any more.
Update the expected strings for load-hog.service -- this actually makes
sense as this is the "load" spike event, so it feels like earlier
systemd versions got this wrong. Skip the test on more old OSes.
This will stop skipping this test as a naughty match for
cockpit-project/bots#5106 -- this is
established behaviour now.
Fixes #20302
[1] systemd/systemd#28746
Note that the changed test invalidates the naughty pattern, so we can remove it afterwards. There's also a second place for this, I'll address that next.