Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2020 06:57:24 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r358374 - user/pho/stress2/misc
Message-ID:  <202002270657.01R6vOnU079382@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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"



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