From f244ea2ff4f70b4165bad19f2bc6129fe57a173e Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 1 Dec 2009 23:05:39 -0800 Subject: Regression testcase for bug 266 Signed-off-by: Vijay Bellur --- 266/regr/spec_files/client1.vol | 38 ++++++++++++++++++++++++++++++++++++++ 266/regr/spec_files/mknod.c | 20 ++++++++++++++++++++ 266/regr/spec_files/server1.vol | 35 +++++++++++++++++++++++++++++++++++ 266/regr/spec_files/server2.vol | 32 ++++++++++++++++++++++++++++++++ 266/regr/spec_files/server3.vol | 33 +++++++++++++++++++++++++++++++++ 266/regr/testcase | 24 ++++++++++++++++++++++++ 6 files changed, 182 insertions(+) create mode 100644 266/regr/spec_files/client1.vol create mode 100644 266/regr/spec_files/mknod.c create mode 100644 266/regr/spec_files/server1.vol create mode 100644 266/regr/spec_files/server2.vol create mode 100644 266/regr/spec_files/server3.vol create mode 100755 266/regr/testcase 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 +#include +#include +#include +#include +#include +#include + +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 -- cgit