summaryrefslogtreecommitdiffstats
path: root/dvm
diff options
context:
space:
mode:
authorM S Vishwanath Bhat <vishwanath@gluster.com>2011-12-26 17:02:12 +0530
committerM S Vishwanath Bhat <vishwanath@gluster.com>2012-02-03 14:47:58 +0530
commit7b96d64f4ed1a969d1cb6fd08954369c892b56c8 (patch)
tree332fcf2f7db58ffdb7fa8e6ad0821aedf800bd3a /dvm
parent060e2ec30d1f38f225bcb9298e23661a1a65d3f5 (diff)
BUG:2721 -- Checks for correct validation message in volume top commands
Change-Id: I90986f41e812de55cd5cf6ee1402a5d580b88ecc BUG: 2721 Signed-off-by: M S Vishwanath Bhat <vishwanath@gluster.com>
Diffstat (limited to 'dvm')
-rwxr-xr-xdvm/2721/testcase22
1 files changed, 22 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