]> granicus.if.org Git - zfs/commit
ZTS: Fix zpool_status_-s
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 11 Oct 2019 17:22:20 +0000 (10:22 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Oct 2019 17:22:20 +0000 (10:22 -0700)
commitea25ed236500f67235a9a692b4ea8a6f53a88dea
tree007be2fe30733a2e1874ac4d55eb9e1850cb5ac2
parent516a83f8861269de9f795a96c471623e3bd67009
ZTS: Fix zpool_status_-s

After commit 5e74ac51 which split and reordered the run files the
`zpool_status_-s` test began failing.  The new ordering placed
the test after a previous test which used `zpool replace` to replace
a disk but did not clear its label.  This resulted in the next test,
`zpool_status_-s`, failing because of the potentially active
pool being detected on the replaced vdev.

    /dev/loop0 is part of potentially active pool 'testpool'

Use the default_mirror_setup_noexit() and default_cleanup_noexit()
functions to create the pool in `zpool_status_-s`.  They use the -f
flag by default.

In the `scrub_after_resilver` test wipe the label during cleanup
to prevent future failures if the tests are again reordered.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9451
tests/zfs-tests/tests/functional/fault/scrub_after_resilver.ksh
tests/zfs-tests/tests/functional/fault/zpool_status_-s.ksh