summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvinayak hegde <vinayak@gluster.com>2009-10-19 23:39:32 +0000
committerVijay Bellur <vijay@gluster.com>2009-10-20 22:39:42 +0530
commit3109c6fd00ed9a95dd59986d6b030cfd4463471b (patch)
treec662c8c9763e4f039970ac56841f79ce8496e2f1
parent2ff6c0d964c1f478ee7c4c00ff8d8fb84c423212 (diff)
Regression testcase for bug 313
Signed-off-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--313/regr/spec_files/client1.vol58
-rw-r--r--313/regr/spec_files/server1.vol23
-rw-r--r--313/regr/spec_files/server2.vol23
-rw-r--r--313/regr/spec_files/server3.vol23
-rw-r--r--313/regr/spec_files/server4.vol23
-rwxr-xr-x313/regr/testcase48
6 files changed, 198 insertions, 0 deletions
diff --git a/313/regr/spec_files/client1.vol b/313/regr/spec_files/client1.vol
new file mode 100644
index 0000000..0c59631
--- /dev/null
+++ b/313/regr/spec_files/client1.vol
@@ -0,0 +1,58 @@
+volume remote1
+ type protocol/client
+ option transport-type tcp
+ option remote-port 9350
+ option remote-host 127.0.0.1
+ option remote-subvolume brick
+end-volume
+
+volume remote2
+ type protocol/client
+ option transport-type tcp
+ option remote-port 9351
+ option remote-host 127.0.0.1
+ option remote-subvolume brick
+end-volume
+
+volume remote3
+ type protocol/client
+ option transport-type tcp
+ option remote-port 9352
+ option remote-host 127.0.0.1
+ option remote-subvolume brick
+end-volume
+
+volume remote4
+ type protocol/client
+ option transport-type tcp
+ option remote-port 9353
+ option remote-host 127.0.0.1
+ option remote-subvolume brick
+end-volume
+
+volume replicate1
+ type cluster/replicate
+ subvolumes remote1 remote2
+end-volume
+
+volume replicate2
+ type cluster/replicate
+ subvolumes remote3 remote4
+end-volume
+
+volume distribute
+ type cluster/distribute
+ subvolumes replicate1 replicate2
+end-volume
+
+volume writebehind
+ type performance/write-behind
+ option window-size 1MB
+ subvolumes distribute
+end-volume
+
+volume cache
+ type performance/io-cache
+ option cache-size 512MB
+ subvolumes writebehind
+end-volume
diff --git a/313/regr/spec_files/server1.vol b/313/regr/spec_files/server1.vol
new file mode 100644
index 0000000..8aef1f6
--- /dev/null
+++ b/313/regr/spec_files/server1.vol
@@ -0,0 +1,23 @@
+volume posix
+ type storage/posix
+ option directory /jbod/regr/313/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
+ option listen-port 9350
+ option auth.addr.brick.allow *
+ subvolumes brick
+end-volume
diff --git a/313/regr/spec_files/server2.vol b/313/regr/spec_files/server2.vol
new file mode 100644
index 0000000..2aa9b6a
--- /dev/null
+++ b/313/regr/spec_files/server2.vol
@@ -0,0 +1,23 @@
+volume posix
+ type storage/posix
+ option directory /jbod/regr/313/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
+ option listen-port 9351
+ option auth.addr.brick.allow *
+ subvolumes brick
+end-volume
diff --git a/313/regr/spec_files/server3.vol b/313/regr/spec_files/server3.vol
new file mode 100644
index 0000000..31403ef
--- /dev/null
+++ b/313/regr/spec_files/server3.vol
@@ -0,0 +1,23 @@
+volume posix
+ type storage/posix
+ option directory /jbod/regr/313/export3
+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
+ option listen-port 9352
+ option auth.addr.brick.allow *
+ subvolumes brick
+end-volume \ No newline at end of file
diff --git a/313/regr/spec_files/server4.vol b/313/regr/spec_files/server4.vol
new file mode 100644
index 0000000..c040a47
--- /dev/null
+++ b/313/regr/spec_files/server4.vol
@@ -0,0 +1,23 @@
+volume posix
+ type storage/posix
+ option directory /jbod/regr/313/export4
+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
+ option listen-port 9353
+ option auth.addr.brick.allow *
+ subvolumes brick
+end-volume \ No newline at end of file
diff --git a/313/regr/testcase b/313/regr/testcase
new file mode 100755
index 0000000..96ec531
--- /dev/null
+++ b/313/regr/testcase
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+description="# (313) rename is broken"
+comments="#when try to rename a file using mv it fails"
+
+version=$1
+bugid=$(pwd | cut -d '/' -f 4)
+
+exportdir=/jbod/regr/$bugid
+mountdir=/mnt/regr/$bugid/$version
+
+function ok () {
+ desc=$@
+ echo "ok - $desc"
+}
+
+function not_ok () {
+ desc=$@
+ echo "not ok - $desc"
+}
+
+
+function comment () {
+ desc=$@
+ echo "$desc"
+}
+
+[ $# -ne 1 ] && {
+ not_ok "#<Usage: $(basename $0) <glusterfs_version>"
+ exit
+}
+
+/opt/qa/regr/setup $version $bugid
+
+sleep 10;
+
+touch $mountdir/client1/tmp1.txt
+mv $mountdir/client1/tmp1.txt $mountdir/client1/tmp2.txt 2> tmpfile
+
+if [ $(grep "Structure needs cleaning" tmpfile | wc -l) -ne 0 ];then
+ not_ok $description
+ comment $comments
+else
+ ok $description
+fi
+
+rm tmpfile
+/opt/qa/regr/cleanup $version $bugid