From owner-svn-src-projects@freebsd.org Fri Sep 1 20:37:09 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 221B4E05702 for ; Fri, 1 Sep 2017 20:37:09 +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 F04DA36E6; Fri, 1 Sep 2017 20:37:08 +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 v81Kb7sU000860; Fri, 1 Sep 2017 20:37:07 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v81Kb7RG000858; Fri, 1 Sep 2017 20:37:07 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201709012037.v81Kb7RG000858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 1 Sep 2017 20:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r323118 - 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: 323118 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, 01 Sep 2017 20:37:09 -0000 Author: asomers Date: Fri Sep 1 20:37:07 2017 New Revision: 323118 URL: https://svnweb.freebsd.org/changeset/base/323118 Log: Fix hotspare_replace_003_neg This test contained usage errors that have been causing it to fail for an unknown amount of time. We never noticed, because it was marked as an expected failure. However, the underlying failure has since been fixed, so the test can pass now that I've fixed the usage errors. tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh Fix usage errors and improve description tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh Clear expected failure Sponsored by: Spectra Logic Corp Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh Fri Sep 1 20:12:18 2017 (r323117) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_replace_003_neg.ksh Fri Sep 1 20:37:07 2017 (r323118) @@ -34,10 +34,16 @@ . $STF_SUITE/include/libsas.kshlib . $STF_SUITE/tests/hotspare/hotspare.kshlib -# Reproduction script for Rally DE189: -# https://rally1.rallydev.com/#/9096795496d/detail/defect/13345916506 +# "zpool import" should not show destroyed pools, even if a non-destroyed label +# is present. # -# To reproduce, from Keith's email: +# This situation arose when a user activated a spare, removed the spare disk, +# destroyed the pool, reinserted the spare disk, and then tried to import the +# pool. Since the pool was destroyed, nothing should've happened. But the +# spare disk had a non-destroyed label, so zpool tried to import it. A panic +# ensued. +# +# To reproduce: # 1. Create a 3 drive raid. # 2. Disable a drive # 3. Let a Spare take over @@ -58,6 +64,7 @@ cleanup() { zpool status $TESTPOOL log_must destroy_pool $TESTPOOL fi + cleanup_devices ${DISKS} } log_onexit cleanup @@ -116,18 +123,18 @@ cleanup_devices ${MEMBERS[*]} ${SPARES[*]} log_must $ZPOOL create -f $TESTPOOL raidz1 ${MEMBERS[@]} spare ${SPARES[@]} DISK0_GUID=$(get_disk_guid $DISK0_NAME) -log_must disable_sas_disk $DISK0_EXPANDER $DISK0_PHY +disable_sas_disk $DISK0_EXPANDER $DISK0_PHY log_must $ZPOOL replace $TESTPOOL $DISK0_GUID $SPARE0_NAME wait_until_resilvered SPARE0_GUID=$(get_disk_guid $SPARE0_NAME) -log_must disable_sas_disk $SPARE0_EXPANDER $SPARE0_PHY +disable_sas_disk $SPARE0_EXPANDER $SPARE0_PHY log_must $ZPOOL replace $TESTPOOL $SPARE0_GUID $SPARE1_NAME wait_until_resilvered -log_must enable_sas_disk $SPARE0_EXPANDER $SPARE0_PHY -log_must enable_sas_disk $DISK0_EXPANDER $DISK0_PHY -log_must rescan_disks +enable_sas_disk $SPARE0_EXPANDER $SPARE0_PHY +enable_sas_disk $DISK0_EXPANDER $DISK0_PHY +rescan_disks log_must destroy_pool $TESTPOOL Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh Fri Sep 1 20:12:18 2017 (r323117) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh Fri Sep 1 20:37:07 2017 (r323118) @@ -607,7 +607,6 @@ hotspare_replace_003_neg_head() } hotspare_replace_003_neg_body() { - atf_expect_fail "Rally: DE189: ZFS config management needs improvement" . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg