From owner-svn-src-user@freebsd.org Fri Feb 3 12:01:30 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 4E76FCCC2F2 for ; Fri, 3 Feb 2017 12:01:30 +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 0E6BF1CA8; Fri, 3 Feb 2017 12:01:29 +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 v13C1T29055986; Fri, 3 Feb 2017 12:01:29 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13C1SJ2055982; Fri, 3 Feb 2017 12:01:28 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201702031201.v13C1SJ2055982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 3 Feb 2017 12:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r313147 - 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: Fri, 03 Feb 2017 12:01:30 -0000 Author: pho Date: Fri Feb 3 12:01:28 2017 New Revision: 313147 URL: https://svnweb.freebsd.org/changeset/base/313147 Log: Do not loop for ever on pkill. Style fix. Trim runtime. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/umountf.sh user/pho/stress2/misc/umountf2.sh user/pho/stress2/misc/umountf3.sh user/pho/stress2/misc/umountf5.sh Modified: user/pho/stress2/misc/umountf.sh ============================================================================== --- user/pho/stress2/misc/umountf.sh Fri Feb 3 11:51:06 2017 (r313146) +++ user/pho/stress2/misc/umountf.sh Fri Feb 3 12:01:28 2017 (r313147) @@ -56,7 +56,16 @@ umount -f $mntpoint mdconfig -d -u $mdstart rm -f $D +s=0 +n=0 while pkill -f "swap|mkdir|creat"; do sleep 1 + n=$((n + 1)) + if [ $n -gt 60 ]; then + pgrep "swap|mkdir|creat" + s=1 + break + fi done wait +exit $s Modified: user/pho/stress2/misc/umountf2.sh ============================================================================== --- user/pho/stress2/misc/umountf2.sh Fri Feb 3 11:51:06 2017 (r313146) +++ user/pho/stress2/misc/umountf2.sh Fri Feb 3 12:01:28 2017 (r313147) @@ -41,13 +41,13 @@ sed '1,/^EOF/d' < $0 > /tmp/fsx.c mycc -o /tmp/fsx -O2 /tmp/fsx.c || exit 1 -rm -f fsx.c +rm -f /tmp/fsx.c D=$diskimage dede $D 1m 1k || exit 1 mount | grep "$mntpoint" | grep md${mdstart}$part > /dev/null && umount $mntpoint -mdconfig -l | grep md${mdstart} > /dev/null && mdconfig -d -u $mdstart +mdconfig -l | grep md$mdstart > /dev/null && mdconfig -d -u $mdstart mdconfig -a -t vnode -f $D -u $mdstart bsdlabel -w md$mdstart auto @@ -59,7 +59,7 @@ for i in `jot 100`; do done sleep 30 umount -f $mntpoint & -for i in `jot 10`; do +for i in `jot 30`; do sleep 30 pgrep -q fsx || break done Modified: user/pho/stress2/misc/umountf3.sh ============================================================================== --- user/pho/stress2/misc/umountf3.sh Fri Feb 3 11:51:06 2017 (r313146) +++ user/pho/stress2/misc/umountf3.sh Fri Feb 3 12:01:28 2017 (r313147) @@ -46,13 +46,13 @@ rm -f umountf3.c cd $odir -mount | grep "$mntpoint" | grep md${mdstart} > /dev/null && umount $mntpoint -mdconfig -l | grep md${mdstart} > /dev/null && mdconfig -d -u ${mdstart} +mount | grep "$mntpoint" | grep md$mdstart > /dev/null && umount $mntpoint +mdconfig -l | grep md$mdstart > /dev/null && mdconfig -d -u $mdstart -mdconfig -a -t vnode -f $D -u ${mdstart} -bsdlabel -w md${mdstart} auto -newfs md${mdstart}${part} > /dev/null 2>&1 -mount /dev/md${mdstart}${part} $mntpoint +mdconfig -a -t vnode -f $D -u $mdstart +bsdlabel -w md$mdstart auto +newfs md${mdstart}$part > /dev/null 2>&1 +mount /dev/md${mdstart}$part $mntpoint export RUNDIR=$mntpoint/stressX for i in `jot 25`; do (cd /$mntpoint; /tmp/umountf3) & @@ -60,6 +60,8 @@ done sleep $((4 * 60)) echo "umount -f $mntpoint" umount -f $mntpoint +while pkill -f umountf3; do :; done +wait mdconfig -d -u $mdstart rm -f $D /tmp/umountf3 exit Modified: user/pho/stress2/misc/umountf5.sh ============================================================================== --- user/pho/stress2/misc/umountf5.sh Fri Feb 3 11:51:06 2017 (r313146) +++ user/pho/stress2/misc/umountf5.sh Fri Feb 3 12:01:28 2017 (r313147) @@ -57,8 +57,16 @@ umount -f $mntpoint mdconfig -d -u $mdstart rm -f $D +s=0 +n=0 while pkill -f "swap|mkdir|creat"; do sleep 1 + n=$((n + 1)) + if [ $n -gt 60 ]; then + pgrep "swap|mkdir|creat" + s=1 + break + fi done wait -exit 0 +exit $s