diff options
23 files changed, 74 insertions, 342 deletions
diff --git a/tests/bugs/quota/inode-quota.t b/tests/basic/inode-quota-enforcing.t index edc2c1de512..44b6c52a1ed 100644 --- a/tests/bugs/quota/inode-quota.t +++ b/tests/basic/inode-quota-enforcing.t @@ -1,30 +1,22 @@ #!/bin/bash -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc -. $(dirname $0)/../../nfs.rc +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc +. $(dirname $0)/../nfs.rc cleanup; -QDD=$(dirname $0)/quota -# compile the test write program and run it -build_tester $(dirname $0)/../../basic/quota.c -o $QDD - TESTS_EXPECTED_IN_LOOP=9 TEST glusterd -TEST pidof glusterd # -------------------------------------------------- # Create, start and mount a volume with single brick # -------------------------------------------------- TEST $CLI volume create $V0 $H0:$B0/{V0} -EXPECT "$V0" volinfo_field $V0 'Volume Name' -EXPECT 'Created' volinfo_field $V0 'Status' TEST $CLI volume start $V0 -EXPECT 'Started' volinfo_field $V0 'Status' TEST $GFS -s $H0 --volfile-id $V0 $M0 TEST mkdir -p $M0/test_dir @@ -46,43 +38,18 @@ EXPECT '0' volinfo_field $V0 'features.hard-timeout' # verify if the limits are being reflected properly #------------------------------------------------------ -TEST $CLI volume quota $V0 limit-usage /test_dir 100MB -EXPECT "100.0MB" quota_list_field "/test_dir" 2 - TEST $CLI volume quota $V0 limit-objects /test_dir 100 EXPECT "100" quota_object_list_field "/test_dir" 2 -TEST $CLI volume quota $V0 remove /test_dir -EXPECT "" quota_list_field "/test_dir" 2 - # Need to verify this once -#TEST $CLI volume quota $V0 remove-objects /test_dir -#EXPECT "" quota_object_list_field "/test_dir" 2 +TEST $CLI volume quota $V0 remove-objects /test_dir +EXPECT "" quota_object_list_field "/test_dir" 2 # Set back the limits -TEST $CLI volume quota $V0 limit-usage /test_dir 10MB -EXPECT "10.0MB" quota_list_field "/test_dir" 2 - TEST $CLI volume quota $V0 limit-objects /test_dir 10 EXPECT "10" quota_object_list_field "/test_dir" 2 -#----------------------------------------------------- -# Check the quota enforcement mechanism for usage -#----------------------------------------------------- - -# try creating a 8MB file and it should fail -TEST $QDD $M0/test_dir/test1.txt 256 32 -EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "8.0MB" quotausage "/test_dir" -TEST rm -f $M0/test_dir/test1.txt -EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test_dir" - -# try creating a 15MB file and it should not succeed -TEST ! $QDD $M0/test_dir/test2.txt 256 60 -TEST rm -f $M0/test_dir/test2.txt -EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test_dir" - - #------------------------------------------------------ # Check the quota enforcement mechanism for object count #------------------------------------------------------- @@ -113,9 +80,5 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0" quota_object_list_field "/test_dir" 4 TEST $CLI volume quota $V0 remove-objects /test_dir -TEST $CLI volume stop $V0 -EXPECT "1" get_aux -TEST $CLI volume delete $V0 - rm -f $QDD cleanup; diff --git a/tests/bugs/quota/bug-1202244-support-inode-quota.t b/tests/basic/inode-quota.t index da781cc14b2..4b5ac44ee19 100644 --- a/tests/bugs/quota/bug-1202244-support-inode-quota.t +++ b/tests/basic/inode-quota.t @@ -1,7 +1,7 @@ #!/bin/bash -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc function get_quota_value() { @@ -14,7 +14,6 @@ function get_quota_value() cleanup; TEST glusterd; -TEST pidof glusterd; TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2}; TEST $CLI volume start $V0; @@ -37,7 +36,5 @@ EXPECT "" get_quota_value "list" "/dir" TEST $CLI volume quota $V0 remove-objects /dir; EXPECT "" get_quota_value "list-objects" "/dir" -TEST $CLI volume stop $V0 -EXPECT "1" get_aux cleanup; diff --git a/tests/bugs/quota/bug-1240991.t b/tests/basic/quota-rename.t index 2a1a6d1868e..37438689d9f 100644 --- a/tests/bugs/quota/bug-1240991.t +++ b/tests/basic/quota-rename.t @@ -4,14 +4,12 @@ # no limit set, is accounted properly, when moved into a directory with quota # limit set. -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc cleanup; TEST glusterd -TEST pidof glusterd; -TEST $CLI volume info; TEST $CLI volume create $V0 $H0:$B0/${V0} TEST $CLI volume start $V0; @@ -36,8 +34,4 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "5" quota_object_list_field "/dir" 4 #Number of directories under /dir is 7 EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "7" quota_object_list_field "/dir" 5 -TEST $CLI volume stop $V0 -TEST $CLI volume delete $V0 -EXPECT "1" get_aux - cleanup; diff --git a/tests/basic/quota.t b/tests/basic/quota.t index ec8fa0afcb9..887fbfc32bc 100755 --- a/tests/basic/quota.t +++ b/tests/basic/quota.t @@ -31,12 +31,20 @@ TEST $GFS -s $H0 --volfile-id $V0 $M0; TEST mkdir -p $M0/test_dir/in_test_dir -## ------------------------------ -## Verify quota commands -## ------------------------------ +## -------------------------------------------------------------------------- +## Verify quota commands and check if quota-deem-statfs is enabled by default +## -------------------------------------------------------------------------- TEST $CLI volume quota $V0 enable +EXPECT 'on' volinfo_field $V0 'features.quota' +EXPECT 'on' volinfo_field $V0 'features.inode-quota' +EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + +#Wait for the auxiliarymount to come up +sleep 3 TEST $CLI volume quota $V0 limit-usage /test_dir 100MB +# Checking for auxiliary mount +EXPECT "0" get_aux TEST $CLI volume quota $V0 limit-usage /test_dir/in_test_dir 150MB @@ -67,6 +75,19 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test_dir" TEST $QDD $M0/test_dir/2.txt 256 32 EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "8.0MB" quotausage "/test_dir" + +# Checking internal xattr +# This confirms that pgfid is also filtered +TEST ! "getfattr -d -e hex -m . $M0/test_dir/2.txt | grep pgfid "; +# just check for quota xattr are visible or not +TEST ! "getfattr -d -e hex -m . $M0/test_dir | grep quota"; + +# setfattr should fail +TEST ! setfattr -n trusted.glusterfs.quota.limit-set -v 10 $M0/test_dir; + +# remove xattr should fail +TEST ! setfattr -x trusted.glusterfs.quota.limit-set $M0/test_dir; + TEST rm $M0/test_dir/2.txt EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test_dir" @@ -78,6 +99,19 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "8.0MB" quotausage "/test_dir" TEST rm $M0/test_dir/0 EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test_dir" +## rename tests under different directories +TEST mkdir -p $M0/1/2; +TEST $CLI volume quota $V0 limit-usage /1/2 100MB 70%; + +# The corresponding write(3) should fail with EDQUOT ("Disk quota exceeded") +TEST ! $QDD $M0/1/2/file 256 408 + +TEST mkdir -p $M0/1/3; +TEST $QDD $M0/1/3/file 256 408 + +#The corresponding rename(3) should fail with EDQUOT ("Disk quota exceeded") +TEST ! mv $M0/1/3/ $M0/1/2/3_mvd; + ## --------------------------- ## ------------------------------ @@ -169,13 +203,36 @@ TEST getfattr -d -m "trusted.glusterfs.quota.limit-set" -e hex \ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0 +## --------------------------- +## Test quota volume options +## --------------------------- +TEST $CLI volume reset $V0 +EXPECT 'on' volinfo_field $V0 'features.quota' +EXPECT 'on' volinfo_field $V0 'features.inode-quota' +EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + +TEST $CLI volume reset $V0 force +EXPECT 'on' volinfo_field $V0 'features.quota' +EXPECT 'on' volinfo_field $V0 'features.inode-quota' +EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + +TEST $CLI volume reset $V0 features.quota-deem-statfs +EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + +TEST $CLI volume set $V0 features.quota-deem-statfs off +EXPECT 'off' volinfo_field $V0 'features.quota-deem-statfs' + +TEST $CLI volume set $V0 features.quota-deem-statfs on +EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' + TEST $CLI volume quota $V0 disable +EXPECT 'off' volinfo_field $V0 'features.quota' +EXPECT 'off' volinfo_field $V0 'features.inode-quota' +EXPECT '' volinfo_field $V0 'features.quota-deem-statfs' + +# aux mount should be removed TEST $CLI volume stop $V0; EXPECT "1" get_aux -EXPECT 'Stopped' volinfo_field $V0 'Status'; - -TEST $CLI volume delete $V0; -TEST ! $CLI volume info $V0; rm -f $QDD cleanup; diff --git a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t index cac06a52960..ebfa5545728 100644 --- a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t +++ b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t @@ -5,7 +5,6 @@ cleanup; TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} TEST $CLI volume start $V0 TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 @@ -138,6 +137,4 @@ EXPECT "$acl_access_val" echo $(getfattr -d -m. -e hex $B0/${V0}0/d | grep syste EXPECT "$acl_file_val" echo $(getfattr -d -m. -e hex $B0/${V0}0/d | grep trusted.SGI_ACL_FILE) EXPECT "$acl_access_val" echo $(getfattr -d -m. -e hex $B0/${V0}1/d | grep system.posix_acl_access) EXPECT "$acl_file_val" echo $(getfattr -d -m. -e hex $B0/${V0}1/d | grep trusted.SGI_ACL_FILE) -TEST $CLI volume stop $V0 -EXPECT "1" get_aux cleanup diff --git a/tests/bugs/quota/bug-1023974.t b/tests/bugs/quota/bug-1023974.t deleted file mode 100644 index 2fb93320045..00000000000 --- a/tests/bugs/quota/bug-1023974.t +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# This regression test tries to ensure renaming a directory with content, and -# no limit set, is accounted properly, when moved into a directory with quota -# limit set. - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -cleanup; - -QDD=$(dirname $0)/quota -# compile the test write program and run it -build_tester $(dirname $0)/../../basic/quota.c -o $QDD - -TEST glusterd -TEST pidof glusterd; -TEST $CLI volume info; - -TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4,5,6}; -TEST $CLI volume start $V0; - -TEST $CLI volume quota $V0 enable; - -TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0; - -TEST mkdir -p $M0/1/2; -TEST $CLI volume quota $V0 limit-usage /1/2 100MB 70%; -TEST $CLI volume quota $V0 hard-timeout 0 -TEST $CLI volume quota $V0 soft-timeout 0 - -#The corresponding write(3) should fail with EDQUOT ("Disk quota exceeded") -TEST ! $QDD $M0/1/2/file 256 408 -TEST mkdir -p $M0/1/3; -TEST $QDD $M0/1/3/file 256 408 - -#The corresponding rename(3) should fail with EDQUOT ("Disk quota exceeded") -TEST ! mv $M0/1/3/ $M0/1/2/3_mvd; - -TEST $CLI volume stop $V0 -EXPECT "1" get_aux - -rm -f $QDD - -cleanup; diff --git a/tests/bugs/quota/bug-1035576.t b/tests/bugs/quota/bug-1035576.t index 12f960c46c6..eaf4439a063 100644 --- a/tests/bugs/quota/bug-1035576.t +++ b/tests/bugs/quota/bug-1035576.t @@ -9,7 +9,6 @@ cleanup; TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} TEST $CLI volume start $V0 #Lets disable perf-xls so that lookup would reach afr @@ -48,6 +47,4 @@ TEST cat $M0/a/f #Now that data self-heal is done quota size value should be same quota_size_val0=$(get_hex_xattr trusted.glusterfs.quota.size $B0/${V0}0/a) TEST [ $quota_size_val0 == $quota_size_val1 ] -TEST $CLI volume stop $V0 -EXPECT "1" get_aux cleanup diff --git a/tests/bugs/quota/bug-1038598.t b/tests/bugs/quota/bug-1038598.t index 7d69a98cbd4..108e14cb8d8 100644 --- a/tests/bugs/quota/bug-1038598.t +++ b/tests/bugs/quota/bug-1038598.t @@ -9,8 +9,6 @@ QDD=$(dirname $0)/quota build_tester $(dirname $0)/../../basic/quota.c -o $QDD TEST glusterd -TEST pidof glusterd -TEST $CLI volume info; TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2}; @@ -19,7 +17,6 @@ EXPECT 'Created' volinfo_field $V0 'Status'; EXPECT '2' brick_count $V0 TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; TEST $CLI volume quota $V0 enable sleep 5 @@ -49,8 +46,6 @@ TEST $CLI volume set $V0 features.soft-timeout 0 TEST ! $QDD $M0/test_dir/file1.txt 256 60 EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT 'Yes' quota_sl_exceeded "/test_dir"; EXPECT 'Yes' quota_hl_exceeded "/test_dir"; -TEST $CLI volume stop $V0 -EXPECT "1" get_aux rm -f $QDD diff --git a/tests/bugs/quota/bug-1040423.t b/tests/bugs/quota/bug-1040423.t deleted file mode 100755 index c6dbdb1ff81..00000000000 --- a/tests/bugs/quota/bug-1040423.t +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -cleanup - -function _init() { -# Start glusterd -TEST glusterd; -TEST pidof glusterd; -TEST $CLI volume info; - -# Lets create volume -TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}; - -## Verify volume is created -EXPECT "$V0" volinfo_field $V0 'Volume Name'; -EXPECT 'Created' volinfo_field $V0 'Status'; - -#Start volume and verify -TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; -TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 - -#Enable Quota -TEST $CLI volume quota $V0 enable - -#As quotad consumes some time to connect to brick process we invoke sleep -sleep 10; - -#set limit of 1GB of quota on root -TEST $CLI volume quota $V0 limit-usage / 1GB -} - -function get_hardlimit() -{ - VOLUME=$1 - - $CLI volume quota $VOLUME list | tail -1 | sed "s/ \{1,\}/ /g" | - cut -d' ' -f 2 -} - -function check_fattrs { - -touch $M0/file1; - -#This confirms that pgfid is also filtered -TEST ! "getfattr -d -e hex -m . $M0/file1 | grep pgfid "; - -#just check for quota xattr are visible or not -TEST ! "getfattr -d -e hex -m . $M0 | grep quota"; - -#setfattr should fail -TEST ! setfattr -n trusted.glusterfs.quota.limit-set -v 10 $M0; - -#remove xattr should fail -TEST ! setfattr -x trusted.glusterfs.quota.limit-set $M0; - -#check if list command still shows the correct value or not - -EXPECT "1.0GB" get_hardlimit $V0 - -} - -_init; -check_fattrs; -TEST $CLI volume stop $V0 -EXPECT "1" get_aux -cleanup diff --git a/tests/bugs/quota/bug-1049323.t b/tests/bugs/quota/bug-1049323.t deleted file mode 100755 index 95ef91d4272..00000000000 --- a/tests/bugs/quota/bug-1049323.t +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -cleanup; - -function _init() -{ -# Start glusterd -TEST glusterd; -TEST pidof glusterd; -TEST $CLI volume info; - -#Create a volume -TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2}; - -#Verify volume is created -EXPECT "$V0" volinfo_field $V0 'Volume Name'; -EXPECT 'Created' volinfo_field $V0 'Status'; - -#Start volume and verify -TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; -TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 - -#Enable Quota -TEST $CLI volume quota $V0 enable - -##Wait for the auxiliary mount to comeup -sleep 3; -} - -function create_data() -{ -#set some limit on the volume -TEST $CLI volume quota $V0 limit-usage / 50MB; - -#Auxiliary mount should be there before stopping the volume -EXPECT "0" get_aux; - -TEST $CLI volume stop $V0; - -#Aux mount should have been removed -EXPECT "1" get_aux; - -} - - -_init; -create_data; -cleanup; diff --git a/tests/bugs/quota/bug-1087198.t b/tests/bugs/quota/bug-1087198.t index 44aa1b75e7a..1acf656e091 100644 --- a/tests/bugs/quota/bug-1087198.t +++ b/tests/bugs/quota/bug-1087198.t @@ -26,19 +26,14 @@ build_tester $(dirname $0)/../../basic/quota.c -o $QDD #1 ## Step 1 TEST glusterd -TEST pidof glusterd -TEST $CLI volume info; TEST $CLI volume create $V0 $H0:$B0/brick{1..4}; -EXPECT 'Created' volinfo_field $V0 'Status'; TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available; TEST mount_nfs $H0:/$V0 $N0 noac,nolock - QUOTA_LIMIT_DIR="quota_limit_dir" BRICK_LOG_DIR="`gluster --print-logdir`/bricks" diff --git a/tests/bugs/quota/bug-1100050.t b/tests/bugs/quota/bug-1100050.t deleted file mode 100644 index 65a1250f246..00000000000 --- a/tests/bugs/quota/bug-1100050.t +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -cleanup; - -TEST glusterd; -TEST pidof glusterd; - -TEST gluster volume create $V0 stripe 2 $H0:$B0/{1,2} force; -TEST gluster volume start $V0; -TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0; - -TEST gluster volume quota $V0 enable; - -EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" quotad_up_status; - -TEST mkdir $M0/dir; - -TEST gluster volume quota $V0 limit-usage /dir 10MB; - -TEST mkdir $M0/dir/subdir; - -TEST $CLI volume stop $V0 -EXPECT "1" get_aux -cleanup; diff --git a/tests/bugs/quota/bug-1104692.t b/tests/bugs/quota/bug-1104692.t index 3acffa4720c..9640996135f 100755 --- a/tests/bugs/quota/bug-1104692.t +++ b/tests/bugs/quota/bug-1104692.t @@ -5,7 +5,6 @@ cleanup; TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 $H0:$B0/${V0}3 TEST $CLI volume start $V0 @@ -24,10 +23,4 @@ TEST $CLI volume quota $V0 limit-usage /limit_one/limit_two/limit_three 1GB TEST $CLI volume quota $V0 limit-usage /limit_four 1GB TEST $CLI volume quota $V0 limit-usage /limit_one/limit_five 1GB -#Cleanup -EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 -TEST $CLI volume stop $V0 -EXPECT "1" get_aux -TEST $CLI volume delete $V0 - cleanup; diff --git a/tests/bugs/quota/bug-1153964.t b/tests/bugs/quota/bug-1153964.t index cf5b07c1329..37f34536645 100644 --- a/tests/bugs/quota/bug-1153964.t +++ b/tests/bugs/quota/bug-1153964.t @@ -41,12 +41,9 @@ function createFile_and_checkLimit() cleanup; TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}2 -EXPECT 'Created' volinfo_field $V0 'Status' TEST $CLI volume start $V0 -EXPECT 'Started' volinfo_field $V0 'Status' TEST $CLI volume quota $V0 enable EXPECT 'on' volinfo_field $V0 'features.quota' @@ -78,6 +75,4 @@ TEST rm -rf $N0/test_dir/ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0 -TEST $CLI volume stop $V0 -EXPECT "1" get_aux cleanup; diff --git a/tests/bugs/quota/bug-1178130.t b/tests/bugs/quota/bug-1178130.t index f75bcd4f03c..ccd6b792cf8 100644 --- a/tests/bugs/quota/bug-1178130.t +++ b/tests/bugs/quota/bug-1178130.t @@ -14,8 +14,6 @@ QDD=$(dirname $0)/quota build_tester $(dirname $0)/../../basic/quota.c -o $QDD TEST glusterd -TEST pidof glusterd; -TEST $CLI volume info; TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2}; TEST $CLI volume start $V0; @@ -41,10 +39,6 @@ EXPECT_WITHIN $HEAL_TIMEOUT "0" STAT "$B0/${V0}2/file2" #usage should remain same after rename and self-heal operation EXPECT "10.0MB" quotausage "/" -TEST $CLI volume stop $V0 -TEST $CLI volume delete $V0 -EXPECT "1" get_aux - rm -f $QDD cleanup; diff --git a/tests/bugs/quota/bug-1213364-disable-deem-statfs-when-quota-disable.t b/tests/bugs/quota/bug-1213364-disable-deem-statfs-when-quota-disable.t deleted file mode 100644 index aaf4a315949..00000000000 --- a/tests/bugs/quota/bug-1213364-disable-deem-statfs-when-quota-disable.t +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -. $(dirname $0)/../../include.rc -. $(dirname $0)/../../volume.rc - -cleanup; - -TEST glusterd -TEST pidof glusterd - -TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2}; -EXPECT 'Created' volinfo_field $V0 'Status'; - -TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; - -TEST $CLI volume quota $V0 enable -EXPECT 'on' volinfo_field $V0 'features.quota' -EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs' - -TEST $CLI volume quota $V0 disable -EXPECT 'off' volinfo_field $V0 'features.quota' -EXPECT '' volinfo_field $V0 'features.quota-deem-statfs' - -cleanup; diff --git a/tests/bugs/quota/bug-1235182.t b/tests/bugs/quota/bug-1235182.t index 4b0f4f4521d..a8d1734bf57 100644 --- a/tests/bugs/quota/bug-1235182.t +++ b/tests/bugs/quota/bug-1235182.t @@ -14,7 +14,6 @@ QDD=$(dirname $0)/quota build_tester $(dirname $0)/../../basic/quota.c -o $QDD TEST glusterd -TEST pidof glusterd; TEST $CLI volume info; TEST $CLI volume create $V0 $H0:$B0/${V0}; @@ -55,10 +54,6 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $M0/51/f51 EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "100.0MB" quotausage "/" -TEST $CLI volume stop $V0 -TEST $CLI volume delete $V0 -EXPECT "1" get_aux - rm -f $QDD cleanup; diff --git a/tests/bugs/quota/bug-1243798.t b/tests/bugs/quota/bug-1243798.t index 9917b5dc7a1..c5def297102 100644 --- a/tests/bugs/quota/bug-1243798.t +++ b/tests/bugs/quota/bug-1243798.t @@ -7,14 +7,10 @@ cleanup; TEST glusterd -TEST pidof glusterd -TEST $CLI volume info; TEST $CLI volume create $V0 $H0:$B0/$V0 -EXPECT 'Created' volinfo_field $V0 'Status'; TEST $CLI volume start $V0; -EXPECT 'Started' volinfo_field $V0 'Status'; EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available; TEST mount_nfs $H0:/$V0 $N0 noac,nolock @@ -44,7 +40,5 @@ echo Hello > $N0/dir1/dir2/file EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "2" quota_object_list_field "/dir1" 5 EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0 -TEST $CLI volume stop $V0 -EXPECT "1" get_aux cleanup; diff --git a/tests/bugs/quota/bug-1260545.t b/tests/bugs/quota/bug-1260545.t index 715f0669d96..46808022f01 100644 --- a/tests/bugs/quota/bug-1260545.t +++ b/tests/bugs/quota/bug-1260545.t @@ -10,7 +10,6 @@ QDD=$(dirname $0)/quota build_tester $(dirname $0)/../../basic/quota.c -o $QDD TEST glusterd -TEST pidof glusterd; TEST $CLI volume info; TEST $CLI volume create $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}2; @@ -50,10 +49,5 @@ TEST [ `echo $var | awk '{print $6}'` = "0" ] EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quotausage "/" -rm -f $M0/f1 -TEST $CLI volume stop $V0 -TEST $CLI volume delete $V0 -EXPECT "1" get_aux - rm -f $QDD cleanup; diff --git a/tests/bugs/quota/bug-1287996.t b/tests/bugs/quota/bug-1287996.t index d75b7a26897..2f46ee1ca2d 100644 --- a/tests/bugs/quota/bug-1287996.t +++ b/tests/bugs/quota/bug-1287996.t @@ -18,7 +18,4 @@ TEST $CLI_1 volume quota $V0 enable TEST $CLI_1 peer probe $H2; EXPECT_WITHIN $PROBE_TIMEOUT 1 check_peers - -TEST $CLI_1 volume stop $V0 -TEST $CLI_1 volume delete $V0 cleanup; diff --git a/tests/bugs/quota/bug-1288474.t b/tests/bugs/quota/bug-1288474.t index 2ead6ef4d74..bd64df9e45c 100755 --- a/tests/bugs/quota/bug-1288474.t +++ b/tests/bugs/quota/bug-1288474.t @@ -18,8 +18,6 @@ cleanup; #Basic checks TEST glusterd -TEST pidof glusterd -TEST $CLI volume info #Create and start a tiered volume create_dist_tier_vol $NUM_BRICKS @@ -41,8 +39,5 @@ mkdir $B0/hot TEST $CLI volume tier $V0 attach $H0:$B0/hot/${V0}{0..$1} EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quota_list_field "/" 5 -TEST $CLI volume stop $V0 -TEST $CLI volume delete $V0 - cleanup; diff --git a/tests/bugs/quota/bug-1293601.t b/tests/bugs/quota/bug-1293601.t index 9b8a13a61e5..4586e5a6acf 100644 --- a/tests/bugs/quota/bug-1293601.t +++ b/tests/bugs/quota/bug-1293601.t @@ -7,7 +7,6 @@ cleanup; TESTS_EXPECTED_IN_LOOP=1044 TEST glusterd -TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4} TEST $CLI volume start $V0 @@ -30,6 +29,4 @@ done TEST $CLI volume quota $V0 limit-usage / 2MB EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/" -TEST $CLI volume stop $V0 -TEST $CLI volume delete $V0 cleanup; diff --git a/tests/volume.rc b/tests/volume.rc index 986d8dac15f..3cfe7b3309b 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -550,7 +550,7 @@ function num_graphs function get_aux() { ##Check if a auxiliary mount is there -df -h 2>&1 | grep -e "[[:space:]]/run/gluster/${V0}$" -e "[[:space:]]/var/run/gluster/${V0}$" - +df -h 2>&1 | sed 's#/build/install##' | grep -e "[[:space:]]/run/gluster/${V0}$" -e "[[:space:]]/var/run/gluster/${V0}$" - if [ $? -eq 0 ] then |