diff options
author | Alasdair Kergon <agk@redhat.com> | 2011-06-30 00:57:29 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2011-06-30 00:57:29 +0000 |
commit | 1a3d96757ef3f4b0ee0728f46bfc76298206b8a9 (patch) | |
tree | c3b5cb32373d5fea82e82d6bdce9354f29bd03fb /test/lib | |
parent | 14e012871f5eefd005df97b3c899f59c4e9acd32 (diff) | |
download | lvm2-1a3d96757ef3f4b0ee0728f46bfc76298206b8a9.tar.gz lvm2-1a3d96757ef3f4b0ee0728f46bfc76298206b8a9.tar.xz lvm2-1a3d96757ef3f4b0ee0728f46bfc76298206b8a9.zip |
test attempt to remove stray loop devs
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/aux.sh | 4 | ||||
-rw-r--r-- | test/lib/test.sh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 6f671855..16a5d674 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -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 } diff --git a/test/lib/test.sh b/test/lib/test.sh index ba1391b7..b16c1d94 100644 --- a/test/lib/test.sh +++ b/test/lib/test.sh @@ -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 |