summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2016-02-12 17:17:30 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-05-04 20:27:33 -0700
commitfee46d447321689ba059d548f62d7c3c06c24e08 (patch)
tree523737a13895fc71824da1743872f3b6ec7b5a67 /tests
parent0b7631b44b829f44c2ebb3a2f2d01d97987e1fd7 (diff)
performance/write-behind: guaranteed retry after a short write
* Don't mark the request with a fake EIO after a short write. * retry the remaining buffer at least once before unwinding reply to application. This way we capture correct error from backend (ENOSPC, EDQUOT etc). Thanks to "Vijaikumar Mallikarjuna"<vmallika@redhat.com> for the test script. Change-Id: I73a18b39b661a7424db1a7855a980469a51da8f9 BUG: 1332790 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14196 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/quota/bug-1292020.t25
-rwxr-xr-xtests/bugs/write-behind/bug-1279730.t4
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/bugs/quota/bug-1292020.t b/tests/bugs/quota/bug-1292020.t
new file mode 100644
index 00000000000..14b311c9d76
--- /dev/null
+++ b/tests/bugs/quota/bug-1292020.t
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+function write_sample_data () {
+ dd if=/dev/zero of=$M0/f1 bs=256k count=400 2>&1 | grep -i exceeded
+}
+
+cleanup;
+
+TEST glusterd;
+TEST pidof glusterd;
+
+TEST $CLI volume create $V0 $H0:$B0/$V0
+TEST $CLI volume start $V0;
+TEST $CLI volume quota $V0 enable;
+TEST $CLI volume quota $V0 limit-usage / 1
+
+TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0;
+EXPECT "exceeded" write_sample_data
+
+TEST $CLI volume stop $V0
+TEST $CLI volume delete $V0
+cleanup;
diff --git a/tests/bugs/write-behind/bug-1279730.t b/tests/bugs/write-behind/bug-1279730.t
index 38e564b7afc..1c7db1f10d5 100755
--- a/tests/bugs/write-behind/bug-1279730.t
+++ b/tests/bugs/write-behind/bug-1279730.t
@@ -7,7 +7,7 @@
cleanup;
## Start and create a volume
-TEST glusterd;
+TEST glusterd
TEST pidof glusterd;
TEST $CLI volume info;
@@ -15,6 +15,8 @@ TEST $CLI volume create $V0 $H0:$B0/$V0;
TEST $CLI volume start $V0;
TEST $CLI volume quota $V0 enable
TEST $CLI volume quota $V0 limit-usage / 4
+TEST $CLI volume quota $V0 hard-timeout 0
+TEST $CLI volume quota $V0 soft-timeout 0
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0