Date: Sun, 8 Mar 2015 07:39:18 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r279771 - user/pho/stress2/misc Message-ID: <201503080739.t287dIvV064102@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Sun Mar 8 07:39:17 2015 New Revision: 279771 URL: https://svnweb.freebsd.org/changeset/base/279771 Log: Change test to ensure a 5 minute runtime. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/devfs.sh user/pho/stress2/misc/nullfs.sh Modified: user/pho/stress2/misc/devfs.sh ============================================================================== --- user/pho/stress2/misc/devfs.sh Sun Mar 8 07:37:19 2015 (r279770) +++ user/pho/stress2/misc/devfs.sh Sun Mar 8 07:39:17 2015 (r279771) @@ -32,13 +32,14 @@ . ../default.cfg -mounts=10 # Number of parallel scripts -D=/usr/tmp/diskimage +mounts=15 # Number of parallel scripts +cont=/tmp/devfs.continue 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 + mount | grep -q "on ${mntpoint}$i " && umount ${mntpoint}$i done # start the parallel tests @@ -52,19 +53,21 @@ if [ $# -eq 0 ]; then done else if [ $1 = find ]; then - for i in `jot 64`; do + while [ -r $cont ]; do find ${mntpoint}* -maxdepth 1 -type f > /dev/null 2>&1 done else # The test: Parallel mount and unmounts - for i in `jot 64`; do + start=`date '+%s'` + while [ `date '+%s'` -lt $((start + 300)) ]; do m=$1 mount -t devfs none ${mntpoint}$m opt=`[ $(( m % 2 )) -eq 0 ] && echo -f` - while mount | grep -q ${mntpoint}$m; do + while mount | grep -q " ${mntpoint}$m "; do umount $opt ${mntpoint}$m > /dev/null 2>&1 done done + rm -f $cont fi fi Modified: user/pho/stress2/misc/nullfs.sh ============================================================================== --- user/pho/stress2/misc/nullfs.sh Sun Mar 8 07:37:19 2015 (r279770) +++ user/pho/stress2/misc/nullfs.sh Sun Mar 8 07:39:17 2015 (r279771) @@ -36,11 +36,13 @@ . ../default.cfg mounts=15 # Number of parallel scripts +cont=/tmp/nullfs.continue if [ $# -eq 0 ]; then + touch $cont for i in `jot $mounts`; do [ ! -d ${mntpoint}$i ] && mkdir ${mntpoint}$i - mount | grep "$mntpoint" | grep -q ${mntpoint}$i && umount ${mntpoint}$i + mount | grep -q " ${mntpoint}$i " && umount ${mntpoint}$i done # start the parallel tests @@ -59,12 +61,14 @@ if [ $# -eq 0 ]; then else # The test: Parallel mount and unmounts - for i in `jot 1024`; do + start=`date '+%s'` + while [ `date '+%s'` -lt $((start + 300)) ]; do m=$1 mount_nullfs /tmp ${mntpoint}$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 + umount $opt ${mntpoint}$m > /dev/null 2>&1 done done + rm -f $cont fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503080739.t287dIvV064102>