1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

tests: aux reject /dev as testing dir

If LVM_TEST_DIR would be set to /dev, reject such selection.
This commit is contained in:
Zdenek Kabelac 2021-03-19 10:39:00 +01:00
parent e27baa791f
commit d5b37f24f4

View File

@ -78,9 +78,11 @@ if test -z "$SKIP_ROOT_DM_CHECK" ; then
dmsetup table | not grep "${PREFIX}[^0-9]" || die "DM table already has devices with prefix $PREFIX!" dmsetup table | not grep "${PREFIX}[^0-9]" || die "DM table already has devices with prefix $PREFIX!"
fi fi
if test -z "$LVM_TEST_DIR"; then LVM_TEST_DIR=$TMPDIR; fi test -n "$LVM_TEST_DIR" || LVM_TEST_DIR=${TMPDIR:-/tmp}
TESTDIR=$(mkdtemp "${LVM_TEST_DIR:-/tmp}" "$PREFIX.XXXXXXXXXX") || \ test "$LVM_TEST_DIR" = "/dev" || die "Setting LVM_TEST_DIR=/dev is not supported"
die "failed to create temporary directory in ${LVM_TEST_DIR:-$TESTOLDPWD}"
TESTDIR=$(mkdtemp "$LVM_TEST_DIR" "$PREFIX.XXXXXXXXXX") || \
die "failed to create temporary directory in \"$LVM_TEST_DIR\""
RUNNING_DMEVENTD=$(pgrep dmeventd || true) RUNNING_DMEVENTD=$(pgrep dmeventd || true)
export TESTOLDPWD TESTDIR COMMON_PREFIX PREFIX RUNNING_DMEVENTD export TESTOLDPWD TESTDIR COMMON_PREFIX PREFIX RUNNING_DMEVENTD