Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Dec 2015 20:49:26 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r292364 - projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare
Message-ID:  <201512162049.tBGKnQPt069561@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Wed Dec 16 20:49:25 2015
New Revision: 292364
URL: https://svnweb.freebsd.org/changeset/base/292364

Log:
  Fix race condition in hotspare_scrub_002_pos
  
  verify_assertion: Don't assert that $ZPOOL scrub exits 0.
  
  The pool may have already started resilvering, and in this test the
  postconditions are strict enough to enforce that the results meet
  expectations, i.e. at least one error was detected, which can only be the
  case if the pool scrubs or resilvers.
  
  Submitted by:	Will
  Sponsored by:	Spectra Logic Corp

Modified:
  projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_scrub_002_pos.ksh

Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_scrub_002_pos.ksh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_scrub_002_pos.ksh	Wed Dec 16 20:48:13 2015	(r292363)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_scrub_002_pos.ksh	Wed Dec 16 20:49:25 2015	(r292364)
@@ -82,7 +82,9 @@ function verify_assertion # odev
 	log_must $DD if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=$sdev
 
 	$SYNC
-	log_must $ZPOOL scrub $TESTPOOL
+	# The pool may already have started scrubbing, so don't assert this.
+	# Expected postconditions are checked below anyway.
+	$ZPOOL scrub $TESTPOOL
 	while is_pool_scrubbing $TESTPOOL ; do
 		$SLEEP 2
 	done



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