summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdvm/2721/testcase22
-rwxr-xr-xdvm/763924/testcase81
-rwxr-xr-xdvm/765090/testcase63
3 files changed, 166 insertions, 0 deletions
diff --git a/dvm/2721/testcase b/dvm/2721/testcase
new file mode 100755
index 0000000..0339801
--- /dev/null
+++ b/dvm/2721/testcase
@@ -0,0 +1,22 @@
+#!/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;
+
+$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 46237546437865783 count 10 list-cnt 10 | grep "block size is an invalid number" 2>/dev/null 1>/dev/null;
+temp1=$?;
+
+$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 2048 count 9999999929743758437 | grep "count is an invalid number" 2>/dev/null 1>/dev/null;
+temp2=$?;
+
+$GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 2048 list-cnt 10 | grep "Usage: volume top" 2>/dev/null 1>/dev/null ;
+temp3=$?;
+
+if [ $temp3 -eq 0 ] && [ $temp2 -eq 0 ] && [ $temp1 -eq 0 ];then
+ exit 0;
+else
+ exit 1;
+fi
diff --git a/dvm/763924/testcase b/dvm/763924/testcase
new file mode 100755
index 0000000..cee5c1f
--- /dev/null
+++ b/dvm/763924/testcase
@@ -0,0 +1,81 @@
+#!/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\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick3\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick4\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick5\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick6\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick7\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick8\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick9\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick10 1>/dev/null 2>/dev/null
+
+ret=$?
+
+if [ $ret -ne 0 ]; then
+ exit 1
+fi
+
+# check the brick ordering first
+# i.e. Brick1:$(hostname):$EXPORT_DIR/$global_bug_id/brick1 so on..
+
+for i in {1..10}
+do
+ gluster volume info $global_bug_id | grep Brick[0-9].|\
+ cut -d ":" -f 1,3|grep "Brick$i:$EXPORT_DIR/$global_bug_id/brick$i"\
+ 1>/dev/null 2>/dev/null
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+done
+
+# Remove some of the bricks
+$GLUSTERFSDIR/gluster --mode=script volume remove-brick $global_bug_id\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick5\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick6\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick7\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick8\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick9\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick10\
+ 1>/dev/null 2>/dev/null
+
+ret=$?
+
+if [ $ret -ne 0 ]; then
+ exit 1
+fi
+
+# add same bricks in the same order and
+# check whether order is preserved
+$GLUSTERFSDIR/gluster volume add-brick $global_bug_id \
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick5\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick6\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick7\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick8\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick9\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick10\
+ 1>/dev/null 2>/dev/null
+
+ret=$?
+
+if [ $ret -ne 0 ]; then
+ exit 1
+fi
+
+# Now check the order of the bricks
+
+for i in {1..10}
+do
+ gluster volume info $global_bug_id | grep Brick[0-9].|\
+ cut -d ":" -f 1,3|grep "Brick$i:$EXPORT_DIR/$global_bug_id/brick$i"\
+ 1>/dev/null 2>/dev/null
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+done
+
+exit 0
diff --git a/dvm/765090/testcase b/dvm/765090/testcase
new file mode 100755
index 0000000..6faa645
--- /dev/null
+++ b/dvm/765090/testcase
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+source $cwd/regression_helpers
+
+exit_if_err()
+{
+ if [ $1 -ne 0 ]; then
+ exit 1
+ fi
+}
+
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1\
+ 1>/dev/null 2>/dev/null
+
+
+exit_if_err $?
+
+
+$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null
+sleep 5
+
+mount_glusterfs $global_bug_id
+
+for i in {1..100}
+do
+ dd if=/dev/urandom of=$FUSE_MOUNT/$i count=1000 bs=1024 2>/dev/null 1>/dev/null
+done
+
+cd $FUSE_MOUNT
+
+for i in {101..300}
+do
+ mkdir $i
+ cd $i
+ touch $i
+done
+
+cd $FUSE_MOUNT
+
+$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick2\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick3 1>/dev/null 2>/dev/null
+
+$GLUSTERFSDIR/gluster volume rebalance $global_bug_id start 1>/dev/null 2>/dev/null
+sleep 3
+
+# Now try to stop the volume
+# This operation should fail
+$GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id\
+ | grep "rebalance session is in progress for the volume '$global_bug_id'"\
+ 1>/dev/null 2>/dev/null
+exit_if_err $?
+
+
+# stop with force
+# This should stop the volume
+$GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id force \
+ | grep "Stopping volume $global_bug_id has been successful" 1>/dev/null 2>/dev/null
+
+exit_if_err $?
+
+exit 0
+
+