Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2017 08:44:50 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r323701 - user/pho/stress2/misc
Message-ID:  <201709180844.v8I8io9R040766@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Mon Sep 18 08:44:50 2017
New Revision: 323701
URL: https://svnweb.freebsd.org/changeset/base/323701

Log:
  Added timeout and return fsck status.
  
  Sponsored by:	Dell EMC Isilon

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

Modified: user/pho/stress2/misc/marcus2.sh
==============================================================================
--- user/pho/stress2/misc/marcus2.sh	Mon Sep 18 08:42:04 2017	(r323700)
+++ user/pho/stress2/misc/marcus2.sh	Mon Sep 18 08:44:50 2017	(r323701)
@@ -53,10 +53,22 @@ m=`su $testuser -c "limits | grep maxprocesses | awk '
 export INCARNATIONS=$((m / n))
 export swapINCARNATIONS=$INCARNATIONS
 
-su $testuser -c 'cd ..; ./run.sh marcus.cfg'
+su $testuser -c 'cd ..; ./run.sh marcus.cfg' &
 
+sleep 10
+start=`date '+%s'`
+while pgrep -q run; do
+	[ $((`date '+%s'` - start)) -gt 1500 ] &&
+	    ../tools/killall.sh
+	sleep 10
+done
+wait
+
+n=0
 while mount | grep $mntpoint | grep -q /dev/md; do
 	umount $mntpoint || sleep 1
+	[ $((n += 1)) -gt 300 ] && { echo FAIL; exit 1; }
 done
-checkfs /dev/md${mdstart}$part
+checkfs /dev/md${mdstart}$part; s=$?
 mdconfig -d -u $mdstart
+exit $s



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