Merge pull request #535 from Ostrokrzew/by-id
Disallow to use other than by-id path to core or cache device
This commit is contained in:
@@ -188,18 +188,18 @@ def base_prepare(item):
|
||||
# stop only those RAIDs, which are comprised of test disks
|
||||
if all(map(lambda device:
|
||||
any(map(lambda disk_path:
|
||||
disk_path in device.system_path,
|
||||
[bd.system_path for bd in TestRun.dut.disks])),
|
||||
disk_path in device.path,
|
||||
[bd.path for bd in TestRun.dut.disks])),
|
||||
raid.array_devices)):
|
||||
raid.umount_all_partitions()
|
||||
raid.remove_partitions()
|
||||
raid.stop()
|
||||
for device in raid.array_devices:
|
||||
Mdadm.zero_superblock(device.system_path)
|
||||
Mdadm.zero_superblock(device.path)
|
||||
|
||||
for disk in TestRun.dut.disks:
|
||||
disk.umount_all_partitions()
|
||||
Mdadm.zero_superblock(disk.system_path)
|
||||
Mdadm.zero_superblock(disk.path)
|
||||
TestRun.executor.run_expect_success("udevadm settle")
|
||||
disk.remove_partitions()
|
||||
create_partition_table(disk, PartitionTable.gpt)
|
||||
|
Reference in New Issue
Block a user