Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2018 12:38:26 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r330841 - user/pho/stress2/misc
Message-ID:  <201803131238.w2DCcQ0g089063@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Tue Mar 13 12:38:26 2018
New Revision: 330841
URL: https://svnweb.freebsd.org/changeset/base/330841

Log:
  Do not loop forever on an umount failure. Return fsck status code.
  
  Sponsored by:	Dell EMC Isilon

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

Modified: user/pho/stress2/misc/full.sh
==============================================================================
--- user/pho/stress2/misc/full.sh	Tue Mar 13 12:35:37 2018	(r330840)
+++ user/pho/stress2/misc/full.sh	Tue Mar 13 12:38:26 2018	(r330841)
@@ -57,8 +57,12 @@ export TESTPROGS=`cd ..; find testcases/ -perm -1 -typ
 su $testuser -c 'cd ..; ./testcases/run/run $TESTPROGS'
 
 ../tools/killall.sh
-while mount | grep "on $mntpoint " | grep -q /dev/md; do
-	umount $mntpoint || sleep 1
+for i in `jot 6`; do
+	mount | grep -q "on $mntpoint " || break
+	umount $mntpoint && break || sleep 10
+	[ $i -eq 6 ] &&
+	    { echo FATAL; fstat -mf $mntpoint; exit 1; }
 done
-checkfs /dev/md${mdstart}$part
+checkfs /dev/md${mdstart}$part; s=$?
 mdconfig -d -u $mdstart
+return $s



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