diff --git a/test/verify/check-storage-mdraid b/test/verify/check-storage-mdraid index a7c93d0bf73b..ca674127f18f 100755 --- a/test/verify/check-storage-mdraid +++ b/test/verify/check-storage-mdraid @@ -333,9 +333,6 @@ class TestStorageMdRaid(storagelib.StorageCase): m = self.machine b = self.browser - mdadm_version_str = m.execute("mdadm --version 2>&1").strip().split(" - ")[1] - mdadm_version = list(map(int, mdadm_version_str.lstrip("v").split("."))) - self.login_and_go("/storage") # Make three huge block devices, so that we can make an array @@ -361,17 +358,13 @@ class TestStorageMdRaid(storagelib.StorageCase): self.wait_states({dev1: "In sync", dev2: "In sync"}) - # With mdadm < 4.4, there should be a bitmap, and cockpit should not complain. - # (debian-testing has an intermediate version that needs special handling.) - - if mdadm_version < [4, 4] and m.image not in ["debian-testing"]: - self.assertIn("Consistency Policy : bitmap", m.execute("mdadm --misc -D /dev/md/md0")) + if "Consistency Policy : bitmap" in m.execute("mdadm --misc -D /dev/md/md0"): + # Earlier versions of mdadm automatically add a bitmap for + # large arrays. Check that Cockpit doesn't complain and + # then remove the bitmap to provoke the alert. b.wait_not_present('.pf-v5-c-alert:contains("This MDRAID device has no write-intent bitmap")') m.execute("mdadm --grow --bitmap=none /dev/md/md0; udevadm trigger /dev/md/md0") - # With mdadm >= 4.4, there should be no bitmap. Cockpit should - # complain and let us add it. - self.assertNotIn("bitmap", m.execute("mdadm --misc -D /dev/md/md0")) b.wait_visible('.pf-v5-c-alert:contains("This MDRAID device has no write-intent bitmap")') b.click('button:contains("Add a bitmap")')