mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
tests: always zero disk header
It appear that older wipefs doesn't wipe partition table. So ensure there is no partition on LVM_TEST_BACKING_DEVICE.
This commit is contained in:
parent
1bb5b498f0
commit
3fbb7b6e35
@ -497,6 +497,8 @@ prepare_devs() {
|
|||||||
# non-ephemeral devices need to be cleared between tests
|
# non-ephemeral devices need to be cleared between tests
|
||||||
test -f LOOP || for d in ${DEVICES[@]}; do
|
test -f LOOP || for d in ${DEVICES[@]}; do
|
||||||
blkdiscard "$d" 2>/dev/null || true
|
blkdiscard "$d" 2>/dev/null || true
|
||||||
|
# ensure disk header is always zeroed
|
||||||
|
dd if=/dev/zero of="$d" bs=4096 count=1
|
||||||
wipefs -a "$d" 2>/dev/null || dd if=/dev/zero of="$d" bs=64K count=1
|
wipefs -a "$d" 2>/dev/null || dd if=/dev/zero of="$d" bs=64K count=1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user