summaryrefslogtreecommitdiffstats
path: root/tests/basic
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-03-16 21:55:35 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-03-17 09:57:59 -0700
commit857bad73b3313c895c736faa9a5ec71d046a3da7 (patch)
tree967796f889375ed67739b896c12e1700e96dacdd /tests/basic
parent3d5bbe93c5793a78ddef015cd18ac4675cd76344 (diff)
cluster/afr: Enhance the test to be more robust
In some cases of dht, there is code path (dht_lookup_directory) where it sets gfid-req before lookup. This leads to successful setting of gfid when there are only two subvolumes in distribute. So increased number of replica subvolumes. Also increased number of directories. Change-Id: I17092ce6dc69c7fed6e6b380eb0fc0040f19c06a BUG: 1312816 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13754 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Ravishankar N <ravishankar@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/afr/gfid-heal.t23
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/basic/afr/gfid-heal.t b/tests/basic/afr/gfid-heal.t
index e570f3d5951..fa13c469b24 100644
--- a/tests/basic/afr/gfid-heal.t
+++ b/tests/basic/afr/gfid-heal.t
@@ -4,17 +4,30 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc
+
cleanup;
+function get_gfid_count {
+ getfattr -d -m. -e hex $B0/brick{0,1,2,3,4,5}/$1 2>&1 | grep trusted.gfid | wc -l
+}
+
TEST glusterd
TEST pidof glusterd
-TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{0,1,2,3}
+TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{0,1,2,3,4,5}
TEST $CLI volume start $V0
TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0;
-TEST mkdir $B0/brick{0,1,2,3}/d
+TEST mkdir $B0/brick{0,1,2,3}/{0..9}
sleep 2 #to prevent is_fresh_file code path
-TEST stat $M0/d
-gfid_count=$(getfattr -d -m. -e hex $B0/brick{0,1,2,3}/d 2>&1 | grep trusted.gfid | wc -l)
-EXPECT 4 echo $gfid_count
+TEST stat $M0/{0..9}
+EXPECT 6 get_gfid_count 0
+EXPECT 6 get_gfid_count 1
+EXPECT 6 get_gfid_count 2
+EXPECT 6 get_gfid_count 3
+EXPECT 6 get_gfid_count 4
+EXPECT 6 get_gfid_count 5
+EXPECT 6 get_gfid_count 6
+EXPECT 6 get_gfid_count 7
+EXPECT 6 get_gfid_count 8
+EXPECT 6 get_gfid_count 9
cleanup;