Skip to content

Commit aba224f

Browse files
committed
test: Use loop devices in TestStorageMdRaid on C9S
Mixing scsi_debug and loop does strange things on CentOS 9 Testing Farm instances, and the SCSI disk doesn't get detected properly as part of the array. This papers over a bug, but we are testing the Cockpit logic here, not weird low-level kernel bugs. See #22143 for debug information. Cherry-picked from main commit cdf678a
1 parent 8aceffa commit aba224f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/verify/check-storage-mdraid

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ class TestStorageMdRaid(storagelib.StorageCase):
8080
self.login_and_go("/storage")
8181

8282
# Add four disks and make a RAID out of three of them
83-
disk1 = self.add_ram_disk()
83+
# HACK: on CentOS 9 (only!), scsi_debug doesn't like being part of a RAID
84+
# see https://github.com/cockpit-project/cockpit/pull/22143
85+
if m.image.startswith('centos-9'):
86+
disk1 = self.add_loopback_disk(name="loop4")
87+
else:
88+
disk1 = self.add_ram_disk()
8489
b.wait_visible(self.card_row("Storage", name=disk1))
8590
disk2 = self.add_loopback_disk(name="loop5")
8691
b.wait_visible(self.card_row("Storage", name=disk2))
@@ -272,7 +277,12 @@ class TestStorageMdRaid(storagelib.StorageCase):
272277

273278
self.login_and_go("/storage")
274279

275-
disk1 = self.add_ram_disk()
280+
# HACK: on CentOS 9 (only!), scsi_debug doesn't like being part of a RAID
281+
# see https://github.com/cockpit-project/cockpit/pull/22143
282+
if m.image.startswith('centos-9'):
283+
disk1 = self.add_loopback_disk()
284+
else:
285+
disk1 = self.add_ram_disk()
276286
b.wait_visible(self.card_row("Storage", name=disk1))
277287
disk2 = self.add_loopback_disk()
278288
b.wait_visible(self.card_row("Storage", name=disk2))

0 commit comments

Comments
 (0)