summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinayak Hegde <vinayak@gluster.com>2009-10-28 21:57:47 -0700
committerVijay Bellur <vijay@gluster.com>2009-10-30 12:08:21 +0530
commit79ddee5ca9f9c2850ab35d1de68cd9df0cdb5eb1 (patch)
treee6ffa683e7039e5f424d2295be07366f1241c31f
parentebae66bb25de6672eda55ed5369435b97e772ab6 (diff)
Regression testcase for bug 241
Signed-off-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--241/regr/spec_files/client1.vol28
-rw-r--r--241/regr/spec_files/server1.vol23
-rw-r--r--241/regr/spec_files/server2.vol23
-rwxr-xr-x241/regr/testcase61
4 files changed, 135 insertions, 0 deletions
diff --git a/241/regr/spec_files/client1.vol b/241/regr/spec_files/client1.vol
new file mode 100644
index 0000000..03e1aed
--- /dev/null
+++ b/241/regr/spec_files/client1.vol
@@ -0,0 +1,28 @@
+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 cs
+type cluster/replicate
+subvolumes remote1 remote2
+end-volume
+
+volume cache
+type performance/io-cache
+option cache-size 512MB
+subvolumes cs
+end-volume
+
+
diff --git a/241/regr/spec_files/server1.vol b/241/regr/spec_files/server1.vol
new file mode 100644
index 0000000..c366041
--- /dev/null
+++ b/241/regr/spec_files/server1.vol
@@ -0,0 +1,23 @@
+volume posix
+type storage/posix
+option directory /jbod/regr/241/export1
+end-volume
+
+volume locks
+type features/locks
+subvolumes posix
+end-volume
+
+volume brick
+type performance/io-threads
+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/241/regr/spec_files/server2.vol b/241/regr/spec_files/server2.vol
new file mode 100644
index 0000000..054e59f
--- /dev/null
+++ b/241/regr/spec_files/server2.vol
@@ -0,0 +1,23 @@
+volume posix
+type storage/posix
+option directory /jbod/regr/241/export2
+end-volume
+
+volume locks
+type features/locks
+subvolumes posix
+end-volume
+
+volume brick
+type performance/io-threads
+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/241/regr/testcase b/241/regr/testcase
new file mode 100755
index 0000000..2633a30
--- /dev/null
+++ b/241/regr/testcase
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+description="# (241) GlusterFS not honouring SETGID flag"
+comments="# setgid problem on glusterfs mount"
+
+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 5
+cd $mountdir/client1
+mkdir 1
+chgrp avahi 1
+chmod g+s 1
+var1=$(ls -ld 1 | cut -d " " -f 4)
+cd 1
+mkdir 2
+var2=$(ls -ld 2 | cut -d " " -f 4)
+
+#echo $var1
+#echo $var2
+
+if [ $var1 = $var2 ];then
+ ok $description
+else
+ not_ok $description
+ comment $comments
+fi
+
+rmdir $mountdir/client1/1/2
+cd ..
+rmdir $mountdir/client1/1
+
+
+/opt/qa/regr/cleanup $version $bugid