Skip to content

Commit

Permalink
Fix mdadm --zero-superblock problem in cleanup
Browse files Browse the repository at this point in the history
Cleanup handled mounted partitions but not the whole device

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
  • Loading branch information
Deixx committed Oct 4, 2024
1 parent 188e42b commit c266207
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def base_prepare(item):
raid.array_devices)):
raid.umount_all_partitions()
raid.remove_partitions()
raid.unmount()
raid.stop()
for device in raid.array_devices:
Mdadm.zero_superblock(posixpath.join('/dev', device.get_device_id()))
Expand All @@ -279,9 +280,9 @@ def base_prepare(item):
)

disk.umount_all_partitions()
Mdadm.zero_superblock(posixpath.join('/dev', disk.get_device_id()))
TestRun.executor.run_expect_success("udevadm settle")
disk.remove_partitions()
disk.unmount()
Mdadm.zero_superblock(posixpath.join('/dev', disk.get_device_id()))
create_partition_table(disk, PartitionTable.gpt)

TestRun.usr.already_updated = True
Expand Down

0 comments on commit c266207

Please sign in to comment.