[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] LVM2/test/lib aux.sh test.sh



CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk sourceware org	2011-06-30 00:57:29

Modified files:
	test/lib       : aux.sh test.sh 

Log message:
	test attempt to remove stray loop devs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/test.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4

--- LVM2/test/lib/aux.sh	2011/06/29 18:18:18	1.19
+++ LVM2/test/lib/aux.sh	2011/06/30 00:57:29	1.20
@@ -90,7 +90,9 @@
 	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
 }
 
--- LVM2/test/lib/test.sh	2011/02/09 17:57:14	1.3
+++ LVM2/test/lib/test.sh	2011/06/30 00:57:29	1.4
@@ -19,11 +19,13 @@
 . 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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]