mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: handle empty table better
This commit is contained in:
parent
8b8b8ac1f8
commit
0b11b08b6e
@ -82,9 +82,11 @@ 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
|
||||||
d=$(dmsetup info -c -o name --noheadings --rows -S "suspended=Suspended||name=~${PREFIX}[^0-9]")
|
d=$(dmsetup info -c -o name --noheadings --rows -S "suspended=Suspended||name=~${PREFIX}[^0-9]")
|
||||||
test "$d" = "No devices found" || {
|
case "$d" in
|
||||||
die "DM table already has either suspended or $PREFIX prefixed devices: $d"
|
"No devices found") ;;
|
||||||
}
|
"") ;;
|
||||||
|
*) die "DM table already has either suspended or $PREFIX prefixed devices: $d" ;;
|
||||||
|
esac
|
||||||
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