summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmipathi <lakshmipathi@gluster.com>2010-02-11 04:43:47 -0800
committerVijay Bellur <vijay@gluster.com>2010-04-08 10:31:15 +0530
commit6727614db116f9ed79f458fd6d1444b68f955e8f (patch)
tree4875a152a365e505cb5acb142dc38097f722b83b
parent5ec75e10489ca8b18cfea0a9b4ca1ba70cfcfd4e (diff)
Regression testcase for bug 547
Signed-off-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--547/regr/spec_files/client1.vol28
-rw-r--r--547/regr/spec_files/server1.vol23
-rw-r--r--547/regr/spec_files/server2.vol23
-rwxr-xr-x547/regr/testcase35
4 files changed, 109 insertions, 0 deletions
diff --git a/547/regr/spec_files/client1.vol b/547/regr/spec_files/client1.vol
new file mode 100644
index 0000000..c948c41
--- /dev/null
+++ b/547/regr/spec_files/client1.vol
@@ -0,0 +1,28 @@
+volume remote1
+ type protocol/client
+ option transport-type tcp/client
+ option remote-port 9352
+ option remote-host 127.0.0.1
+ option remote-subvolume brick
+end-volume
+
+volume remote2
+ type protocol/client
+ option transport-type tcp/client
+ option remote-port 9353
+ option remote-host 127.0.0.1
+ option remote-subvolume brick
+end-volume
+
+
+volume replica
+ type cluster/replicate
+ subvolumes remote1 remote2
+end-volume
+
+
+volume write-behind
+ type performance/write-behind
+ option enable-trickling-writes on
+ subvolumes replica
+end-volume
diff --git a/547/regr/spec_files/server1.vol b/547/regr/spec_files/server1.vol
new file mode 100644
index 0000000..34aa383
--- /dev/null
+++ b/547/regr/spec_files/server1.vol
@@ -0,0 +1,23 @@
+volume posix
+ type storage/posix
+ option directory /home/laks/workpath/regression/547/regr/export/export1
+end-volume
+
+volume locks
+ type features/locks
+ subvolumes posix
+end-volume
+
+volume brick
+ type performance/io-threads
+ option thread-count 8
+ subvolumes locks
+end-volume
+
+volume server
+ type protocol/server
+ option transport-type tcp/server
+ option listen-port 9352
+ option auth.addr.brick.allow *
+ subvolumes brick
+end-volume
diff --git a/547/regr/spec_files/server2.vol b/547/regr/spec_files/server2.vol
new file mode 100644
index 0000000..7efc5de
--- /dev/null
+++ b/547/regr/spec_files/server2.vol
@@ -0,0 +1,23 @@
+volume posix
+ type storage/posix
+ option directory /home/laks/workpath/regression/547/regr/export/export2
+end-volume
+
+volume locks
+ type features/locks
+ subvolumes posix
+end-volume
+
+volume brick
+ type performance/io-threads
+ option thread-count 8
+ subvolumes locks
+end-volume
+
+volume server
+ type protocol/server
+ option transport-type tcp/server
+ option listen-port 9353
+ option auth.addr.brick.allow *
+ subvolumes brick
+end-volume
diff --git a/547/regr/testcase b/547/regr/testcase
new file mode 100755
index 0000000..771617c
--- /dev/null
+++ b/547/regr/testcase
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+description="# Bug 547 - write-behind enable-trickling-writes working"
+comments="# size and time are not changed at all, regardless of whether enable-trickling-writes is on or off. "
+
+
+source ../../init
+
+start_glusterfs
+
+sleep 2
+n=1; (while [ $n -lt 23421 ]; do echo -n i; ((n+=1)) ; done) > $MOUNTDIR/client1/testing.txt &
+
+filesize1=$(stat -c '%s' $EXPORTDIR/export1/testing.txt)
+sleep 1
+filesize2=$(stat -c '%s' $EXPORTDIR/export2/testing.txt)
+sleep 1
+filesize3=$(stat -c '%s' $EXPORTDIR/export1/testing.txt)
+
+if [ $filesize1 -ne $filesize2 ] && [ $filesize2 -ne $filesize3 ]
+then
+ ok $description
+ comment $comments
+
+else
+ not_ok $description
+ comment $comments
+
+fi
+
+sleep 20
+
+rm $MOUNTDIR/client1/testing.txt >/dev/null
+cleanup_glusterfs
+