From a29da31f9851c4d0ed0cc7e361a64864c2845ed1 Mon Sep 17 00:00:00 2001 From: Rahul C S Date: Wed, 4 Jan 2012 14:57:22 +0530 Subject: Check for gsyncd crash during directory crawl Create multiple directories & do directory crawl on the mount point to check if there is any crash by checking gsyncd process Change-Id: I96d27b7fde784772667c75705648a5d48616965a BUG: 764072 Signed-off-by: Rahul C S --- dvm/764072/testcase | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 dvm/764072/testcase (limited to 'dvm') diff --git a/dvm/764072/testcase b/dvm/764072/testcase new file mode 100755 index 0000000..3748820 --- /dev/null +++ b/dvm/764072/testcase @@ -0,0 +1,44 @@ +#!/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; + +sleep 10; +#start gsyncd first +$GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id start &> /dev/null +if [ $? -ne 0 ]; then + exit 255; +fi + +sleep 10; + +ps aux | grep gsyncd.py | grep monitor &> /dev/null; +if [ $? -ne 0 ]; then + exit 255; +fi + +mkdir -p $FUSE_MOUNT/dir/dir{1..2}; +touch $FUSE_MOUNT/file{1..2}; + +sleep 5; + +ls -l $FUSE_MOUNT/* &> /dev/null; + +sleep 5; + +ps aux | grep gsyncd.py | grep monitor &> /dev/null; +if [ $? -ne 0 ]; then + $GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null + rm -rf /tmp/$global_bug_id &> /dev/null + exit 255; +else + $GLUSTERFSDIR/gluster volume geo-replication $global_bug_id /tmp/$global_bug_id stop &> /dev/null + rm -rf /tmp/$global_bug_id &> /dev/null + exit 0; +fi -- cgit