summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2009-12-01 23:05:39 -0800
committerVijay Bellur <vijay@gluster.com>2010-01-26 21:18:34 +0530
commitf244ea2ff4f70b4165bad19f2bc6129fe57a173e (patch)
tree069c39a799bfbc3dd665581a3ff62aed7033d36a
parent8d73bd9c4335291ce6965c2bc7a58fd46c276ce4 (diff)
Regression testcase for bug 266
Signed-off-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--266/regr/spec_files/client1.vol38
-rw-r--r--266/regr/spec_files/mknod.c20
-rw-r--r--266/regr/spec_files/server1.vol35
-rw-r--r--266/regr/spec_files/server2.vol32
-rw-r--r--266/regr/spec_files/server3.vol33
-rwxr-xr-x266/regr/testcase24
6 files changed, 182 insertions, 0 deletions
diff --git a/266/regr/spec_files/client1.vol b/266/regr/spec_files/client1.vol
new file mode 100644
index 0000000..7273d0f
--- /dev/null
+++ b/266/regr/spec_files/client1.vol
@@ -0,0 +1,38 @@
+# **** Clustered Client config file ****
+
+### Add client feature and attach to remote subvolume of server1
+volume client1
+ type protocol/client
+ option transport-type tcp # for TCP/IP transport
+ option remote-host 127.0.0.1 # IP address of the remote brick
+ option transport.socket.remote-port 7001 # default server port is 6996
+ option transport.socket.nodelay on
+ option remote-subvolume brick1 # name of the remote volume
+end-volume
+
+### Add client feature and attach to remote subvolume of server2
+volume client2
+ type protocol/client
+ option transport-type tcp # for TCP/IP transport
+ option remote-host 127.0.0.1 # IP address of the remote brick
+ option transport.socket.remote-port 7002 # default server port is 6996
+ option transport.socket.nodelay on
+ option remote-subvolume brick2 # name of the remote volume
+end-volume
+
+volume client3
+ type protocol/client
+ option transport-type tcp # for TCP/IP transport
+ option remote-host 127.0.0.1 # IP address of the remote brick
+ option transport.socket.remote-port 7003 # default server port is 6996
+ option transport.socket.nodelay on
+ option remote-subvolume brick3 # name of the remote volume
+end-volume
+
+## Add Stripe Feature.
+volume stripe
+ type cluster/stripe
+ subvolumes client1 client2 client3
+ #option block-size 100MB
+end-volume
+
diff --git a/266/regr/spec_files/mknod.c b/266/regr/spec_files/mknod.c
new file mode 100644
index 0000000..adc2dc3
--- /dev/null
+++ b/266/regr/spec_files/mknod.c
@@ -0,0 +1,20 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdio.h>
+
+int main (int argc, char *argv[])
+{
+
+ int ret = -1;
+
+ ret = mknod (argv[1] , S_IFREG | 0644, 0);
+
+ if(ret == 0)
+ return ret;
+ else
+ return errno;
+}
diff --git a/266/regr/spec_files/server1.vol b/266/regr/spec_files/server1.vol
new file mode 100644
index 0000000..6f68154
--- /dev/null
+++ b/266/regr/spec_files/server1.vol
@@ -0,0 +1,35 @@
+# **** server1 spec file ****
+
+### Export volume "brick" with the contents of "/home/export" directory.
+volume posix1
+ type storage/posix # POSIX FS translator
+ option directory /root/regression/266/regr/export/export1
+end-volume
+
+volume error1
+ type debug/error-gen
+ option error-no ENOSPC
+ subvolumes posix1
+end-volume
+
+### Add POSIX record locking support to the storage brick
+volume brick1
+ type features/posix-locks
+ option mandatory on # enables mandatory locking on all files
+ subvolumes error1
+end-volume
+
+### Add network serving capability to above brick.
+volume server
+ type protocol/server
+ option transport-type tcp # For TCP/IP transport
+ option transport.socket.listen-port 7001 # Default is 6996
+ option transport.socket.nodelay on
+# option client-volume-filename /etc/glusterfs/glusterfs-client.vol
+ subvolumes brick1
+ option auth.addr.brick1.allow * # access to "brick" volume
+end-volume
+
+
+#=========================================================================
+
diff --git a/266/regr/spec_files/server2.vol b/266/regr/spec_files/server2.vol
new file mode 100644
index 0000000..f7dd13d
--- /dev/null
+++ b/266/regr/spec_files/server2.vol
@@ -0,0 +1,32 @@
+# **** server2 spec file ****
+volume posix2
+ type storage/posix # POSIX FS translator
+ option directory /root/regression/266/regr/export/export2
+end-volume
+
+volume error2
+ type debug/error-gen
+ option error-no ENOSPC
+ subvolumes posix2
+end-volume
+
+### Add POSIX record locking support to the storage brick
+volume brick2
+ type features/posix-locks
+ option mandatory on # enables mandatory locking on all files
+ subvolumes error2
+end-volume
+
+### Add network serving capability to above brick.
+volume server
+ type protocol/server
+ option transport-type tcp # For TCP/IP transport
+ option transport.socket.listen-port 7002 # Default is 6996
+ option transport.socket.nodelay on
+ subvolumes brick2
+ option auth.addr.brick2.allow * # Allow access to "brick" volume
+end-volume
+
+
+#=========================================================================
+
diff --git a/266/regr/spec_files/server3.vol b/266/regr/spec_files/server3.vol
new file mode 100644
index 0000000..20d32a0
--- /dev/null
+++ b/266/regr/spec_files/server3.vol
@@ -0,0 +1,33 @@
+# **** server3 spec file ****
+
+volume posix3
+ type storage/posix # POSIX FS translator
+ option directory /root/regression/266/regr/export/export3
+end-volume
+
+volume error3
+ type debug/error-gen
+ option error-no ENOSPC
+ subvolumes posix3
+end-volume
+
+### Add POSIX record locking support to the storage brick
+volume brick3
+ type features/posix-locks
+ option mandatory on # enables mandatory locking on all files
+ subvolumes error3
+end-volume
+
+### Add network serving capability to above brick.
+volume server
+ type protocol/server
+ option transport-type tcp # For TCP/IP transport
+ option transport.socket.listen-port 7003 # Default is 6996
+ option transport.socket.nodelay on
+ subvolumes brick3
+ option auth.addr.brick3.allow * # access to "brick" volume
+end-volume
+
+
+#=========================================================================
+
diff --git a/266/regr/testcase b/266/regr/testcase
new file mode 100755
index 0000000..933735a
--- /dev/null
+++ b/266/regr/testcase
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+description="# In stripe client crashes when disk space is full"
+comments="# When mknod system call is executed on a disk which is full with S_IFREG client crashes "
+
+source ../../init
+
+start_glusterfs
+
+sleep 5
+
+gcc $SPECDIR/mknod.c -o $SPECDIR/mkn
+$SPECDIR/mkn $MOUNTDIR/client1/foo
+if [ $? -ne 0 ]; then
+ not_ok $description
+ comment $comments
+else
+ ok $description
+ comment $comments
+fi
+
+rm $SPECDIR/mkn
+
+cleanup_glusterfs \ No newline at end of file