HomeFreeBSD

Fix several intermittent ZFS tests.

Description

Fix several intermittent ZFS tests.

tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
tests/sys/cddl/zfs/tests/zfsd/zfsd_replace_003_pos.ksh
Fix several intermittent tests. These tests all disable a disk's
phy and wait for the disk to enter the REMOVED state. However,
sometimes the disk enters the UNAVAIL state instead. I don't know
why. The fix is to accept UNAVAIL disks as well as REMOVED disks in
wait_for_pool_removal, because it doesn't make a difference to the
logic under test.

tests/sys/cddl/zfs/include/libtest.kshlib

Remove floating point variables.  Use 64-bit ints instead.

Fix the raidz_dva_to_block_addr function.  It had multiple errors:
* Used floating point
* The 4MB offset was not adjusted for ashift
* Unnecessarily complicated rounding procedure
* Its caller, corrupt_file, was assuming ashift=9

Fix occasional failures cleaning up GPT partitions. The error was
EBUSY; debug code caught the geom provider with an active reader
(r1w0e0). Since the test case is single threaded, it is speculated
that another process outside of Kyua was probing the device while
the test case was attempting to delete the partition table.

Added a retry wipe_partition_table()'s gpart destroy command.

tests/sys/cddl/zfs/Makefile
tests/sys/cddl/zfs/include/Makefile
tests/sys/cddl/zfs/include/libtest_test.kshlib
Add unit tests for raidz_dva_to_block_addr

tests/sys/cddl/zfs/tests/cachefile/cachefile_003_pos.ksh
tests/sys/cddl/zfs/tests/cache/cache_008_neg.ksh
Always use "-f" when destroying pools except when testing the
functionality of the non -f command. Fixes intermittency.

tests/sys/cddl/zfs/tests/hotspare/hotspare_scrub_002_pos.ksh
After scrubbing the pool with spare attached, detach the original
device, clear errors, and scrub again. Assert that no new errors
are found. I don't know why, but on FreeBSD 11 "zpool scrub" will
sometimes find some errors on the spare device even though it
doesn't find them all.

Sponsored by: Spectra Logic Corp

Details

Provenance
asomersAuthored on
Parents
rS297881: Put the pNFS server/client changes into the new NFS kernel directories.
Branches
Unknown
Tags
Unknown