From 2ff76fa45c53b8e291cf70c98b28800f3ed5f6fc Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 14 May 2019 10:56:15 -0400 Subject: uss: Ensure that snapshot is deleted before creating a new snapshot * Also some logging enhancements in snapview-server Change-Id: I6a7646771cedf4bd1c62806eea69d720bbaf0c83 fixes: bz#1715921 Signed-off-by: Raghavendra Bhat --- tests/basic/uss.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/basic') diff --git a/tests/basic/uss.t b/tests/basic/uss.t index c8558050e36..09dd00ef995 100644 --- a/tests/basic/uss.t +++ b/tests/basic/uss.t @@ -36,6 +36,7 @@ TEST glusterd; TEST pidof glusterd; TEST $CLI volume create $V0 $H0:$L1 $H0:$L2 $H0:$L3; + TEST $CLI volume set $V0 nfs.disable false @@ -374,6 +375,15 @@ TEST rm -f $M0/aaa; TEST $CLI snapshot delete snap6; +# drop the caches so that, the dentry for "snap6" is +# is forgotten from the client cache. +drop_cache $M0 + +EXPECT_WITHIN 30 "5" count_snaps $M0; + +# This should fail, as snap6 just got deleted. +TEST ! stat $M0/.history/snap6 + TEST $CLI snapshot create snap6 $V0 no-timestamp TEST ls $M0/.history; @@ -384,6 +394,8 @@ TEST ls $M0/.history/snap6/; TEST ! stat $M0/.history/snap6/aaa; +TEST stat $M0 + # done with the tests start cleaning up of things TEST $CLI volume set $V0 features.uss disable -- cgit