From 88411fb6f97937c6cac573e2720ae30fafe96761 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Wed, 18 Feb 2015 12:27:47 +0100 Subject: [PATCH] test: Avoid a race in pvmove-restart.sh. --- test/shell/pvmove-restart.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/shell/pvmove-restart.sh b/test/shell/pvmove-restart.sh index 5e4fd8bb0..398095bdb 100644 --- a/test/shell/pvmove-restart.sh +++ b/test/shell/pvmove-restart.sh @@ -15,7 +15,9 @@ aux prepare_pvs 3 60 -vgcreate -s 128k $vg "$dev1" "$dev2" "$dev3" +vgcreate -s 128k $vg "$dev1" "$dev2" +pvcreate --metadatacopies 0 "$dev3" +vgextend $vg "$dev3" for mode in "--atomic" "" do @@ -32,7 +34,7 @@ aux delay_dev "$dev3" 0 100 pvmove -i0 -n $vg/$lv1 "$dev1" "$dev3" & PVMOVE=$! # Let's wait a bit till pvmove starts and kill it -sleep 1 +while not dmsetup status "$vg-pvmove0"; do sleep .1; done kill -9 $PVMOVE wait