summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-09-07 15:34:21 +0530
committerRaghavendra Bhat <raghavendrabhat@gluster.com>2011-09-07 15:34:21 +0530
commit55161435db59d7f8ab1fa14395139c511f3fdea1 (patch)
tree61d108078c623ba82190865e446b20e9cb11693a
parent76d72094cf86764a17fbd1f8a668e203c64e4144 (diff)
regression testcases for the bugs 2042 and 2503
-rwxr-xr-xdvm/2042/testcase37
-rwxr-xr-xdvm/2503/testcase40
2 files changed, 77 insertions, 0 deletions
diff --git a/dvm/2042/testcase b/dvm/2042/testcase
new file mode 100755
index 0000000..8f08c78
--- /dev/null
+++ b/dvm/2042/testcase
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+function _init ()
+{
+ source $cwd/regression_helpers;
+}
+
+function add_and_log ()
+{
+ mkdir /tmp/logs_path;
+
+ $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export 2>/dev/null 1>/dev/null;
+
+ #set the log file path for the volume
+ $GLUSTERFSDIR/gluster volume log filename $global_bug_id /tmp/logs_path 2>/dev/null 1>/dev/null;
+ $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
+ $GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;
+
+ #set the log file path for the newly added brick
+ $GLUSTERFSDIR/gluster volume log filename $global_bug_id $(hostname):$EXPOR_DIR/$global_bug_id/export2 /tmp/logs_path 2>/dev/null 1>/dev/null;
+
+ ls /tmp/logs_path | grep "export2" 2>/dev/null 1>/dev/null;
+ ret=$?;
+
+ rm -rf /tmp/logs_path 2>/dev/null 1>/dev/null;
+ return $ret;
+}
+
+function main ()
+{
+ add_and_log;
+
+ op_ret=$?;
+ exit $op_ret;
+}
+
+_init && main "$@"
diff --git a/dvm/2503/testcase b/dvm/2503/testcase
new file mode 100755
index 0000000..c6e6deb
--- /dev/null
+++ b/dvm/2503/testcase
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+source $cwd/regression_helpers
+
+mkdir -p /tmp/$global_bug_id
+#create,start and mount
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 &>/dev/null ;
+
+$GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null;
+mount_glusterfs $global_bug_id
+
+mkdir $FUSE_MOUNT/dir
+for i in {1..10};do
+ touch $FUSE_MOUNT/dir/$i.txt
+done
+
+sleep 2;
+
+$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null
+sleep 2;
+$GLUSTERFSDIR/gluster volume rebalance $global_bug_id start &> /dev/null
+sleep 10;
+rm -rf $FUSE_MOUNT/dir/*
+sleep 2;
+$GLUSTERFSDIR/gluster --mode=script volume remove-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null
+sleep 10;
+
+for i in {1..10}; do
+ touch $FUSE_MOUNT/dir/$i.txt
+done
+if [ `ls $FUSE_MOUNT/dir | wc -l` -eq 10 ]; then
+ rm -rf $FUSE_MOUNT/dir/*;
+ if [ $? -eq 0 ]; then
+ exit 0;
+ else
+ exit 127;
+ fi
+else
+ exit 127;
+fi