summaryrefslogtreecommitdiffstats
path: root/tests/basic/afr
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2014-03-26 11:09:17 +0530
committerVijay Bellur <vbellur@redhat.com>2014-03-30 05:31:53 -0700
commite7dcc7f8240ef3f54f39b2f243c1eb0eb1cd3844 (patch)
tree238d331aa801312b8630700ff308bcf2d23581f5 /tests/basic/afr
parent36c7f8341540a1c93b5b0aa84688e58ed93422f8 (diff)
tests/afr: gfid mismatch test
Change-Id: I12bae9c4035d5b28292e8085a5b600a3e22abaf4 BUG: 1080759 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7342 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/basic/afr')
-rw-r--r--tests/basic/afr/gfid-mismatch.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/basic/afr/gfid-mismatch.t b/tests/basic/afr/gfid-mismatch.t
new file mode 100644
index 00000000000..05f48d43a2c
--- /dev/null
+++ b/tests/basic/afr/gfid-mismatch.t
@@ -0,0 +1,26 @@
+#!/bin/bash
+#Test that GFID mismatches result in EIO
+
+. $(dirname $0)/../../include.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 touch $M0/file
+TEST setfattr -n trusted.gfid -v 0sBfz5vAdHTEK1GZ99qjqTIg== $B0/brick0/file
+TEST ! "find $M0/file | xargs stat"
+
+#Cleanup
+TEST umount $M0
+TEST $CLI volume stop $V0
+TEST $CLI volume delete $V0
+TEST rm -rf $B0/*