From owner-svn-src-user@freebsd.org Tue Aug 18 12:26:39 2015 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A26929BC320 for ; Tue, 18 Aug 2015 12:26:39 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93A35CCE; Tue, 18 Aug 2015 12:26:39 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7ICQd8s010231; Tue, 18 Aug 2015 12:26:39 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7ICQcgX010226; Tue, 18 Aug 2015 12:26:38 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201508181226.t7ICQcgX010226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 18 Aug 2015 12:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r286884 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2015 12:26:39 -0000 Author: pho Date: Tue Aug 18 12:26:38 2015 New Revision: 286884 URL: https://svnweb.freebsd.org/changeset/base/286884 Log: Minor cleanup. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/crossmp.sh user/pho/stress2/misc/crossmp3.sh user/pho/stress2/misc/crossmp4.sh Modified: user/pho/stress2/misc/crossmp.sh ============================================================================== --- user/pho/stress2/misc/crossmp.sh Tue Aug 18 11:52:45 2015 (r286883) +++ user/pho/stress2/misc/crossmp.sh Tue Aug 18 12:26:38 2015 (r286884) @@ -58,9 +58,7 @@ if [ $# -eq 0 ]; then ./$0 find & done - for i in `jot $mounts`; do - wait; wait - done + wait for i in `jot $mounts`; do m=$(( i + mdstart - 1 )) Modified: user/pho/stress2/misc/crossmp3.sh ============================================================================== --- user/pho/stress2/misc/crossmp3.sh Tue Aug 18 11:52:45 2015 (r286883) +++ user/pho/stress2/misc/crossmp3.sh Tue Aug 18 12:26:38 2015 (r286884) @@ -40,6 +40,7 @@ . ../default.cfg +CONT=/tmp/crossmp3.continue N=`sysctl -n hw.ncpu` usermem=`sysctl -n hw.usermem` [ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) @@ -50,7 +51,8 @@ mounts=$N # Number of parallel scripts if [ $# -eq 0 ]; then for i in `jot $mounts`; do m=$(( i + mdstart - 1 )) - [ ! -d ${mntpoint}$m ] && mkdir ${mntpoint}$m + [ ! -d ${mntpoint}$m ] && + { mkdir ${mntpoint}$m; chmod 755 ${mntpoint}$m; } mount | grep "${mntpoint}$m" | grep -q md$m && umount ${mntpoint}$m mdconfig -l | grep -q md$m && mdconfig -d -u $m @@ -60,26 +62,23 @@ if [ $# -eq 0 ]; then done # start the parallel tests + touch $CONT for i in `jot $mounts`; do m=$(( i + mdstart - 1 )) ./$0 $m & ./$0 find & done - for i in `jot $mounts`; do - wait; wait - done + wait for i in `jot $mounts`; do m=$(( i + mdstart - 1 )) mdconfig -d -u $m - rm -f $D$m done else - touch /tmp/crossmp.continue if [ $1 = find ]; then - while [ -f /tmp/crossmp.continue ]; do + while [ -f $CONT ]; do find ${mntpoint}* -type f > /dev/null 2>&1 done else @@ -87,8 +86,8 @@ else # The test: Parallel mount and unmounts for i in `jot 3`; do m=$1 - mount /dev/md${m}${part} ${mntpoint}$m - chmod 777 ${mntpoint}$m + mount /dev/md${m}${part} ${mntpoint}$m && + chmod 777 ${mntpoint}$m export RUNDIR=${mntpoint}$m/stressX export CTRLDIR=${mntpoint}$m/stressX.control (cd ${mntpoint}$m && find . -delete) @@ -98,8 +97,9 @@ else while mount | grep -q "on ${mntpoint}$m "; do opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-f") umount $opt ${mntpoint}$m > /dev/null 2>&1 + [ -f $CONT ] || break 2 done done - rm -f /tmp/crossmp.continue + rm -f $CONT fi fi Modified: user/pho/stress2/misc/crossmp4.sh ============================================================================== --- user/pho/stress2/misc/crossmp4.sh Tue Aug 18 11:52:45 2015 (r286883) +++ user/pho/stress2/misc/crossmp4.sh Tue Aug 18 12:26:38 2015 (r286884) @@ -63,13 +63,8 @@ if [ $# -eq 0 ]; then ./$0 find & done - for i in `jot $mounts`; do - wait; wait - done + wait - for i in `jot $mounts`; do - rm -f $D$m - done while mount | grep -q "on $mntpoint "; do umount $mntpoint > /dev/null 2>&1 || sleep 1 done