Date: Sun, 28 Jul 2013 09:57:42 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r253741 - user/pho/stress2/misc Message-ID: <201307280957.r6S9vgFh095989@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Sun Jul 28 09:57:42 2013 New Revision: 253741 URL: http://svnweb.freebsd.org/changeset/base/253741 Log: Improve the way cleanup is done for the tests. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/cleanup.sh Modified: user/pho/stress2/misc/cleanup.sh ============================================================================== --- user/pho/stress2/misc/cleanup.sh Sun Jul 28 07:58:34 2013 (r253740) +++ user/pho/stress2/misc/cleanup.sh Sun Jul 28 09:57:42 2013 (r253741) @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2008 Peter Holm <pho@FreeBSD.org> +# Copyright (c) 2008-2013 Peter Holm <pho@FreeBSD.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,17 +32,21 @@ . ../default.cfg -[ ! -z "$mntpoint" ] && rm -rf ${mntpoint}*/* +mount | grep -wq $mntpoint && umount -f $mntpoint +rm -rf ${mntpoint}/stressX* rm -f /tmp/.snap/pho* /var/.snap/pho* -rm -rf /tmp/stressX.control +rm -rf /tmp/stressX.control $RUNDIR /tmp/misc.name +mkdir -p $RUNDIR +chmod 0777 $RUNDIR -mount | grep -wq $mntpoint && umount $mntpoint +for i in `jot 16 0 | sort -nr` ""; do + while mount | grep -q "${mntpoint}$i "; do + fstat ${mntpoint}$i | sed 1d | awk '{print $3}' | xargs kill + umount -f ${mntpoint}$i > /dev/null 2>&1 + done +done m=$mdstart for i in `jot 15`; do - while mount | grep -q ${mntpoint}$m; do - rm -rf ${mntpoint}$m - umount -f ${mntpoint}$m > /dev/null 2>&1 - done - mdconfig -l | grep -q md$m && mdconfig -d -u $m - m=$((m + 1)) + mdconfig -l | grep -q md$m && mdconfig -d -u $m + m=$((m + 1)) done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307280957.r6S9vgFh095989>