diff options
author | M S Vishwanath Bhat <vishwanath@gluster.com> | 2011-12-29 16:07:59 +0530 |
---|---|---|
committer | M S Vishwanath Bhat <vishwanath@gluster.com> | 2012-01-04 16:07:50 +0530 |
commit | 5bccd0854462ca3b774373d48bd0d49e77f4137a (patch) | |
tree | 3cfb7087f8b0b1fc28579a4b2963b80f2d9cc81a /dvm | |
parent | 6b24e7071e764a2032288578bcebeb90cdea5412 (diff) |
BUG:2720 -- Checks whether large value of bs*count value in volume top read/write-perf blocks glusterd.
Change-Id: Ia0c94510301c575114c691e78f856085688b245e
BUG: 2720
Signed-off-by: M S Vishwanath Bhat <vishwanath@gluster.com>
Diffstat (limited to 'dvm')
-rwxr-xr-x | dvm/2720/testcase | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dvm/2720/testcase b/dvm/2720/testcase new file mode 100755 index 0000000..a3a9e58 --- /dev/null +++ b/dvm/2720/testcase @@ -0,0 +1,41 @@ +#!/bin/bash + + +function create_data_on_mountpoint () +{ + for i in {1..100} + do + dd if=/dev/zero of=$FUSE_MOUNT/$i bs=128K count=100 2>/dev/null 1>/dev/null; + dd if=$FUSE_MOUNT/$i of=/dev/null bs=128K count=100 2>/dev/null 1>/dev/null; + done +} + + +function check_glusterd_blockage () +{ + $GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 --mode=script 2>/dev/null 1>/dev/null; + $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null; + sleep 2 + + #'write/read perf' require latency-measurement to be on, in order to capture throughput of files + $GLUSTERFSDIR/gluster volume set $global_bug_id latency-measurement on 2>/dev/null 1>/dev/null; + + mount_glusterfs $global_bug_id + sleep 2 + create_data_on_mountpoint; + + $GLUSTERFSDIR/gluster volume top $global_bug_id read-perf bs 20480000000000 count 10000 brick $(hostname):$EXPORT_DIR/$global_bug_id/brick1 2>/dev/null 1>/dev/null; + ret1=$?; + + $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 20480000000000 count 10000 brick $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null; + ret2=$?; + + if [ $ret1 -eq 0 ] && [ $ret2 -eq 0 ]; then + return 0 + else + return 1 + fi +} + + +source $cwd/regression_helpers; check_glusterd_blockage |