From owner-svn-src-projects@freebsd.org Fri Aug 4 22:35:07 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 402BBDCC976 for ; Fri, 4 Aug 2017 22:35:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CDF97EBA8; Fri, 4 Aug 2017 22:35:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74MZ6UW070913; Fri, 4 Aug 2017 22:35:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74MZ6jD070912; Fri, 4 Aug 2017 22:35:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201708042235.v74MZ6jD070912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 4 Aug 2017 22:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r322067 - projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare X-SVN-Group: projects X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare X-SVN-Commit-Revision: 322067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 22:35:07 -0000 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