]> sourceware.org Git - lvm2.git/commitdiff
tests: add wait on udev processing
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 15 May 2020 14:56:40 +0000 (16:56 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 20 May 2020 14:01:20 +0000 (16:01 +0200)
Trying to avoid collision with udev watch rule preventing to
succeed 'dmsetup remove' becuase it keeps device open.

test/shell/thin-foreign-repair.sh

index 147a9a073caef5f2cf895ca74e26d98fb58af077..8b4018e4e4872368540bcebf5d0e343b342e5e86 100644 (file)
@@ -56,7 +56,9 @@ dmsetup create "$THIN" --table "0 40960 thin $DM_DEV_DIR/mapper/$POOL 0"
 
 mkfs.ext4 "$DM_DEV_DIR/mapper/$THIN"
 
-dmsetup remove "$THIN"
+aux udev_wait
+
+dmsetup remove "$THIN" || { sleep .5 ; dmsetup remove "$THIN" }
 
 lvchange -an $vg/pool
 
This page took 0.041415 seconds and 5 git commands to generate.