diff options
-rw-r--r-- | 234/regr/spec_files/client1.vol | 33 | ||||
-rw-r--r-- | 234/regr/spec_files/open_dir.c | 21 | ||||
-rw-r--r-- | 234/regr/spec_files/server1.vol | 21 | ||||
-rwxr-xr-x | 234/regr/testcase | 36 | ||||
-rw-r--r-- | 260/regr/spec_files/client1.vol | 38 | ||||
-rw-r--r-- | 260/regr/spec_files/server1.vol | 42 | ||||
-rwxr-xr-x | 260/regr/testcase | 29 | ||||
-rw-r--r-- | 277/regr/spec_files/client1.vol | 61 | ||||
-rw-r--r-- | 277/regr/spec_files/fcntl.c | 24 | ||||
-rw-r--r-- | 277/regr/spec_files/server1.vol | 53 | ||||
-rwxr-xr-x | 277/regr/testcase | 33 | ||||
-rw-r--r-- | 37/regr/spec_files/client1.vol | 8 | ||||
-rw-r--r-- | 37/regr/spec_files/server1.vol | 13 | ||||
-rwxr-xr-x | 37/regr/testcase | 37 | ||||
-rwxr-xr-x | run.sh | 6 |
15 files changed, 397 insertions, 58 deletions
diff --git a/234/regr/spec_files/client1.vol b/234/regr/spec_files/client1.vol new file mode 100644 index 0000000..8e1bc27 --- /dev/null +++ b/234/regr/spec_files/client1.vol @@ -0,0 +1,33 @@ +volume client + type protocol/client + option transport-type tcp + 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-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 client +end-volume diff --git a/234/regr/spec_files/open_dir.c b/234/regr/spec_files/open_dir.c new file mode 100644 index 0000000..81c8d7d --- /dev/null +++ b/234/regr/spec_files/open_dir.c @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/stat.h> +#include <dirent.h> +#include <sys/types.h> +#include <fcntl.h> +#include <errno.h> + +int main(int argc, char *argv[]) +{ + DIR *dir; + dir = opendir(argv[1]); + if ( dir == NULL ) { + return errno; + } + else { + closedir(dir); + return 0; + } +} diff --git a/234/regr/spec_files/server1.vol b/234/regr/spec_files/server1.vol new file mode 100644 index 0000000..29541eb --- /dev/null +++ b/234/regr/spec_files/server1.vol @@ -0,0 +1,21 @@ +###posix translator#### +volume posix1 + type storage/posix # POSIX FS translator + option directory /root/regression/234/regr/export/export1 # Export this directory +end-volume + +### threads handled by the server +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.socket.listen-port 7003 # Default is 6996 + subvolumes brick + option auth.addr.brick.allow * # Allow access to "brick" volume +end-volume diff --git a/234/regr/testcase b/234/regr/testcase new file mode 100755 index 0000000..96987b5 --- /dev/null +++ b/234/regr/testcase @@ -0,0 +1,36 @@ +#!/bin/bash + +description="# opendir system call on a symbolic link to a directory fails" +comments="# When opendir() system call is executed on a symbolic link to a directory, it gives an error" + +source ../../init + +start_glusterfs --no-clients + +sleep 5 + +gcc $SPECDIR/open_dir.c -o $SPECDIR/opendir + +mkdir $EXPORTDIR/export1/imp/ +ln -s $EXPORTDIR/export1/imp/ $EXPORTDIR/export1/link + +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 + +$SPECDIR/opendir $MOUNTDIR/client1/imp +$SPECDIR/opendir $MOUNTDIR/client1/link + +if [ $? -ne 0 ]; then + not_ok $description + comment $comments +else + ok $description + comment $comments +fi + +rm $SPECDIR/opendir $SPECDIR/booster.conf +GLUSTERFS_BOOSTER_FSTAB= +LD_PRELOAD= + +cleanup_glusterfs
\ No newline at end of file diff --git a/260/regr/spec_files/client1.vol b/260/regr/spec_files/client1.vol new file mode 100644 index 0000000..0ea4d33 --- /dev/null +++ b/260/regr/spec_files/client1.vol @@ -0,0 +1,38 @@ +volume brick-0-0-0 +type protocol/client +option transport-type tcp +option remote-host 127.0.0.1 +option remote-port 6999 +option remote-subvolume brick0 +end-volume + +volume rep-0-0 +type cluster/replicate +subvolumes brick-0-0-0 +end-volume + +volume brick-0-1-0 +type protocol/client +option transport-type tcp +option remote-host 127.0.0.1 +option remote-port 6999 +option remote-subvolume brick1 +end-volume + +volume rep-0-1 +type cluster/replicate +subvolumes brick-0-1-0 +end-volume + +volume union +type cluster/distribute +subvolumes rep-0-0 rep-0-1 +end-volume + +volume client +type performance/write-behind +option cache-size 64MB +option flush-behind on +subvolumes union +end-volume + diff --git a/260/regr/spec_files/server1.vol b/260/regr/spec_files/server1.vol new file mode 100644 index 0000000..ee956f1 --- /dev/null +++ b/260/regr/spec_files/server1.vol @@ -0,0 +1,42 @@ +volume posix0 +type storage/posix +option directory /root/regression/260/regr/export/export1 +end-volume + +volume lock0 +type features/locks +subvolumes posix0 +end-volume + +volume brick0 +type performance/io-threads +option thread-count 2 +subvolumes lock0 +end-volume + +volume posix1 +type storage/posix +option directory /root/regression/260/regr/export/export1 +end-volume + +volume lock1 +type features/locks +subvolumes posix1 +end-volume + +volume brick1 +type performance/io-threads +option thread-count 2 +subvolumes lock1 +end-volume + +volume server +type protocol/server +option transport-type tcp +option transport.socket.listen-port 6999 +option auth.addr.brick0.allow * +option auth.addr.brick1.allow * +subvolumes brick0 brick1 +end-volume + + diff --git a/260/regr/testcase b/260/regr/testcase new file mode 100755 index 0000000..5c002e5 --- /dev/null +++ b/260/regr/testcase @@ -0,0 +1,29 @@ +#!/bin/bash + +description="#ls on booster VMP results in error: File descriptor in bad state" +comments="# ls command on the VMP gives ls: closing directory <VMP> : File descriptor in bad state as the output" + +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 +ls $MOUNTDIR/client1 2> tmpfile >/dev/null +if [ $(grep "ls: closing directory $MOUNTDIR/client1: File descriptor in bad state" tmpfile | wc -l) -ne 0 ]; then + not_ok $description + comment $comments +else + ok $description + comment $comments +fi + +GLUSTERFS_BOOSTER_FSTAB= +LD_PRELOAD= +rm tmpfile $SPECDIR/booster.conf + +cleanup_glusterfs
\ No newline at end of file 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 diff --git a/37/regr/spec_files/client1.vol b/37/regr/spec_files/client1.vol deleted file mode 100644 index 37ca3e0..0000000 --- a/37/regr/spec_files/client1.vol +++ /dev/null @@ -1,8 +0,0 @@ -volume remote1 - type protocol/client - option transport-type tcp - option remote-host 127.0.0.1 - option remote-port 9328 - option remote-subvolume brick -end-volume - diff --git a/37/regr/spec_files/server1.vol b/37/regr/spec_files/server1.vol deleted file mode 100644 index cc0dff2..0000000 --- a/37/regr/spec_files/server1.vol +++ /dev/null @@ -1,13 +0,0 @@ -volume brick - type storage/posix - option directory /jbod/regr/37/export1 -end-volume - -volume server - type protocol/server - option transport-type tcp/server - option listen-port 9328 - subvolumes brick - option auth.addr.brick.allow 127.0.0.1 -end-volume - diff --git a/37/regr/testcase b/37/regr/testcase deleted file mode 100755 index bd19896..0000000 --- a/37/regr/testcase +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2006-2009 Gluster, Inc. <http://www.gluster.com> -# This file is part of GlusterFS. -# -# GlusterFS is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published -# by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# GlusterFS is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -description="# Mount command should mimic existing practice" -comments="# It is more intuitive for unix sysadmin to have glusterfs <server>:<path> /mnt/point" - -source ../../init -start_glusterfs --no-servers --no-clients - -sleep 5 - -mount -t glusterfs 127.0.0.1:$SPECDIR/client1 $MOUNTDIR/client1 2> tmpfile -if [ $(grep "unknown volfile server port" tmpfile | wc -l) -ne 0 ];then - not_ok $description - comment $comments -else - ok $description -fi - -rm tmpfile -cleanup_glusterfs @@ -20,6 +20,12 @@ GLUSTERFS=$1 OLDDIR=`pwd` +if [ 1 -ne $# ] +then + echo "Usage: run.sh <path_to_glusterfs_binary>" + return; +fi + for i in `ls | grep "^[0-9]*$"|sort -n` do cd $i/regr |