Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2017 10:30:24 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r315296 - user/pho/stress2/misc
Message-ID:  <201703151030.v2FAUOwh075765@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Wed Mar 15 10:30:24 2017
New Revision: 315296
URL: https://svnweb.freebsd.org/changeset/base/315296

Log:
  Limit runtime, rename test program to a unique name and do not loop forever
  on umount.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/fts.sh

Modified: user/pho/stress2/misc/fts.sh
==============================================================================
--- user/pho/stress2/misc/fts.sh	Wed Mar 15 10:24:35 2017	(r315295)
+++ user/pho/stress2/misc/fts.sh	Wed Mar 15 10:30:24 2017	(r315296)
@@ -37,9 +37,9 @@
 
 here=`pwd`
 cd /tmp
-sed '1,/^EOF/d' < $here/$0 > fts.c
-mycc -o fts -Wall -Wextra fts.c
-rm -f fts.c
+sed '1,/^EOF/d' < $here/$0 > fts1.c
+mycc -o fts1 -Wall -Wextra fts1.c || exit 1
+rm -f fts1.c
 cd $here
 
 mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
@@ -53,23 +53,25 @@ newfs $newfs_flags md${mdstart}$part > /
 mount /dev/md${mdstart}$part $mntpoint
 chmod 777 $mntpoint
 
-export runRUNTIME=30m
+export runRUNTIME=20m
 export RUNDIR=$mntpoint/stressX
 
 su $testuser -c 'cd ..; ./run.sh marcus.cfg' > /dev/null &
 pid=$!
 while kill -0 $pid 2> /dev/null; do
-	/tmp/fts $mntpoint
+	/tmp/fts1 $mntpoint
 	sleep 1
 done
 wait
 
-while mount | grep $mntpoint | grep -q /dev/md; do
-	umount $mntpoint || sleep 1
+s=0
+for i in `jot 6`; do
+	umount $mntpoint && break || sleep 10
 done
+[ $i -eq 6 ] && s=1
 mdconfig -d -u $mdstart
-rm -f /tmp/fts
-exit
+rm -f /tmp/fts1
+exit $s
 EOF
 #include <sys/param.h>
 #include <err.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703151030.v2FAUOwh075765>