]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
generic/081: hack around the lvm unmount race
authorChristoph Hellwig <hch@lst.de>
Mon, 9 Jan 2017 13:38:18 +0000 (14:38 +0100)
committerEryu Guan <eguan@redhat.com>
Sun, 15 Jan 2017 05:56:45 +0000 (13:56 +0800)
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 <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/081

index 11755d4d89ff61cbb4aa70278d7daf820afe34b1..426766d9bddb6982ab0d3d9c85f088f17695525b 100755 (executable)
@@ -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