test: clear out old metadata from loop devices.

Old metadata can tempt udev to assemble things, which
just gets in the way.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2015-07-16 07:49:14 +10:00
parent 108bd87457
commit 21a1287ac9
1 changed files with 2 additions and 0 deletions

2
test
View File

@ -111,6 +111,8 @@ do_setup() {
case $DEVTYPE in
loop)
[ -f $targetdir/mdtest$d ] || dd if=/dev/zero of=$targetdir/mdtest$d count=$sz bs=1K > /dev/null 2>&1
# make sure udev doesn't touch
mdadm --zero $targetdir/mdtest$d 2> /dev/null
[ -b /dev/loop$d ] || mknod /dev/loop$d b 7 $d
if [ $d -eq 7 ]
then