From owner-svn-src-user@freebsd.org Sun Mar 27 18:20:55 2016 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 1A879ADFCEB for ; Sun, 27 Mar 2016 18:20:55 +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 BD65A133E; Sun, 27 Mar 2016 18:20:54 +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 u2RIKr79027215; Sun, 27 Mar 2016 18:20:53 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2RIKrxo027214; Sun, 27 Mar 2016 18:20:53 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201603271820.u2RIKrxo027214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sun, 27 Mar 2016 18:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r297317 - 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.21 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: Sun, 27 Mar 2016 18:20:55 -0000 Author: pho Date: Sun Mar 27 18:20:53 2016 New Revision: 297317 URL: https://svnweb.freebsd.org/changeset/base/297317 Log: Add problems found, add mount point config option and clean up script. Sponsored by: EMC / Isilon Storage Division Modified: user/pho/stress2/misc/nullfs.sh Modified: user/pho/stress2/misc/nullfs.sh ============================================================================== --- user/pho/stress2/misc/nullfs.sh Sun Mar 27 18:15:43 2016 (r297316) +++ user/pho/stress2/misc/nullfs.sh Sun Mar 27 18:20:53 2016 (r297317) @@ -29,46 +29,46 @@ # # Stress test by performing parallel calls to mount and umount. Alternate -# between forced and non-forced unmounts +# between forced and non-forced unmounts. + +# https://people.freebsd.org/~pho/stress/log/kostik169.txt +# https://people.freebsd.org/~pho/stress/log/kostik487.txt [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 . ../default.cfg mounts=15 # Number of parallel scripts -cont=/tmp/nullfs.continue +: ${nullfs_srcdir:=/tmp} +: ${nullfs_dstdir:=$mntpoint} if [ $# -eq 0 ]; then - touch $cont for i in `jot $mounts`; do - [ ! -d ${mntpoint}$i ] && mkdir ${mntpoint}$i - mount | grep -q " ${mntpoint}$i " && umount ${mntpoint}$i + [ ! -d ${nullfs_dstdir}$i ] && mkdir ${nullfs_dstdir}$i + mount | grep -q " ${nullfs_dstdir}$i " && + umount ${nullfs_dstdir}$i done # start the parallel tests for i in `jot $mounts`; do ./$0 $i & done - - - for i in `jot $mounts`; do - wait - done + wait for i in `jot $mounts`; do - umount ${mntpoint}$i > /dev/null 2>&1 + umount ${nullfs_dstdir}$i > /dev/null 2>&1 done - + exit 0 else # The test: Parallel mount and unmounts start=`date '+%s'` while [ `date '+%s'` -lt $((start + 300)) ]; do m=$1 - mount_nullfs /tmp ${mntpoint}$m > /dev/null 2>&1 + mount_nullfs $nullfs_srcdir ${nullfs_dstdir}$m > \ + /dev/null 2>&1 opt=`[ $(( m % 2 )) -eq 0 ] && echo -f` - while mount | grep "$mntpoint" | grep -q ${mntpoint}$m; do - umount $opt ${mntpoint}$m > /dev/null 2>&1 + while mount | grep -q ${nullfs_dstdir}$m; do + umount $opt ${nullfs_dstdir}$m > /dev/null 2>&1 done done - rm -f $cont fi