diff options
-rwxr-xr-x | dvm/2059/testcase | 15 | ||||
-rwxr-xr-x | dvm/764265/testcase | 27 | ||||
-rwxr-xr-x | dvm/764548/testcase | 48 |
3 files changed, 85 insertions, 5 deletions
diff --git a/dvm/2059/testcase b/dvm/2059/testcase index 14b83e4..1dae3dd 100755 --- a/dvm/2059/testcase +++ b/dvm/2059/testcase @@ -10,13 +10,15 @@ $GLUSTERFSDIR/gluster volume start $VOLNAME 2>/dev/null 1>/dev/null; $GLUSTERFSDIR/glusterfs -s $(hostname) -p /tmp/client.pid -l /tmp/regr.log --volfile-id=$VOLNAME $FUSE_MOUNT; -FUSE_PID=`cat /tmp/client.pid` +sleep 5; -sleep 5 +FUSE_PID=`cat /tmp/client.pid`; -kill -USR1 $FUSE_PID +kill -USR1 $FUSE_PID &>/dev/null; -OUT=`grep 'xlator.mount.fuse.entry_timeout=1.000000' /tmp/glusterdump.$FUSE_PID | wc -l` +sleep 1; + +OUT=`grep "entry_timeout=1.000000" /tmp/glusterdump.$FUSE_PID.dump | wc -l` &>/dev/null; if [ "$OUT" -eq "0" ]; then RET="1"; @@ -24,5 +26,8 @@ else RET="0"; fi -rm -f /tmp/glusterdump.$FUSE_PID +rm -f /tmp/glusterdump.$FUSE_PID.dump &>/dev/null; +rm -f /tmp/client.pid &>/dev/null; +rm -f /tmp/regr.log &>/dev/null; + exit $RET; diff --git a/dvm/764265/testcase b/dvm/764265/testcase new file mode 100755 index 0000000..952dd8f --- /dev/null +++ b/dvm/764265/testcase @@ -0,0 +1,27 @@ +#!/bin/bash +source $cwd/regression_helpers +mkdir -p /tmp/$global_bug_id &> /dev/null + +#create,start and mount +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null ; +$GLUSTERFSDIR/gluster volume start $global_bug_id &>/dev/null; +mount_glusterfs $global_bug_id + +#start gsyncd first +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id start &> /dev/null; + +sleep 10; + +#stop gsyncd +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null; + +sleep 10; + +ps aux| grep gsyncd.py | grep monitor &> /dev/null +if [ $? -ne 0 ]; then + rm -rf /tmp/$global_bug_id &> /dev/null + exit 0; +else + rm -rf /tmp/$global_bug_id &> /dev/null + exit 255; +fi diff --git a/dvm/764548/testcase b/dvm/764548/testcase new file mode 100755 index 0000000..1c164d5 --- /dev/null +++ b/dvm/764548/testcase @@ -0,0 +1,48 @@ +#!/bin/bash + +source $cwd/regression_helpers; + +#create, start volume +$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 &>/dev/null; + +$GLUSTERFSDIR/gluster volume start $global_bug_id &> /dev/null; + +sleep 10; + +$GLUSTERFSDIR/gluster volume create backup $(hostname):$EXPORT_DIR/$global_bug_id/export_bak &>/dev/null; + +$GLUSTERFSDIR/gluster volume start backup &> /dev/null; + +#start gsyncd +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id :backup start &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +sleep 10; +ps aux|grep gsyncd.py | grep monitor | grep backup &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +#stop master & create, start new master volume +$GLUSTERFSDIR/gluster --mode=script volume stop $global_bug_id &> /dev/null; + +$GLUSTERFSDIR/gluster volume create newmaster $(hostname):$EXPORT_DIR/$global_bug_id/export4 $(hostname):$EXPORT_DIR/$global_bug_id/export5 &>/dev/null; + +$GLUSTERFSDIR/gluster volume start newmaster &> /dev/null; + +sleep 10; + +$GLUSTERFSDIR/gluster volume geo-replication newmaster :backup start &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +sleep 10; +ps aux|grep gsyncd.py | grep monitor | grep newmaster &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +else + exit 0; +fi |