From 756c729593dfd2ef68102a732596d083278a11fa Mon Sep 17 00:00:00 2001 From: vmallika Date: Mon, 13 Jul 2015 13:55:26 +0530 Subject: features/quota : Fix spurious failure This is a backport of http://review.gluster.org/#/c/11125/ Problem : Basically, in this test case a file is created which exceeds the quota limit. Once the limit is reached that file will be deleted. At the same moment we are testing inode-quota. It can so happen that before the marker updates the information related to deletion of file, a new file creation operation comes and sees that quota limit is still exceeded. Solution : Inducing a check to see if marker updation completed successfully. Updated all the test case which has the similar machanism and also moved the "usage" function to a common place "volume.rc" > Change-Id: I36ddbc5ebbf1b74c9d326a0d1d5f3b32f20a906a > BUG: 1229297 > Signed-off-by: Sachin Pandit > Signed-off-by: vmallika > Reviewed-on: http://review.gluster.org/11125 > Tested-by: NetBSD Build System > Tested-by: Gluster Build System > Reviewed-by: Krishnan Parthasarathi Change-Id: Iccc36de2b3a1e1a068d1a8d5e98d413c3afa1bc7 BUG: 1242329 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/11642 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi --- tests/bugs/disperse/bug-1227869.t | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/bugs/disperse') diff --git a/tests/bugs/disperse/bug-1227869.t b/tests/bugs/disperse/bug-1227869.t index 83dc7655592..00fad825fae 100644 --- a/tests/bugs/disperse/bug-1227869.t +++ b/tests/bugs/disperse/bug-1227869.t @@ -9,12 +9,6 @@ QDD=$(dirname $0)/quota # compile the test write program and run it build_tester $(dirname $0)/../../basic/quota.c -o $QDD -function usage() -{ - local QUOTA_PATH=$1; - $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $4}' -} - TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 disperse 3 $H0:$B0/${V0}{1..3} @@ -30,7 +24,7 @@ TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0 TEST $QDD $M0/file 256 40 -EXPECT "10.0MB" usage "/" +EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quotausage "/" EXPECT "0" echo $(df -k $M0 | grep -q '10240 '; echo $?) EXPECT "0" echo $(df -k $M0 | grep -q '92160 '; echo $?) -- cgit