1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

test attempt to remove stray loop devs

This commit is contained in:
Alasdair Kergon 2011-06-30 00:57:29 +00:00
parent 14e012871f
commit 1a3d96757e
2 changed files with 6 additions and 2 deletions

View File

@ -90,7 +90,9 @@ teardown_devs() {
rm -f DEVICES # devs is set in prepare_devs()
rm -f LOOP
# Display any loop devices that failed to get torn down
# Remove any loop devices that failed to get torn down
losetup -a
echo losetup -d `losetup -a | grep $COMMON_PREFIX | cut -d: -f1` 2>/dev/null || true
losetup -a
}

View File

@ -19,11 +19,13 @@ unset CDPATH
. lib/utils
OLDPWD="`pwd`"
PREFIX="LVMTEST$$"
COMMON_PREFIX="LVMTEST"
PREFIX="${COMMON_PREFIX}$$"
TESTDIR=$(mkdtemp ${LVM_TEST_DIR-$(pwd)} $PREFIX.XXXXXXXXXX) \
|| { echo "failed to create temporary directory in ${LVM_TEST_DIR-$(pwd)}"; exit 1; }
export COMMON_PREFIX
export PREFIX
export TESTDIR