HomeFreeBSD

ZTS: Simplify zpool_initialize_verify_initialized

Description

ZTS: Simplify zpool_initialize_verify_initialized

Consider the test to be a success as long as the initializing pattern
is found at least once per metaslab. This indicates that at least
part of the free space was initialized. Ideally we'd check that the
pattern was written to all free space but that's much trickier so this
check is a reasonable compromise.

Using a here-string to feed the loop in this test causes an empty
string to still trigger the loop so we miss the spacemaps=0 case.
Pipe into the loop instead.

While here, we can use zpool wait -t initialize $TESTPOOL to wait for
the pool to initialize.

Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11365

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Dec 18 2020, 4:42 PM
GitHub <noreply@github.com>Committed on Dec 18 2020, 4:42 PM
Parents
rG71e4ce0e52c9: special device removal space accounting fixes
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG2844ad60d417: ZTS: Simplify zpool_initialize_verify_initialized (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Dec 18 2020, 4:42 PM