summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdvm/2095/testcase31
-rwxr-xr-xdvm/2287/testcase26
-rwxr-xr-xdvm/2298/testcase27
-rwxr-xr-xdvm/2567/testcase60
-rwxr-xr-xdvm/2803/testcase11
-rw-r--r--regression_helpers8
6 files changed, 160 insertions, 3 deletions
diff --git a/dvm/2095/testcase b/dvm/2095/testcase
new file mode 100755
index 0000000..a6f2eac
--- /dev/null
+++ b/dvm/2095/testcase
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+function _init ()
+{
+ source $cwd/regression_helpers;
+}
+
+function create_rdma_volume ()
+{
+ $GLUSTERFSDIR/gluster volume create $global_bug_id transport rdma $(hostname):$EXPORT_DIR/$global_bug_id/export 2>/dev/null 1>/dev/null
+ ret=$?;
+ return $ret;
+}
+
+function main ()
+{
+ create_rdma_volume;
+ op_ret=$?;
+
+ if [ $op_ret -ne 0 ]; then
+ exit 22;
+ fi
+
+ grep "option transport-type rdma" /etc/glusterd/vols/$global_bug_id/"$global_bug_id"-fuse.vol 2>/dev/null 1>/dev/null;
+
+ op_ret=$?;
+
+ exit $op_ret;
+}
+
+_init && main "$@"
diff --git a/dvm/2287/testcase b/dvm/2287/testcase
new file mode 100755
index 0000000..065d99b
--- /dev/null
+++ b/dvm/2287/testcase
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+function _init ()
+{
+ source $cwd/regression_helpers
+}
+
+function absent_volinfo ()
+{
+ $GLUSTERFSDIR/gluster volume info new_volume 2>/dev/null 1>/dev/null;
+ ret=$?;
+ return $ret;
+}
+
+function main ()
+{
+ absent_volinfo;
+ op_ret=$?;
+ if [ $op_ret -ne 0 ]; then
+ exit 0;
+ else
+ exit 1;
+ fi
+}
+
+_init && main "$@"
diff --git a/dvm/2298/testcase b/dvm/2298/testcase
new file mode 100755
index 0000000..090e006
--- /dev/null
+++ b/dvm/2298/testcase
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+function _init ()
+{
+ source $cwd/regression_helpers;
+}
+
+function remove_brick ()
+{
+ $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;
+
+ $GLUSTERFSDIR/gluster --mode=script volume remove-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;
+
+ $GLUSTERFSDIR/gluster volume info | grep "export1" 2>/dev/null 1>/dev/null;
+
+ ret=$?;
+ return $ret;
+}
+
+function main ()
+{
+ remove_brick;
+ op_ret=$?;
+ exit $op_ret;
+}
+
+_init && main "$@"
diff --git a/dvm/2567/testcase b/dvm/2567/testcase
new file mode 100755
index 0000000..3ab7262
--- /dev/null
+++ b/dvm/2567/testcase
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+function _init ()
+{
+ source $cwd/regression_helpers
+}
+
+function self_heal ()
+{
+ $GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null
+
+ $GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
+
+ mount_glusterfs $global_bug_id;
+
+ for i in $(ls /etc/glusterd/vols/$global_bug_id/run)
+ do
+ pid=$(cat /etc/glusterd/vols/$global_bug_id/run/$i);
+ kill -KILL $pid;
+ break;
+ done
+
+ sleep 1;
+
+ mknod $FUSE_MOUNT/file c 2 2;
+
+ $GLUSTERFSDIR/gluster volume start $global_bug_id force 2>/dev/null 1>/dev/null;
+ sleep 3;
+ df -h 2>/dev/null 1>/dev/null
+
+ ls -l $FUSE_MOUNT/file 2>/dev/null 1>/dev/null;
+ stat $FUSE_MOUNT/file 2>/dev/null 1>/dev/null;
+
+ sleep 2;
+}
+
+function main ()
+{
+ self_heal;
+
+ hex_major1=$(stat --printf=%t $EXPORT_DIR/$global_bug_id/export1/file);
+ hex_minor1=$(stat --printf=%t $EXPORT_DIR/$global_bug_id/export1/file);
+
+ hex_major2=$(stat --printf=%t $EXPORT_DIR/$global_bug_id/export2/file);
+ hex_minor2=$(stat --printf=%t $EXPORT_DIR/$global_bug_id/export2/file);
+
+ dec_major1=$(printf "%d" 0x$hex_major1);
+ dec_minor1=$(printf "%d" 0x$hex_minor1);
+
+ dec_major2=$(printf "%d" 0x$hex_major2);
+ dec_minor2=$(printf "%d" 0x$hex_minor2);
+
+ if [ $dec_major1 -ne $dec_major2 ] || [ $dec_minor1 -ne $dec_minor2 ]; then
+ exit 1;
+ else
+ exit 0;
+ fi
+}
+
+_init && main "$@"
diff --git a/dvm/2803/testcase b/dvm/2803/testcase
new file mode 100755
index 0000000..b2b6fbd
--- /dev/null
+++ b/dvm/2803/testcase
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+source $cwd/regression_helpers
+
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export1/export2 2>/dev/null 1>/dev/null;
+
+if [ $? -eq 0 ]; then
+ exit 1;
+else
+ exit 0;
+fi
diff --git a/regression_helpers b/regression_helpers
index e0580eb..50343d2 100644
--- a/regression_helpers
+++ b/regression_helpers
@@ -120,10 +120,12 @@ run_testcase ()
echo -n "$global_bug_id: "
ok;
fi
-
- test_kill;
- test_cleanup;
+ else
+ echo "Regression testcase for the bug $id is not present"
fi
+
+ test_kill;
+ test_cleanup;
return 0;
fi