summaryrefslogtreecommitdiffstats
path: root/tests/basic/afr/read-subvol-entry.t
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2014-03-26 11:22:12 +0530
committerVijay Bellur <vbellur@redhat.com>2014-04-04 06:35:27 -0700
commit49fbc578ef96b7952d4d77993fb8a7212ae486dd (patch)
treeee9d6f60b7aa36af5d0b2220dd8f7b319b540dcc /tests/basic/afr/read-subvol-entry.t
parent27bc6a07b4c82409845077aed0556114caa8dc99 (diff)
tests/afr: select correct read-child for entry OPs.
Change-Id: If375c937579a18d603ed70232130a4664060e9d6 BUG: 1080759 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7344 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/basic/afr/read-subvol-entry.t')
-rw-r--r--tests/basic/afr/read-subvol-entry.t35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/basic/afr/read-subvol-entry.t b/tests/basic/afr/read-subvol-entry.t
new file mode 100644
index 00000000000..91110b8cd70
--- /dev/null
+++ b/tests/basic/afr/read-subvol-entry.t
@@ -0,0 +1,35 @@
+#!/bin/bash
+#Test if the read child is selected based on entry transaction for directory
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+cleanup;
+
+#Init
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{0,1}
+TEST $CLI volume set $V0 self-heal-daemon off
+TEST $CLI volume set $V0 stat-prefetch off
+TEST $CLI volume start $V0
+TEST $CLI volume set $V0 cluster.background-self-heal-count 0
+TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --entry-timeout=0 --attribute-timeout=0;
+
+#Test
+TEST mkdir -p $M0/abc/def
+
+TEST $CLI volume set $V0 cluster.data-self-heal off
+TEST $CLI volume set $V0 cluster.metadata-self-heal off
+TEST $CLI volume set $V0 cluster.entry-self-heal off
+
+TEST kill_brick $V0 $H0 $B0/brick0
+
+TEST touch $M0/abc/def/ghi
+TEST $CLI volume start $V0 force
+EXPECT_WITHIN 5 "ghi" echo `ls $M0/abc/def/`
+
+#Cleanup
+TEST umount $M0
+TEST $CLI volume stop $V0
+TEST $CLI volume delete $V0
+TEST rm -rf $B0/*