From: Christoph Hellwig Date: Mon, 9 Jan 2017 13:38:18 +0000 (+0100) Subject: generic/081: hack around the lvm unmount race X-Git-Tag: v2022.05.01~2239 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1abe96278d4a540acc9680fa37f8aaacbdd2bdec;p=users%2Fhch%2Fxfstests-dev.git generic/081: hack around the lvm unmount race This is butt ugly, but I see no better way than to wait a bit to work around the race between the weird umount in LVM, and the mount ismounted checks. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Eryu Guan --- diff --git a/tests/generic/081 b/tests/generic/081 index 11755d4d8..426766d9b 100755 --- a/tests/generic/081 +++ b/tests/generic/081 @@ -35,6 +35,8 @@ _cleanup() cd / rm -f $tmp.* # lvm may have umounted it on I/O error, but in case it does not + # wait a bit for lvm to settle, sigh.. + sleep 2 $UMOUNT_PROG $mnt >/dev/null 2>&1 $LVM_PROG vgremove -f $vgname >>$seqres.full 2>&1 $LVM_PROG pvremove -f $SCRATCH_DEV >>$seqres.full 2>&1