From c50aa14008f9612d273acb81470f544cad6cff1a Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 12 Jul 2013 15:00:07 +0200 Subject: tests: call 'cleanup' at the end of each test Some tests do not cleanup after themselves. That is bad behaviour and makes it difficult to run single tests and verify the state of the system afterwards. Change-Id: I4ac5401d790d6bc81e6975fd1384874b21d6cf8a BUG: 983975 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/5328 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Anand Avati --- tests/basic/nufa.t | 2 ++ tests/bugs/bug-856455.t | 2 ++ tests/bugs/bug-860663.t | 2 ++ tests/bugs/bug-862967.t | 2 ++ tests/bugs/bug-878004.t | 1 + tests/bugs/bug-884455.t | 2 ++ tests/bugs/bug-893378.t | 2 ++ tests/bugs/bug-902610.t | 1 + 8 files changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/basic/nufa.t b/tests/basic/nufa.t index 05aaceec6..0d4c229a0 100644 --- a/tests/basic/nufa.t +++ b/tests/basic/nufa.t @@ -28,3 +28,5 @@ sleep 5; ## Mount NFS TEST mount -t nfs -o nolock,soft,intr $H0:/$V0 $N0; + +cleanup; diff --git a/tests/bugs/bug-856455.t b/tests/bugs/bug-856455.t index 1b2438b04..becb20222 100644 --- a/tests/bugs/bug-856455.t +++ b/tests/bugs/bug-856455.t @@ -38,3 +38,5 @@ EXPECT $BRICK_COUNT query_pathinfo $M0/f00d; kill -9 `cat /var/lib/glusterd/vols/$V0/run/$H0-d-backends-${V0}1.pid`; EXPECT `expr $BRICK_COUNT - 1` query_pathinfo $M0/f00d; + +cleanup; diff --git a/tests/bugs/bug-860663.t b/tests/bugs/bug-860663.t index 28d1f8fcd..05dea5fbc 100644 --- a/tests/bugs/bug-860663.t +++ b/tests/bugs/bug-860663.t @@ -47,3 +47,5 @@ sleep 5; NEW_FILE_COUNT=`ls -l $M0 | wc -l`; EXPECT "0" file_count $ORIG_FILE_COUNT $NEW_FILE_COUNT + +cleanup; diff --git a/tests/bugs/bug-862967.t b/tests/bugs/bug-862967.t index 73f5826fa..00fa88440 100644 --- a/tests/bugs/bug-862967.t +++ b/tests/bugs/bug-862967.t @@ -55,3 +55,5 @@ BACKEND_GID=`stat --printf=%g $B0/${V0}1/dir`; EXPECT "0" uid_gid_compare $NEW_UID $NEW_GID $BACKEND_UID $BACKEND_GID + +cleanup; diff --git a/tests/bugs/bug-878004.t b/tests/bugs/bug-878004.t index 5397be2a6..5bee4c62f 100644 --- a/tests/bugs/bug-878004.t +++ b/tests/bugs/bug-878004.t @@ -25,4 +25,5 @@ EXPECT '2' brick_count $V0 TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}3; EXPECT '1' brick_count $V0 +cleanup; diff --git a/tests/bugs/bug-884455.t b/tests/bugs/bug-884455.t index 46e55dad6..3b3a2241e 100755 --- a/tests/bugs/bug-884455.t +++ b/tests/bugs/bug-884455.t @@ -80,3 +80,5 @@ EXPECT "0" get_layout $B0/${V0}0/dir7 $B0/${V0}1/dir7 $B0/${V0}2/dir7 EXPECT "0" get_layout $B0/${V0}0/dir8 $B0/${V0}1/dir8 $B0/${V0}2/dir8 EXPECT "0" get_layout $B0/${V0}0/dir9 $B0/${V0}1/dir9 $B0/${V0}2/dir9 EXPECT "0" get_layout $B0/${V0}0/dir10 $B0/${V0}1/dir10 $B0/${V0}2/dir10 + +cleanup; diff --git a/tests/bugs/bug-893378.t b/tests/bugs/bug-893378.t index 470589f53..fd8b9a7ce 100755 --- a/tests/bugs/bug-893378.t +++ b/tests/bugs/bug-893378.t @@ -69,3 +69,5 @@ ls -l $M0/2 2>/dev/null dd if=/dev/zero of=$M0/2 bs=1 count=1 conv=excl 2>/dev/null EXPECT "1" echo $? + +cleanup; diff --git a/tests/bugs/bug-902610.t b/tests/bugs/bug-902610.t index f5eb6be02..00ba03adf 100755 --- a/tests/bugs/bug-902610.t +++ b/tests/bugs/bug-902610.t @@ -56,3 +56,4 @@ mkdir $M0/dir1 2>/dev/null get_layout $B0/${V0}0/dir1 $B0/${V0}1/dir1 EXPECT "0" echo $? +cleanup; -- cgit