Date: Thu, 29 Dec 2011 18:17:12 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r228964 - projects/stress2/misc Message-ID: <201112291817.pBTIHCtY067127@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Thu Dec 29 18:17:12 2011 New Revision: 228964 URL: http://svn.freebsd.org/changeset/base/228964 Log: Use global configuration file and limit run time to 30 minutes. Modified: projects/stress2/misc/snap5.sh projects/stress2/misc/snap7.sh Modified: projects/stress2/misc/snap5.sh ============================================================================== --- projects/stress2/misc/snap5.sh Thu Dec 29 17:46:24 2011 (r228963) +++ projects/stress2/misc/snap5.sh Thu Dec 29 18:17:12 2011 (r228964) @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2008 Peter Holm <pho@FreeBSD.org> +# Copyright (c) 2008, 2011 Peter Holm <pho@FreeBSD.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,23 +30,28 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -[ ! -d /mnt2 ] && mkdir /mnt2 -mount | grep "/dev/md0 on /mnt2" > /dev/null && umount /mnt2 -mdconfig -l | grep md0 > /dev/null && mdconfig -d -u 0 +. ../default.cfg + +mount | grep -q /tmp || exit 1 # /tmp must be a mount point for this test +mnt2=${mntpoint}2 +[ ! -d $mnt2 ] && mkdir $mnt2 +mount | grep -q "/dev/md$mdstart on $mnt2" && umount $mnt2 +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart rm -f /tmp/.snap/pho trap "rm -f /tmp/.snap/pho" 0 -for i in `jot 64`; do +start=`date '+%s'` +while [ `date '+%s'` -lt $((start + 1800)) ]; do date '+%T' mksnap_ffs /tmp /tmp/.snap/pho - mdconfig -a -t vnode -f /tmp/.snap/pho -u 0 -o readonly - mount -o ro /dev/md0 /mnt2 + mdconfig -a -t vnode -f /tmp/.snap/pho -u $mdstart -o readonly + mount -o ro /dev/md$mdstart $mnt2 - ls -l /mnt2 > /dev/null + ls -l $mnt2 > /dev/null r=`head -c4 /dev/urandom | od -N2 -tu4 | sed -ne '1s/ *$//;1s/.* //p'` sleep $(( r % 120 )) - umount /mnt2 - mdconfig -d -u 0 + umount $mnt2 + mdconfig -d -u $mdstart rm -f /tmp/.snap/pho done Modified: projects/stress2/misc/snap7.sh ============================================================================== --- projects/stress2/misc/snap7.sh Thu Dec 29 17:46:24 2011 (r228963) +++ projects/stress2/misc/snap7.sh Thu Dec 29 18:17:12 2011 (r228964) @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2008 Peter Holm <pho@FreeBSD.org> +# Copyright (c) 2008, 2011 Peter Holm <pho@FreeBSD.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,24 +30,27 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +. ../default.cfg + # Test with unmount and paralless access to mountpoint # 20070508 page fault in g_io_request+0xa6 -mount | grep "/dev/md0 on /mnt" > /dev/null && umount /mnt +mount | grep -q "/dev/md$mdstart on $mntpoint" && umount $mntpoint rm -f /tmp/.snap/pho.1 trap "rm -f /tmp/.snap/pho.1" 0 -mount | grep "/mnt" | grep md0 > /dev/null && umount /mnt -mdconfig -l | grep -q md0 && mdconfig -d -u 0 +mount | grep "$mntpoint" | grep -q md$mdstart && umount $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart -for i in `jot 64`; do +start=`date '+%s'` +while [ `date '+%s'` -lt $((start + 1800)) ]; do mksnap_ffs /tmp /tmp/.snap/pho.1 - mdconfig -a -t vnode -f /tmp/.snap/pho.1 -u 0 -o readonly - sh -c "while true; do ls /mnt > /dev/null;done" & + mdconfig -a -t vnode -f /tmp/.snap/pho.1 -u $mdstart -o readonly + sh -c "while true; do ls $mntpoint > /dev/null;done" & for i in `jot 64`; do - mount -o ro /dev/md0 /mnt - umount /mnt + mount -o ro /dev/md$mdstart $mntpoint + umount $mntpoint done kill $! - mdconfig -d -u 0 + mdconfig -d -u $mdstart rm -f /tmp/.snap/pho.1 done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112291817.pBTIHCtY067127>