diff options
Diffstat (limited to 'tests/include.rc')
-rw-r--r-- | tests/include.rc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/include.rc b/tests/include.rc index 78488b37975..e6648a7ad73 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -20,12 +20,21 @@ if [ ! -f ${PWD}/tests/env.rc ]; then fi . ${PWD}/tests/env.rc +H0=${H0:=`hostname`}; # hostname +MOUNT_TYPE_FUSE="fuse.glusterfs" +GREP_MOUNT_OPT_RO="grep (ro" +GREP_MOUNT_OPT_RW="grep (rw" + case $OSTYPE in Linux) H0=${H0:=`hostname --fqdn`}; # hostname ;; +NetBSD) + MOUNT_TYPE_FUSE="puffs|perfuse|fuse.glusterfs" + GREP_MOUNT_OPT_RO="grep (read-only" + GREP_MOUNT_OPT_RW="grep -v (read-only" + ;; *) - H0=${H0:=`hostname`}; # hostname ;; esac @@ -297,6 +306,13 @@ stat -c %s /dev/null > /dev/null 2>&1 || { function cleanup() { + # unmount filesystems before killing daemons to avoid deadllocks + MOUNTPOINTS=`mount | grep "$B0/" | awk '{print $3}'` + for m in $MOUNTPOINTS; + do + umount $m + done + killall -15 glusterfs glusterfsd glusterd 2>/dev/null || true; test "x`uname -s` = "xNetBSD" && pkill -15 perfused || true # allow completion of signal handlers for SIGTERM before issue SIGKILL @@ -304,12 +320,6 @@ function cleanup() killall -9 glusterfs glusterfsd glusterd 2>/dev/null || true; test "x`uname -s` = "xNetBSD" && pkill -9 perfused || true - MOUNTPOINTS=`mount | grep "$B0/" | awk '{print $3}'` - for m in $MOUNTPOINTS; - do - umount $m - done - # unregister nfs and related services from portmapper/rpcbind ## nfs rpcinfo -d 100003 3 |