mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: fail tests when machine have suspended devs
If the machine has suspended devices present in the DM table, it's better to fail the test.
This commit is contained in:
parent
627535f33e
commit
53da646495
@ -81,7 +81,10 @@ PREFIX="${COMMON_PREFIX}$$"
|
|||||||
|
|
||||||
# Check we are not conflickting with some exiting setup
|
# Check we are not conflickting with some exiting setup
|
||||||
if test -z "$SKIP_ROOT_DM_CHECK" ; then
|
if test -z "$SKIP_ROOT_DM_CHECK" ; then
|
||||||
dmsetup table | not grep "${PREFIX}[^0-9]" || die "DM table already has devices with prefix $PREFIX!"
|
d=$(dmsetup info -c -o name --noheadings --rows -S "suspended=Suspended||name=~${PREFIX}[^0-9]")
|
||||||
|
test "$d" = "No devices found" || {
|
||||||
|
die "DM table already has either suspended or $PREFIX prefixed devices: $d"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -n "$LVM_TEST_DIR" || LVM_TEST_DIR=${TMPDIR:-/tmp}
|
test -n "$LVM_TEST_DIR" || LVM_TEST_DIR=${TMPDIR:-/tmp}
|
||||||
|
Loading…
Reference in New Issue
Block a user