summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--277/regr/spec_files/client1.vol61
-rw-r--r--277/regr/spec_files/fcntl.c24
-rw-r--r--277/regr/spec_files/server1.vol53
-rwxr-xr-x277/regr/testcase33
4 files changed, 171 insertions, 0 deletions
diff --git a/277/regr/spec_files/client1.vol b/277/regr/spec_files/client1.vol
new file mode 100644
index 0000000..9cfeb44
--- /dev/null
+++ b/277/regr/spec_files/client1.vol
@@ -0,0 +1,61 @@
+### file: client-volume.vol.sample
+
+#####################################
+### GlusterFS Client Volume File ##
+#####################################
+
+#### CONFIG FILE RULES:
+### "#" is comment character.
+### - Config file is case sensitive
+### - Options within a volume block can be in any order.
+### - Spaces or tabs are used as delimitter within a line.
+### - Each option should end within a line.
+### - Missing or commented fields will assume default values.
+### - Blank/commented lines are allowed.
+### - Sub-volumes should already be defined above before referring.
+
+### Add client feature and attach to remote subvolume
+volume client
+ type protocol/client
+ option transport-type tcp
+# option transport-type unix
+# option transport-type ib-sdp
+ option remote-host 127.0.0.1 # IP address of the remote brick
+ option transport.socket.remote-port 6997 # default server port is 6996
+
+# option transport-type ib-verbs
+# option transport.ib-verbs.remote-port 6996 # default server port is 6996
+# option transport.ib-verbs.work-request-send-size 1048576
+# option transport.ib-verbs.work-request-send-count 16
+# option transport.ib-verbs.work-request-recv-size 1048576
+# option transport.ib-verbs.work-request-recv-count 16
+
+# option transport-timeout 30 # seconds to wait for a reply
+ # from server for each request
+ option remote-subvolume brick # name of the remote volume
+end-volume
+
+### Add readahead feature
+volume readahead
+ type performance/read-ahead
+ option page-size 1MB # unit in bytes
+ option page-count 2 # cache per file = (page-count x page-size)
+ subvolumes client
+end-volume
+
+### Add IO-Cache feature
+volume iocache
+ type performance/io-cache
+ option page-size 256KB
+ option page-count 2
+ subvolumes readahead
+end-volume
+
+### Add writeback feature
+volume writeback
+ type performance/write-behind
+ option aggregate-size 1MB
+ option window-size 2MB
+ option flush-behind off
+ subvolumes iocache
+end-volume
diff --git a/277/regr/spec_files/fcntl.c b/277/regr/spec_files/fcntl.c
new file mode 100644
index 0000000..6aff3d4
--- /dev/null
+++ b/277/regr/spec_files/fcntl.c
@@ -0,0 +1,24 @@
+#include<stdio.h>
+#include<stdlib.h>
+#include<unistd.h>
+#include<sys/types.h>
+#include<sys/stat.h>
+#include<fcntl.h>
+#include<errno.h>
+
+int main(int argc, char *argv[])
+{
+ int fd;
+ int dup_fd;
+ fd = open (argv[1], O_RDONLY | O_CREAT,0755);
+ if (fd == -1) {
+ return errno;
+ } else {
+ dup_fd = fcntl(fd, F_DUPFD);
+ }
+ if ( dup_fd == -1) {
+ return errno;
+ } else
+ return 0;
+}
+
diff --git a/277/regr/spec_files/server1.vol b/277/regr/spec_files/server1.vol
new file mode 100644
index 0000000..1b27aa0
--- /dev/null
+++ b/277/regr/spec_files/server1.vol
@@ -0,0 +1,53 @@
+### file: server-volume.vol.sample
+
+#####################################
+### GlusterFS Server Volume File ##
+#####################################
+
+#### CONFIG FILE RULES:
+### "#" is comment character.
+### - Config file is case sensitive
+### - Options within a volume block can be in any order.
+### - Spaces or tabs are used as delimitter within a line.
+### - Multiple values to options will be : delimitted.
+### - Each option should end within a line.
+### - Missing or commented fields will assume default values.
+### - Blank/commented lines are allowed.
+### - Sub-volumes should already be defined above before referring.
+
+### Export volume "brick" with the contents of "/home/export" directory.
+volume posix1
+ type storage/posix # POSIX FS translator
+ option directory /root/regression/277/regr/export/export1
+end-volume
+
+volume brick
+ type performance/io-threads
+ option thread-count 8
+ subvolumes posix1
+end-volume
+
+### Add network serving capability to above brick.
+volume server
+ type protocol/server
+ option transport-type tcp
+# option transport-type unix
+# option transport-type ib-sdp
+# option transport.socket.bind-address 192.168.1.10 # Default is to listen on all interfaces
+ option transport.socket.listen-port 6997 # Default is 6996
+
+# option transport-type ib-verbs
+# option transport.ib-verbs.bind-address 192.168.1.10 # Default is to listen on all interfaces
+ option transport.ib-verbs.listen-port 7001 # Default is 6996
+# option transport.ib-verbs.work-request-send-size 131072
+# option transport.ib-verbs.work-request-send-count 64
+# option transport.ib-verbs.work-request-recv-size 131072
+# option transport.ib-verbs.work-request-recv-count 64
+
+# option client-volume-filename /etc/glusterfs/glusterfs-client.vol
+ subvolumes brick
+# NOTE: Access to any volume through protocol/server is denied by
+# default. You need to explicitly grant access through # "auth"
+# option.
+ option auth.addr.brick.allow * # Allow access to "brick" volume
+end-volume
diff --git a/277/regr/testcase b/277/regr/testcase
new file mode 100755
index 0000000..10ad25a
--- /dev/null
+++ b/277/regr/testcase
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+description="# fcntl system with F_DUPFD command fails on booster"
+comments="# when fcntl system call is executed with the F_DUPFD command the call fails with EINVAL as the error status"
+
+source ../../init
+
+start_glusterfs --no-clients
+
+sleep 5
+
+echo "$SPECDIR/client1.vol $MOUNTDIR/client1 glusterfs subvolume=client,logfile=$LOGDIR/clog,loglevel=DEBUG" > $SPECDIR/booster.conf
+export GLUSTERFS_BOOSTER_FSTAB=$SPECDIR/booster.conf
+export LD_PRELOAD=$(dirname $GLUSTERFSDIR)/lib/glusterfs/glusterfs-booster.so
+touch $MOUNTDIR/client1/a1
+
+sleep 2
+gcc $SPECDIR/fcntl.c -o $SPECDIR/fcntl
+$SPECDIR/fcntl $MOUNTDIR/client1/a1
+
+if [ $? -eq 22 ]; then
+ not_ok $description
+ comment $comments
+else
+ ok $description
+ comment $comments
+fi
+
+rm $SPECDIR/fcntl $SPECDIR/booster.conf
+GLUSTERFS_BOOSTER_FSTAB=
+LD_PRELOAD=
+
+cleanup_glusterfs \ No newline at end of file