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

Peter Holm pho at FreeBSD.org
Thu Feb 27 06:57:26 UTC 2020


Author: pho
Date: Thu Feb 27 06:57:24 2020
New Revision: 358374
URL: https://svnweb.freebsd.org/changeset/base/358374

Log:
  Added exit on fatal errors.

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

Modified: user/pho/stress2/misc/gnop2.sh
==============================================================================
--- user/pho/stress2/misc/gnop2.sh	Thu Feb 27 06:56:05 2020	(r358373)
+++ user/pho/stress2/misc/gnop2.sh	Thu Feb 27 06:57:24 2020	(r358374)
@@ -53,11 +53,13 @@ test() {
 	mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
 	[ -c /dev/md$mdstart ] &&  mdconfig -d -u $mdstart
 
-	mdconfig -a -t swap -s 2g -u $mdstart || exit 1
+	set -e
+	mdconfig -a -t swap -s 2g -u $mdstart
 	gnop create -S $1 /dev/md$mdstart
 	newfs $newfs_flags /dev/md$mdstart.nop > /dev/null
 	mount /dev/md$mdstart.nop $mntpoint
 	chmod 777 $mntpoint
+	set +e
 
 	dd if=/dev/zero of=$mntpoint/file bs=1k count=333 2>&1 | \
 	    egrep -v "records|transferred"


More information about the svn-src-user mailing list