From owner-svn-src-projects@freebsd.org Wed Dec 16 20:49:27 2015 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 42C09A498AC for ; Wed, 16 Dec 2015 20:49:27 +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 0F1E91A35; Wed, 16 Dec 2015 20:49:26 +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 tBGKnQB0069562; Wed, 16 Dec 2015 20:49:26 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBGKnQPt069561; Wed, 16 Dec 2015 20:49:26 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201512162049.tBGKnQPt069561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 16 Dec 2015 20:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r292364 - projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare X-SVN-Group: projects 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.20 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: Wed, 16 Dec 2015 20:49:27 -0000 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