summaryrefslogtreecommitdiffstats
path: root/dvm
diff options
context:
space:
mode:
authorM S Vishwanath Bhat <vishwanath@gluster.com>2011-12-26 19:23:54 +0530
committerM S Vishwanath Bhat <vishwanath@gluster.com>2011-12-27 11:58:29 +0530
commit5034fa5e62aab648f3ada8645b98d22129785a19 (patch)
tree79e566de421bcb813ba6e54eb032c8e9ced821d6 /dvm
parentf725320ff7b98d92d6a8bab904bf784eb4542ad3 (diff)
BUG:2573 -- Checks output of volume top when the brick is specified with a trailing "/"
Change-Id: I905be9eee3d9f28d98c2c64ead5203d2c08c33b4 BUG: 2573 Signed-off-by: M S Vishwanath Bhat <vishwanath@gluster.com>
Diffstat (limited to 'dvm')
-rwxr-xr-xdvm/2573/testcase37
1 files changed, 37 insertions, 0 deletions
diff --git a/dvm/2573/testcase b/dvm/2573/testcase
new file mode 100755
index 0000000..28ce3dc
--- /dev/null
+++ b/dvm/2573/testcase
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+source $cwd/regression_helpers
+
+function cleanup ()
+{
+ rm -f $FUSE_MOUNT/{1..100}
+ umount $FUSE_MOUNT
+}
+
+$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=10 2>/dev/null 1>/dev/null;
+ dd if=/$FUSE_MOUNT/$i of=/de/null bs=128K count=10 2>/dev/null 1>/dev/null;
+done
+
+$GLUSTERFSDIR/gluster volume top $global_bug_id read brick $(hostname):$EXPORT_DIR/$global_bug_id/brick1/ | grep "volume top successful" 2>/dev/null 1>/dev/null;
+temp1=$?;
+
+$GLUSTERFSDIR/gluster volume top $global_bug_id write brick $(hostname):$EXPORT_DIR/$global_bug_id/brick2/ | grep "volume top successful" 2>/dev/null 1>/dev/null;
+temp2=$?;
+
+cleanup;
+
+if [ $temp1 -eq 0 ] && [ $temp2 -eq 0 ]; then
+ exit 0;
+else
+ exit 1;
+fi