1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: retry removal

After umout we may race with system udevd rule - so
just retry once again after 1s sleep - that should be
enough - otherwise we would need some loop here...
This commit is contained in:
Zdenek Kabelac 2023-10-04 17:46:23 +02:00
parent e72e130e9d
commit e3adccb528

View File

@ -22,7 +22,10 @@ MOUNT_DIR=mnt
cleanup_mounted_and_teardown()
{
umount "$MOUNT_DIR" || true
dmsetup remove $THIN
dmsetup remove $THIN || {
sleep 1 # retry once more after sleep (udev race)
dmsetup remove $THIN
}
vgremove -ff $vg
aux teardown
}