Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2017 06:48:56 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r324188 - user/pho/stress2/misc
Message-ID:  <201710020648.v926muvH085006@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Mon Oct  2 06:48:56 2017
New Revision: 324188
URL: https://svnweb.freebsd.org/changeset/base/324188

Log:
  Fix typo in the exit statement noted by jilles@
  Add note that not breaking out on fsck failure is on purpose.
  Remove reference to now unused $i.
  
  Reported by:	jilles@
  Sponsored by:	Dell EMC Isilon

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

Modified: user/pho/stress2/misc/trim4.sh
==============================================================================
--- user/pho/stress2/misc/trim4.sh	Mon Oct  2 06:05:19 2017	(r324187)
+++ user/pho/stress2/misc/trim4.sh	Mon Oct  2 06:48:56 2017	(r324188)
@@ -41,9 +41,10 @@ mdconfig -l | grep -q md$mdstart &&  mdconfig -d -u $m
 size="1g"
 [ $# -eq 0 ] && trim=-t
 [ "$newfs_flags" = "-U" ] && flag="-j"
+s=0
 start=`date +%s`
 while [ $((`date +%s` - start)) -lt $((15 * 60)) ]; do
-	echo "Test #$i `date '+%T'`"
+	echo "Test `date '+%T'`"
 	echo "mdconfig -a -t swap -s $size -u $mdstart"
 	mdconfig -a -t swap -s $size -u $mdstart || exit 1
 	bsdlabel -w md$mdstart auto
@@ -62,7 +63,8 @@ while [ $((`date +%s` - start)) -lt $((15 * 60)) ]; do
 	while mount | grep $mntpoint | grep -q /dev/md; do
 		umount $mntpoint || sleep 1
 	done
-	checkfs /dev/md${mdstart}$part; s=$?
+#	Do not break in case of fsck error
+	checkfs /dev/md${mdstart}$part || s=$?
 	mdconfig -d -u $mdstart
 done
-exit $?
+exit $s



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