Date: Tue, 18 Aug 2015 12:26:38 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r286884 - user/pho/stress2/misc Message-ID: <201508181226.t7ICQcgX010226@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508181226.t7ICQcgX010226>