From owner-svn-src-user@FreeBSD.ORG Thu Mar 5 09:47:00 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7C0CF73; Thu, 5 Mar 2015 09:47:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7B9BCA47; Thu, 5 Mar 2015 09:47:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259l0Kr046221; Thu, 5 Mar 2015 09:47:00 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259l0cC046219; Thu, 5 Mar 2015 09:47:00 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201503050947.t259l0cC046219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 5 Mar 2015 09:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r279641 - 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.18-1 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: Thu, 05 Mar 2015 09:47:00 -0000 Author: pho Date: Thu Mar 5 09:46:59 2015 New Revision: 279641 URL: https://svnweb.freebsd.org/changeset/base/279641 Log: Added /etc/exports check, fixed trailing white space errors and use $part for partition name. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/nfs2.sh Modified: user/pho/stress2/misc/nfs2.sh ============================================================================== --- user/pho/stress2/misc/nfs2.sh Thu Mar 5 09:41:49 2015 (r279640) +++ user/pho/stress2/misc/nfs2.sh Thu Mar 5 09:46:59 2015 (r279641) @@ -34,10 +34,12 @@ . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +grep -q $mntpoint /etc/exports || + { echo "$mntpoint missing from /etc/exports"; exit 0; } [ -x /sbin/mount_msdosfs ] || exit D=$diskimage -dede $D 1m 128 || exit +dede $D 1m 128 || exit mount | grep "${mntpoint}2" | grep nfs > /dev/null && umount -f ${mntpoint}2 mount | grep "$mntpoint" | grep /md > /dev/null && umount -f ${mntpoint} @@ -46,8 +48,8 @@ mdconfig -l | grep -q ${mdstart} && md mdconfig -a -t vnode -f $D -u $mdstart bsdlabel -w md${mdstart} auto -newfs_msdos -F 16 -b 8192 /dev/md${mdstart}a > /dev/null -mount -t msdosfs -o rw /dev/md${mdstart}a $mntpoint +newfs_msdos -F 16 -b 8192 /dev/md${mdstart}$part > /dev/null +mount -t msdosfs -o rw /dev/md${mdstart}$part $mntpoint mkdir ${mntpoint}/stressX chmod 777 ${mntpoint}/stressX @@ -55,12 +57,13 @@ chmod 777 ${mntpoint}/stressX [ ! -d ${mntpoint}2 ] && mkdir ${mntpoint}2 chmod 777 ${mntpoint}2 -mount -t nfs -o tcp -o retrycnt=3 -o intr -o soft -o rw 127.0.0.1:$mntpoint ${mntpoint}2 +mount -t nfs -o tcp -o retrycnt=3 -o intr -o soft -o rw \ + 127.0.0.1:$mntpoint ${mntpoint}2 export INODES=9999 # No inodes on a msdos fs export RUNDIR=${mntpoint}2/stressX export runRUNTIME=10m # Run tests for 10 minutes -(cd ..; ./run.sh disk.cfg) +(cd ..; ./run.sh disk.cfg) umount -f ${mntpoint}2 > /dev/null 2>&1 umount -f $mntpoint > /dev/null 2>&1