svn commit: r297487 - user/pho/stress2/misc

Peter Holm pho at FreeBSD.org
Fri Apr 1 11:32:54 UTC 2016


Author: pho
Date: Fri Apr  1 11:32:52 2016
New Revision: 297487
URL: https://svnweb.freebsd.org/changeset/base/297487

Log:
  Fix error in loop and cleanup script for md2.sh
  Removed unused "cc" in md8.sh
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  user/pho/stress2/misc/md2.sh
  user/pho/stress2/misc/md8.sh

Modified: user/pho/stress2/misc/md2.sh
==============================================================================
--- user/pho/stress2/misc/md2.sh	Fri Apr  1 09:07:18 2016	(r297486)
+++ user/pho/stress2/misc/md2.sh	Fri Apr  1 11:32:52 2016	(r297487)
@@ -34,20 +34,23 @@
 
 . ../default.cfg
 
-mount | grep "$mntpoint" | grep md${mdstart} > /dev/null && umount $mntpoint
-mdconfig -l | grep md${mdstart} > /dev/null &&  mdconfig -d -u ${mdstart}
+mount | grep "on $mntpoint " | grep -q md$mdstart && umount $mntpoint
+[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart
 
-mdconfig -a -t malloc -s 256m -u ${mdstart}
+mdconfig -a -t malloc -s 256m -u $mdstart
 
+export RUNDIR=$mntpoint/stressX
+export runRUNTIME=10m
 for i in 1 2; do
-	newfs -O$i -i1024 /dev/md${mdstart} > /dev/null 2>&1
-	mount /dev/md${mdstart} ${mntpoint}
-	df -i $mntpoint
-
-	export RUNDIR=$mntpoint/stressX
-	export runRUNTIME=10m
-	cd ..; ./run.sh
-
-	umount ${mntpoint}
+	echo "newfs -O$i -i1024 /dev/md$mdstart"
+	newfs -O$i -i1024 /dev/md$mdstart > /dev/null 2>&1
+	mount /dev/md$mdstart $mntpoint
+
+	(cd ..; ./run.sh)
+
+	while true; do
+		umount $mntpoint && break
+	done
 done
 mdconfig -d -u $mdstart
+exit 0

Modified: user/pho/stress2/misc/md8.sh
==============================================================================
--- user/pho/stress2/misc/md8.sh	Fri Apr  1 09:07:18 2016	(r297486)
+++ user/pho/stress2/misc/md8.sh	Fri Apr  1 11:32:52 2016	(r297487)
@@ -52,9 +52,7 @@ rm -f /tmp/md8
 mycc -o md8 -Wall -Wextra -g -O2 md8.c || exit 1
 rm -f md8.c
 
-cc -o /tmp/fstool $odir/../tools/fstool.c || exit 1
 cd $odir
-
 trap "rm -f $diskimage" EXIT INT
 dd if=/dev/zero of=$diskimage bs=1m count=50 2>&1 | \
     egrep -v 'records|transferred'


More information about the svn-src-user mailing list