From owner-svn-src-user@freebsd.org Wed Jun 7 07:39:47 2017 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 9F1BABFD901 for ; Wed, 7 Jun 2017 07:39:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 6D7FA65675; Wed, 7 Jun 2017 07:39:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v577dkDi059370; Wed, 7 Jun 2017 07:39:46 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v577dk7C059369; Wed, 7 Jun 2017 07:39:46 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706070739.v577dk7C059369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 7 Jun 2017 07:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r319647 - 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.23 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: Wed, 07 Jun 2017 07:39:47 -0000 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