summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2020-05-15 16:56:40 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2020-05-20 16:01:20 +0200
commitd3b515cea54bae28c438eeef77cd3625d9b2a00c (patch)
treee6cfbce47244782be09eef8fd8405d213a7c891c
parentdeb51601818ec9d2f9a29205896125c82cf6ce00 (diff)
downloadlvm2-d3b515cea54bae28c438eeef77cd3625d9b2a00c.tar.gz
tests: add wait on udev processing
Trying to avoid collision with udev watch rule preventing to succeed 'dmsetup remove' becuase it keeps device open.
-rw-r--r--test/shell/thin-foreign-repair.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/shell/thin-foreign-repair.sh b/test/shell/thin-foreign-repair.sh
index 147a9a073..8b4018e4e 100644
--- a/test/shell/thin-foreign-repair.sh
+++ b/test/shell/thin-foreign-repair.sh
@@ -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