diff options
author | Raghavendra Bhat <raghavendrabhat@dev.gluster.com> | 2010-01-28 05:37:01 -0800 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2010-01-28 23:13:04 +0530 |
commit | cde88447d65708876a2967bc5aa35bc959f7199d (patch) | |
tree | 9282c8406c19ea5368eba5e793d41beb22c35809 | |
parent | f244ea2ff4f70b4165bad19f2bc6129fe57a173e (diff) |
regression testcase for bug 248
Signed-off-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r-- | 248/regr/spec_files/client1.vol | 61 | ||||
-rw-r--r-- | 248/regr/spec_files/server1.vol | 53 | ||||
-rwxr-xr-x | 248/regr/testcase | 33 |
3 files changed, 147 insertions, 0 deletions
diff --git a/248/regr/spec_files/client1.vol b/248/regr/spec_files/client1.vol new file mode 100644 index 0000000..7f1174c --- /dev/null +++ b/248/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 7001 # 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
\ No newline at end of file diff --git a/248/regr/spec_files/server1.vol b/248/regr/spec_files/server1.vol new file mode 100644 index 0000000..b81cf93 --- /dev/null +++ b/248/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/work/regression.git/248/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 7001 # 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 # 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
\ No newline at end of file diff --git a/248/regr/testcase b/248/regr/testcase new file mode 100755 index 0000000..37d7780 --- /dev/null +++ b/248/regr/testcase @@ -0,0 +1,33 @@ +#!/bin/bash + +description="# Updating stats in posix is incorrect" +comments="# In POSIX, updating nr_files is not being done right. It is being incremented +even before checking return values from open() and close()." + +source ../../init + +start_glusterfs --no-servers --no-clients + +sleep 2 + +$($GLUSTERFS --run-id regr.c.$BUGID -f $SPECDIR/server1.vol -l $LOGDIR/$(hostname)-server1.log --pid-file=$PWD/server1.pid) +sleep 1 +$($GLUSTERFS --run-id regr.c.$BUGID -f $SPECDIR/client1.vol $MOUNTDIR/client1 -l $LOGDIR/$(hostname)-client1.log --pid-file=$PWD/client1.pid) + + +dbench -s -S 10 -t 10 -D $MOUNTDIR/client1 >/dev/null +cat server1.pid | xargs kill -USR1 >/dev/null +NR_FILES=$(grep 'nr_files' /tmp/glusterdump.`cat server1.pid` 2> /dev/null | cut -d"=" -f2 | grep 0 | wc -l) + +if [ $NR_FILES -ne 0 ] ; then + ok $description + comment $comments +else + not_ok $description + comment $comments +fi + +rm /tmp/glusterdump.`cat server1.pid` 2> /dev/null +cleanup_glusterfs +cat server1.pid | xargs kill -9 >/dev/null +rm *.pid >/dev/null |