summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2013-09-05 20:53:14 +0530
committerVijay Bellur <vbellur@redhat.com>2013-09-05 19:25:43 -0700
commit06d2e2a93f00550eaac68ce0f731e8ffa8850c79 (patch)
treefc0b3b6352fe969a93a623f392a187b400f41c7c /tests
parent285de41f1105e18fa7bcf309fe43fb9e6d08508e (diff)
call-stub: remove fall-through in ftruncate
Original-author: Pranith Kumar K <pkarampu@redhat.com> Change-Id: I7c8ed3e3e4ddc558ff061f2e1407fb43095e67f4 BUG: 913544 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5827 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bug-913544.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs/bug-913544.t b/tests/bugs/bug-913544.t
new file mode 100644
index 00000000000..790bc08980f
--- /dev/null
+++ b/tests/bugs/bug-913544.t
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+#simulate a split-brain of a file and do truncate. This should not crash the mount point
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}0 $H0:$B0/${V0}1
+TEST $CLI volume set $V0 stat-prefetch off
+TEST $CLI volume start $V0
+TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
+cd $M0
+TEST touch a
+#simulate no-changelog data split-brain
+echo "abc" > $B0/${V0}1/a
+echo "abcd" > $B0/${V0}0/a
+TEST ! truncate -s 0 a
+TEST ls
+cd
+
+cleanup