Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2017 22:35:06 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r322067 - projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare
Message-ID:  <201708042235.v74MZ6jD070912@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Fri Aug  4 22:35:05 2017
New Revision: 322067
URL: https://svnweb.freebsd.org/changeset/base/322067

Log:
  Fix longstanding race condition in hotspare_onoffline_004_neg
  
  tests/sys/cddl/zfs/tests/hotspare/hotspare_onoffline_004_neg.ksh
  	In verify_assertion, wait for TESTFILE to appear before killing the
  	process that's supposed to create it.
  
  Sponsored by:	Spectra Logic Corp

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

Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_onoffline_004_neg.ksh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_onoffline_004_neg.ksh	Fri Aug  4 22:32:54 2017	(r322066)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_onoffline_004_neg.ksh	Fri Aug  4 22:35:05 2017	(r322067)
@@ -106,7 +106,11 @@ function verify_assertion # dev
 	i=0
 	while (( i < iters )); do
 		start_all_wp
-		while ! is_pool_resilvered "$TESTPOOL"; do
+		while true; do
+			if is_pool_resilvered "$TESTPOOL" -a \
+				[ -f "$TESTDIR/$TESTFILE.$i" ]; then
+				break;
+			fi
 			$SLEEP 2
 		done
 



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