diff options
author | Petr Rockai <me@mornfall.net> | 2014-03-03 23:01:40 +0100 |
---|---|---|
committer | Petr Rockai <me@mornfall.net> | 2014-03-04 11:16:00 +0100 |
commit | cb77bdc253e695c7e98b0095cb49a6e4f262e384 (patch) | |
tree | 01fffbb52b6b09a8c27f96b03831619af7bb87fa | |
parent | d739e16d85d95611a9f6edbde316c6627307d2ce (diff) | |
download | lvm2-cb77bdc253e695c7e98b0095cb49a6e4f262e384.tar.gz |
test: Make teardown (more) resistant to funny DM device names.
-rw-r--r-- | test/lib/aux.sh | 4 | ||||
-rw-r--r-- | test/lib/utils.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 2d0f80554..c178ab5f4 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -141,7 +141,7 @@ teardown_devs_prefixed() { local need_udev_wait=0 init_udev_transaction for dm in $(dm_info name --sort open | grep "$prefix"); do - dmsetup remove "$dm" &>/dev/null || remfail=yes + dmsetup remove --mangle none "$dm" &>/dev/null || remfail=yes need_udev_wait=1 done finish_udev_transaction @@ -154,7 +154,7 @@ teardown_devs_prefixed() { test $num_devs -lt $num_remaining_devs -a $num_devs -ne 0; do test "$stray" -eq 0 || echo "Removing $num_devs stray mapped devices with names beginning with $prefix: " for dm in $(dm_info name --sort open | grep "$prefix") ; do - dmsetup remove -f "$dm" || true + dmsetup remove --mangle none -f "$dm" || true done num_remaining_devs=$num_devs done diff --git a/test/lib/utils.sh b/test/lib/utils.sh index 0f58b25ae..819a0eb13 100644 --- a/test/lib/utils.sh +++ b/test/lib/utils.sh @@ -159,7 +159,7 @@ teardown_udev_cookies() { } dm_info() { - should dmsetup info --noheadings -c -o "$@" + should dmsetup info --mangle none --noheadings -c -o "$@" } dm_table() { |