summaryrefslogtreecommitdiffstats
path: root/dvm
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-03-15 23:51:56 -0700
committerVijay Bellur <vijay@gluster.com>2011-03-17 12:17:27 +0530
commit7b57d9ff49a55a5d43edf406fc793c193fb5a898 (patch)
treea6fa38b8c5a8ef0253fa36258fe83196c7d7379c /dvm
parentff62dce1d7171ba3c400f5e391a865ca53bf3904 (diff)
add test case for bug 2369 and use bug id as the volume name in all testcases
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'dvm')
-rwxr-xr-xdvm/2010/testcase5
-rwxr-xr-xdvm/2140/testcase3
-rwxr-xr-xdvm/2294/testcase3
-rwxr-xr-xdvm/2369/testcase43
4 files changed, 47 insertions, 7 deletions
diff --git a/dvm/2010/testcase b/dvm/2010/testcase
index cdc3055..d14f338 100755
--- a/dvm/2010/testcase
+++ b/dvm/2010/testcase
@@ -2,10 +2,9 @@
source ./regression_helpers
-VOLNAME="vol";
-$GLUSTERFSDIR/gluster volume create $VOLNAME $(hostname):$EXPORT_DIR/$global_bug_id/export1 2>/dev/null 1>/dev/null;
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 2>/dev/null 1>/dev/null;
-$GLUSTERFSDIR/gluster --mode=script volume stop $VOLNAME | grep "started state" 2>/dev/null 1>/dev/null;
+$GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id | grep "started state" 2>/dev/null 1>/dev/null;
exit $?;
diff --git a/dvm/2140/testcase b/dvm/2140/testcase
index cc7ec09..34b7d5e 100755
--- a/dvm/2140/testcase
+++ b/dvm/2140/testcase
@@ -2,8 +2,7 @@
source ./regression_helpers
-VOLNAME="abcdefg";
-$GLUSTERFSDIR/gluster volume delete $VOLNAME --mode=script | grep -i "exist" 2>/dev/null 1>/dev/null
+$GLUSTERFSDIR/gluster volume delete $global_bug_id --mode=script | grep -i "exist" 2>/dev/null 1>/dev/null
exit $?;
diff --git a/dvm/2294/testcase b/dvm/2294/testcase
index c363897..b0d8674 100755
--- a/dvm/2294/testcase
+++ b/dvm/2294/testcase
@@ -2,8 +2,7 @@
source ./regression_helpers
-VOLNAME="vol";
-$GLUSTERFSDIR/gluster volume create $VOLNAME transport tcp,rdma $(hostname):$EXPORT_DIR/$global_bug_id/export1 2>/dev/null 1>/dev/null
+$GLUSTERFSDIR/gluster volume create $global_bug_id transport tcp,rdma $(hostname):$EXPORT_DIR/$global_bug_id/export1 2>/dev/null 1>/dev/null
exit $?;
diff --git a/dvm/2369/testcase b/dvm/2369/testcase
new file mode 100755
index 0000000..f25af14
--- /dev/null
+++ b/dvm/2369/testcase
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+source ./regression_helpers
+
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 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;
+
+touch $FUSE_MOUNT/{1..22};
+chown 1315:1315 $FUSE_MOUNT/{1..22};
+
+mkdir $EXPORT_DIR/$global_bug_id/export2;
+
+$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;
+
+$GLUSTERFSDIR/gluster volume rebalance $global_bug_id start 2>/dev/null 1>/dev/nullx;
+
+status=0;
+while [ $status -ne 1 ]
+do
+ status=$($GLUSTERFSDIR/gluster volume rebalance $global_bug_id status | grep "rebalance completed" | wc -l);
+ sleep 1;
+done
+
+ret=0;
+for entries in $(ls $EXPORT_DIR/$global_bug_id/export2)
+do
+ if [ $(stat --printf=%u $EXPORT_DIR/$global_bug_id/export2/$entries | grep 1315 | wc -l) -ne 1 ]; then
+ ret=22;
+ break;
+ fi
+done
+
+defrag=$(mount | grep /etc/glusterd/mount/$global_bug_id | wc -l);
+if [ $defrag -eq 1 ]; then
+ umount /etc/glusterd/mount/$global_bug_id 2>/dev/null 1>/dev/null;
+fi
+
+exit $ret;