From owner-svn-src-user@freebsd.org Mon Oct 24 08:00:01 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 23E72C1F530 for ; Mon, 24 Oct 2016 08:00:01 +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 E5470179A; Mon, 24 Oct 2016 08:00:00 +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 u9O7xxJQ009278; Mon, 24 Oct 2016 07:59:59 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7xxoY009277; Mon, 24 Oct 2016 07:59:59 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240759.u9O7xxoY009277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307852 - 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: Mon, 24 Oct 2016 08:00:01 -0000 Author: pho Date: Mon Oct 24 07:59:59 2016 New Revision: 307852 URL: https://svnweb.freebsd.org/changeset/base/307852 Log: Added a time out. Style fixes. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/newfs2.sh Modified: user/pho/stress2/misc/newfs2.sh ============================================================================== --- user/pho/stress2/misc/newfs2.sh Mon Oct 24 07:58:15 2016 (r307851) +++ user/pho/stress2/misc/newfs2.sh Mon Oct 24 07:59:59 2016 (r307852) @@ -39,12 +39,14 @@ size=$((32 * 1024 * 1024)) mount | grep "$mntpoint" | grep -q md${mdstart}$part && umount $mntpoint [ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +start=`date '+%s'` while [ $size -le $((900 * 1024 * 1024)) ]; do mb=$((size / 1024 / 1024)) rm -f $diskimage dd if=/dev/zero of=$diskimage bs=1m count=$mb 2>&1 | egrep -v "records|transferred" - mdconfig -a -t vnode -f $diskimage -u $mdstart + mdconfig -a -t vnode -f $diskimage -u $mdstart || + { rm $diskimage; exit 1; } bsdlabel -w md$mdstart auto newfs -b 32768 -f 4096 -O2 md${mdstart}$part > /dev/null 2>&1 mount /dev/md${mdstart}$part $mntpoint @@ -58,5 +60,11 @@ while [ $size -le $((900 * 1024 * 1024)) done mdconfig -d -u $mdstart size=$((size + 32 * 1024 * 1024)) + if [ $((`date '+%s'` - start)) -gt 1800 ]; then + echo "Timed out" + s=1 + break + fi done rm -f $diskimage +return $s