-
Notifications
You must be signed in to change notification settings - Fork 1.2k
tests: adapt disk assessment check #21739
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
Conversation
5ac9741 to
b2b4808
Compare
martinpitt
left a comment
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.
Thanks! But I'm afraid this needs to do a libblockdev or m.image or TEST_SCENARIO or whatever dynamic check -- with this it's now failing on f42 in the opposite way.
b2b4808 to
e939502
Compare
test/verify/check-storage-smart
Outdated
| # latest libblockdev builds from copr have different behavior when assessing disk as failed | ||
| is_nightly_scenario = "daily" in getenv("TEST_SCENARIO", "") |
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 is not a robust condition. The API change can land in Fedora or updates-testing any day, or in a distro other than Fedora 41. This needs to be a feature check or a version comparison.
test/verify/check-storage-smart
Outdated
| if is_nightly_scenario: | ||
| check_smart_info("Disk is OK", "556 hours", "Aborted", bad_sectors="1") |
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 suggest to factorize this, do the version check and set some overall_status = "..." string conditionally there, then use the string here and below.
fixes: cockpit-project#21728 Libblockdev changed how SmartFailing property is set. Now it is less strict with when a disk is considered as failing. storaged-project/libblockdev#1097
e939502 to
7863c2c
Compare
martinpitt
left a comment
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.
Thank you! How painful.. I would have liked the string factorization, but it's ok -- we'll see this again when we clean up the hack, and then we can do a simpler version check.
fixes: #21728
Libblockdev changed how SmartFailing property is set. Now it is less strict with when a disk is considered as failing.
storaged-project/libblockdev#1097