svn commit: r319647 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Wed Jun 7 07:39:47 UTC 2017
Author: pho
Date: Wed Jun 7 07:39:46 2017
New Revision: 319647
URL: https://svnweb.freebsd.org/changeset/base/319647
Log:
Synchronize process termination.
Sponsored by: Dell EMC Isilon
Modified:
user/pho/stress2/misc/crossmp.sh
Modified: user/pho/stress2/misc/crossmp.sh
==============================================================================
--- user/pho/stress2/misc/crossmp.sh Wed Jun 7 07:38:04 2017 (r319646)
+++ user/pho/stress2/misc/crossmp.sh Wed Jun 7 07:39:46 2017 (r319647)
@@ -35,10 +35,12 @@
. ../default.cfg
mounts=15 # Number of parallel scripts
+cont=/tmp/crossmp.continue
mdstart=$mdstart # Use md unit numbers from this point
D=$diskimage
if [ $# -eq 0 ]; then
+ touch $cont
for i in `jot $mounts`; do
m=$(( i + mdstart - 1 ))
[ ! -d ${mntpoint}$m ] && mkdir ${mntpoint}$m
@@ -68,7 +70,7 @@ if [ $# -eq 0 ]; then
else
if [ $1 = find ]; then
- for i in `jot 1024`; do
+ while [ -r $cont ]; do
find ${mntpoint}* -type f > /dev/null 2>&1
done
else
@@ -76,11 +78,12 @@ else
# The test: Parallel mount and unmounts
for i in `jot 1024`; do
m=$1
- mount /dev/md${m}${part} ${mntpoint}$m
+ mount /dev/md${m}$part ${mntpoint}$m
while mount | grep -qw $mntpoint$m; do
opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-f")
umount $opt ${mntpoint}$m > /dev/null 2>&1
done
done
+ rm -f $cont
fi
fi
More information about the svn-src-user
mailing list