summaryrefslogtreecommitdiffstats
path: root/dvm
diff options
context:
space:
mode:
Diffstat (limited to 'dvm')
-rwxr-xr-xdvm/2616/testcase17
-rwxr-xr-xdvm/2645/testcase42
-rwxr-xr-xdvm/3543/testcase28
-rwxr-xr-xdvm/3666/testcase31
4 files changed, 118 insertions, 0 deletions
diff --git a/dvm/2616/testcase b/dvm/2616/testcase
new file mode 100755
index 0000000..a5f79b5
--- /dev/null
+++ b/dvm/2616/testcase
@@ -0,0 +1,17 @@
+#!/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 profile $global_bug_id start | grep "Starting volume profile on $global_bug_id has been successful" 2>/dev/null 1>/dev/null;
+temp=$?;
+
+$GLUSTERFSDIR/gluster volume profile $global_bug_id stop | grep "Stopping volume profile on $global_bug_id has been successful" 2>/dev/null 1>/dev/null;
+temp1=$?;
+
+if [ $temp -eq 0 ] && [ $temp1 -eq 0 ]; then
+ exit 0;
+else
+ exit 1;
+fi
diff --git a/dvm/2645/testcase b/dvm/2645/testcase
new file mode 100755
index 0000000..9ac520b
--- /dev/null
+++ b/dvm/2645/testcase
@@ -0,0 +1,42 @@
+#!/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_volume_top_write_perf ()
+{
+ $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1 2>/dev/null 1>/dev/null;
+ $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
+ sleep 2
+
+ #latency-measurement should be on for 'top write-perf' 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;
+ create_data_on_mountpoint;
+
+ $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024 count 100 2>/dev/null 1>/dev/null;
+ ret1=$?
+
+ $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 0 count 100 | grep "block size should be an integer greater than zero" 2>/dev/null 1>/dev/null;
+ ret2=$?
+
+ $GLUSTERFSDIR/gluster volume top $global_bug_id write-perf bs 1024 count 0 | grep "count should be an integer greater than zero" 2>/dev/null 1>/dev/null;
+ ret3=$?
+
+ if [ $ret1 -eq 0 ] && [ $ret2 -eq 0 ] && [ $ret3 -eq 0 ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+source $cwd/regression_helpers; check_volume_top_write_perf
diff --git a/dvm/3543/testcase b/dvm/3543/testcase
new file mode 100755
index 0000000..7eaf202
--- /dev/null
+++ b/dvm/3543/testcase
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import subprocess
+import re
+import sys
+import os
+
+def bug(gdir):
+ cmd = gdir+'/gluster volume set help'
+ cmd_obj= subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ ret = cmd_obj.wait()
+ if ret:
+ return 1
+ else:
+ return 0
+
+def main():
+ gdir = os.environ['GLUSTERFSDIR']
+ return_status = bug(gdir)
+ if return_status:
+ #print 'unsuccess'
+ sys.exit(1)
+ else:
+ #print 'success'
+ sys.exit(0)
+
+if __name__ == '__main__':
+ main()
diff --git a/dvm/3666/testcase b/dvm/3666/testcase
new file mode 100755
index 0000000..330c3a7
--- /dev/null
+++ b/dvm/3666/testcase
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+function _init ()
+{
+ source $cwd/regression_helpers;
+}
+
+function glustershd_running ()
+{
+ $GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 --mode=script 2>/dev/null 1>/dev/null
+
+ $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
+
+ ls /etc/glusterd/glustershd/run/glustershd.pid 2>/dev/null 1>/dev/null;
+
+ if [ $? -ne 0 ]; then
+ return 2;
+ fi
+
+ $GLUSTERFSDIR/gluster volume stop $global_bug_id --mode=script 2>/dev/null 1>/dev/null;
+
+ ls /etc/glusterd/glustershd/run/glustershd.pid 2>/dev/null 1>/dev/null;
+
+ if [ $? -ne 0 ]; then
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+_init ; glustershd_running