Skip to content

Commit 5ac9741

Browse files
committed
tests: adapt disk assessment check
fixes: cockpit-project#21728 Libblockdev changed how SmartFailing property is set. Now it is less strict with when disk a is considered as failing. storaged-project/libblockdev#1097
1 parent 146ef52 commit 5ac9741

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/verify/check-storage-smart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ class TestStorageSmart(storagelib.StorageSmartCase):
5353
b.wait_in_text(self.card_desc("Device health (SMART)", "Self-test status"), status)
5454
if bad_sectors is not None:
5555
b.wait_in_text(self.card_desc("Device health (SMART)", "Number of bad sectors"), bad_sectors)
56+
b.wait_visible(self.card_desc("Device health (SMART)", "Number of bad sectors") + " .pf-m-warning")
5657
if failing_attrs is not None:
5758
b.wait_in_text(self.card_desc("Device health (SMART)", "Attributes failing"), failing_attrs)
59+
b.wait_visible(self.card_desc("Device health (SMART)", "Attributes failing") + " .pf-m-warning")
5860

5961
m = self.machine
6062
b = self.browser
@@ -82,17 +84,18 @@ class TestStorageSmart(storagelib.StorageSmartCase):
8284
set_smart_dump("INTEL_SSDSA2MH080G1GC--045C8820", "/dev/sda")
8385
check_smart_info("Disk is OK", "2309 hours", "Interrupted")
8486

85-
# Aborted self test and has known bad sector
87+
# Aborted self test and has known bad sector (overall assessment is still OK)
8688
set_smart_dump("ST9160821AS--3.CLH", "/dev/sda")
87-
check_smart_info("Disk is failing", "556 hours", "Aborted", bad_sectors="1")
89+
check_smart_info("Disk is OK", "556 hours", "Aborted", bad_sectors="1")
8890

8991
# Multiple bad sectors
9092
set_smart_dump("Maxtor_96147H8--BAC51KJ0", "/dev/sda")
91-
check_smart_info("Disk is failing", "2016 hours", "Successful", bad_sectors="71")
93+
check_smart_info("Disk is OK", "2016 hours", "Successful", bad_sectors="71")
9294

9395
# Multiple bad sectors with failing attribute
9496
set_smart_dump("Maxtor_96147H8--BAC51KJ0--2", "/dev/sda")
9597
check_smart_info("Disk is failing", "2262 hours", "Successful", bad_sectors="71", failing_attrs="1")
98+
b.wait_visible(self.card_desc("Device health (SMART)", "Assessment") + " .pf-m-danger")
9699

97100
# Check that SMART card is not visible on DVD drive
98101
b.go("/storage")

0 commit comments

Comments
 (0)