diff options
-rwxr-xr-x | dvm/2483/testcase | 2 | ||||
-rwxr-xr-x | dvm/2606/testcase | 42 | ||||
-rwxr-xr-x | dvm/2616/testcase | 17 | ||||
-rwxr-xr-x | dvm/2628/testcase | 37 | ||||
-rwxr-xr-x | dvm/2645/testcase | 42 | ||||
-rwxr-xr-x | dvm/2719/testcase | 7 | ||||
-rwxr-xr-x | dvm/2771/testcase | 28 | ||||
-rwxr-xr-x | dvm/3666/testcase | 31 | ||||
-rwxr-xr-x | dvm/3747/testcase | 46 | ||||
-rw-r--r-- | regression_helpers | 23 |
10 files changed, 270 insertions, 5 deletions
diff --git a/dvm/2483/testcase b/dvm/2483/testcase index a0a85d2..ccedbe8 100755 --- a/dvm/2483/testcase +++ b/dvm/2483/testcase @@ -5,7 +5,7 @@ source $cwd/regression_helpers VOLNAME="vol$global_bug_id" $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null -$GLUSTERFSDIR/gluster volume create $VOLNAME replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick3 $(hostname):$EXPORT_DIR/$global_bug_id/brick4 2>/dev/null 1>/dev/null +$GLUSTERFSDIR/gluster volume create $VOLNAME replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick3 $(hostname):$EXPORT_DIR/$global_bug_id/brick4 --mode=script 2>/dev/null 1>/dev/null $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null $GLUSTERFSDIR/gluster volume start $VOLNAME 2>/dev/null 1>/dev/null diff --git a/dvm/2606/testcase b/dvm/2606/testcase new file mode 100755 index 0000000..46e548d --- /dev/null +++ b/dvm/2606/testcase @@ -0,0 +1,42 @@ +#!/bin/bash + +source $cwd/regression_helpers + +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/\ +$global_bug_id/brick 2>/dev/null 1>/dev/null; + +$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + +mount_glusterfs $global_bug_id 2>/dev/null 1>/dev/null; +sleep 2; + +for i in {1..100} +do + dd if=/dev/zero of=$FUSE_MOUNT/$i bs=128K count=100 2>/dev/null 1>/dev/null; + dd if=$FUSE_MOUNT/$i of=/dev/null bs=128K count=100 2>/dev/null 1>/dev/null; +done + + +#First few lines of volume top open/read/write contains details like brick whose +#info is being displayed,and header for each column of the list. Volume top open +#in addition will have one line info about openfds. This means that every top +#open output will have 4 lines of details along with the actual list. For top +#read/write there will be 3 lines of details. For this reason we should grep out +#those lines containing details and take line count on the actual list. + + +temp1=`$GLUSTERFSDIR/gluster volume top $global_bug_id open | grep -v "Brick:\|\ +Current open fds:\|Count\|=" | wc -l` + +temp2=`$GLUSTERFSDIR/gluster volume top $global_bug_id read | grep -v "Brick:\|\ +Count\|=" |wc -l` + +temp3=`$GLUSTERFSDIR/gluster volume top $global_bug_id write | grep -v "Brick:\|\ +Count\|=" | wc -l` + + +if [ $temp1 -eq 100 ] && [ $temp3 -eq 100 ] && [ $temp2 -eq 100 ];then + exit 0; +else + exit 1; +fi diff --git a/dvm/2616/testcase b/dvm/2616/testcase new file mode 100755 index 0000000..a5f79b5 --- /dev/null +++ b/dvm/2616/testcase @@ -0,0 +1,17 @@ +#!/bin/bash + +source $cwd/regression_helpers + +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null; + +$GLUSTERFSDIR/gluster volume profile $global_bug_id start | grep "Starting volume profile on $global_bug_id has been successful" 2>/dev/null 1>/dev/null; +temp=$?; + +$GLUSTERFSDIR/gluster volume profile $global_bug_id stop | grep "Stopping volume profile on $global_bug_id has been successful" 2>/dev/null 1>/dev/null; +temp1=$?; + +if [ $temp -eq 0 ] && [ $temp1 -eq 0 ]; then + exit 0; +else + exit 1; +fi diff --git a/dvm/2628/testcase b/dvm/2628/testcase new file mode 100755 index 0000000..800fa1a --- /dev/null +++ b/dvm/2628/testcase @@ -0,0 +1,37 @@ +#!/bin/bash + +source $cwd/regression_helpers + +$GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null; + +$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + +mount_glusterfs $global_bug_id; +sleep 2; + +for i in {1..100} +do + dd if=/dev/zero of=$FUSE_MOUNT/$i bs=128K count=100 2>/dev/null 1>/dev/null ; + dd if=$FUSE_MOUNT/$i of=/dev/null bs=128K count=100 2>/dev/null 1>/dev/null ; +done + +$GLUSTERFSDIR/gluster volume top $global_bug_id read-perf list-cnt fff | grep "list-cnt should be between 0 to 100" 2>/dev/null 1>/dev/null; +t1=$?; + +$GLUSTERFSDIR/gluster volume top $global_bug_id read-perf bs abc list-cnt 0 | grep "block size should be an integer greater than zero" 2>/dev/null 1>/dev/null; +t2=$?; + +$GLUSTERFSDIR/gluster volume top $global_bug_id read-perf bs 1024 count 1.5 list-cnt 0 | grep "count should be an integer greater than zero" 2>/dev/null 1>/dev/null; +t3=$?; + +$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 0 count 0 list-cnt 0 | grep "block size should be an integer greater than zero" 2>/dev/null 1>/dev/null; +t4=$?; + +$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf count fff list-cnt 0 | grep "count should be an integer greater than zero" 2>/dev/null 1>/dev/null; +t5=$?; + +if [ $t1 -eq 0 ] && [ $t2 -eq 0 ] && [ $t3 -eq 0 ] && [ $t4 -eq 0 ] && [ $t5 -eq 0 ]; then + exit 0; +else + exit 1; +fi diff --git a/dvm/2645/testcase b/dvm/2645/testcase new file mode 100755 index 0000000..9ac520b --- /dev/null +++ b/dvm/2645/testcase @@ -0,0 +1,42 @@ +#!/bin/bash + + +function create_data_on_mountpoint () +{ + for i in {1..100} + do + dd if=/dev/zero of=$FUSE_MOUNT/$i bs=128K count=100 2>/dev/null 1>/dev/null; + dd if=$FUSE_MOUNT/$i of=/dev/null bs=128K count=100 2>/dev/null 1>/dev/null; + done +} + + +function check_volume_top_write_perf () +{ + $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1 2>/dev/null 1>/dev/null; + $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + sleep 2 + + #latency-measurement should be on for 'top write-perf' to capture throughput of files + $GLUSTERFSDIR/gluster volume set $global_bug_id latency-measurement on 2>/dev/null 1>/dev/null; + + mount_glusterfs $global_bug_id; + create_data_on_mountpoint; + + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024 count 100 2>/dev/null 1>/dev/null; + ret1=$? + + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 0 count 100 | grep "block size should be an integer greater than zero" 2>/dev/null 1>/dev/null; + ret2=$? + + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024 count 0 | grep "count should be an integer greater than zero" 2>/dev/null 1>/dev/null; + ret3=$? + + if [ $ret1 -eq 0 ] && [ $ret2 -eq 0 ] && [ $ret3 -eq 0 ]; then + return 0 + else + return 1 + fi +} + +source $cwd/regression_helpers; check_volume_top_write_perf diff --git a/dvm/2719/testcase b/dvm/2719/testcase new file mode 100755 index 0000000..fde2977 --- /dev/null +++ b/dvm/2719/testcase @@ -0,0 +1,7 @@ +#!/bin/bash + +source $cwd/regression_helpers + +$GLUSTERFSDIR/gluster help | grep "volume top" | grep "volume top operations" 2>/dev/null 1>/dev/null; + +exit $? diff --git a/dvm/2771/testcase b/dvm/2771/testcase new file mode 100755 index 0000000..e67cb42 --- /dev/null +++ b/dvm/2771/testcase @@ -0,0 +1,28 @@ +#!/bin/bash + +source $cwd/regression_helpers + +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null; + +$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + +mount_glusterfs $global_bug_id; +sleep 2; + +for i in {1..10} +do + dd if=/dev/zero of=$FUSE_MOUNT/$i bs=128K count=100 2>/dev/null 1>/dev/null; + dd if=$FUSE_MOUNT/$i of=/dev/null bs=128K count=100 2>/dev/null 1>/dev/null; +done + +$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf list-cnt 10 bs 2048 brick $(hostname):$EXPORT_DIR/$global_bug_id/brick1 | grep "Usage: volume top" 2>/dev/null 1>/dev/null +temp1=$?; + +$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf count 100 list-cnt 10 brick $(hostname):$EXPORT_DIR/$global_bug_id/brick2 | grep "Usage: volume top" 2>/dev/null 1>/dev/null +temp2=$?; + +if [ $temp1 -eq 0 ] && [ $temp2 -eq 0 ];then + exit 0; +else + exit 1; +fi diff --git a/dvm/3666/testcase b/dvm/3666/testcase new file mode 100755 index 0000000..330c3a7 --- /dev/null +++ b/dvm/3666/testcase @@ -0,0 +1,31 @@ +#!/bin/bash + +function _init () +{ + source $cwd/regression_helpers; +} + +function glustershd_running () +{ + $GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 --mode=script 2>/dev/null 1>/dev/null + + $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + + ls /etc/glusterd/glustershd/run/glustershd.pid 2>/dev/null 1>/dev/null; + + if [ $? -ne 0 ]; then + return 2; + fi + + $GLUSTERFSDIR/gluster volume stop $global_bug_id --mode=script 2>/dev/null 1>/dev/null; + + ls /etc/glusterd/glustershd/run/glustershd.pid 2>/dev/null 1>/dev/null; + + if [ $? -ne 0 ]; then + return 0; + else + return 1; + fi +} + +_init ; glustershd_running diff --git a/dvm/3747/testcase b/dvm/3747/testcase new file mode 100755 index 0000000..12c2553 --- /dev/null +++ b/dvm/3747/testcase @@ -0,0 +1,46 @@ +#!/bin/bash + +function _init () +{ + source $cwd/regression_helpers; +} + +function backend_data () +{ + $GLUSTERFSDIR/gluster volume create --mode=script $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/export1\ + $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null; + + $GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null; + + mount_glusterfs $global_bug_id; + + sleep 1; + + $GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id &>/dev/null; + + touch $EXPORT_DIR/$global_bug_id/export1/{1..10} ; + + $GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null; + + sleep 2; + + find $FUSE_MOUNT | xargs stat &>/dev/null; + + $GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id &>/dev/null; + + rm -rf /$EXPORT_DIR/$global_bug_id/export{1,2}/*; + + touch $EXPORT_DIR/$global_bug_id/export1/{1..10} ; + + $GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null; + + sleep 2; + + find $FUSE_MOUNT | xargs stat &>/dev/null; + + stat $FUSE_MOUNT &>/dev/null; + + return $?; +} + +_init ; backend_data
\ No newline at end of file diff --git a/regression_helpers b/regression_helpers index 6cad82f..dd9ce25 100644 --- a/regression_helpers +++ b/regression_helpers @@ -80,7 +80,12 @@ start_glusterd () mount_glusterfs () { - local volname=$1; + if [ $# -lt 1 ]; then + echo "Volume name missing. Please provide gluster volume name to 'mount_glusterfs'" + exit 1 + else + local volname=$1; + fi $GLUSTERFSDIR/glusterfs --volfile-server=$(hostname) --volfile-id=$volname $FUSE_MOUNT; sleep 5; @@ -88,7 +93,12 @@ mount_glusterfs () mount_glusterfs_with_acl () { - local volname=$1; + if [ $# -lt 1 ]; then + echo "Volume name missing. Please provide gluster volume name to 'mount_glusterfs_with_acl'" + exit 1 + else + local volname=$1; + fi $GLUSTERFSDIR/glusterfs --acl --volfile-server=$(hostname) --volfile-id=$volname $FUSE_MOUNT; sleep 5; @@ -97,10 +107,15 @@ mount_glusterfs_with_acl () mount_nfs () { - local volname=$1; + if [ $# -lt 1 ]; then + echo "Volume name missing. Please provide gluster volume name to 'mount_nfs'" + exit 1 + else + local volname=$1; + fi - sleep 5; mount $(hostname):$volname $NFS_MOUNT; + sleep 5; } run_testcase () |