Date: Fri, 1 Sep 2017 20:37:07 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r323118 - projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare Message-ID: <201709012037.v81Kb7RG000858@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709012037.v81Kb7RG000858>