Extract ZfsTestHarness
from StorageManagerTestHarness
#9228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After #9224 (on which this PR is based), there were two remaining users of
StorageManagerTestHarness
, both of which rely on having real ZFS pools / datasets available:zone_bundle
tests exercise production code that wants to interact with ZFS properties (quota in particular; maybe others)sled-diagnostics::logs
tests use ZFS snapshotsHowever,
StorageManager
and the code around it is not in a great spot: it appears to be real, production code, but it's no longer actually used by sled-agent - all of its functionality has been absorbed into the config reconciler.This PR extracts a
ZfsTestHarness
- this is essentially a subset ofStorageManagerTestHarness
, and copy/pastes its creation of vdevs for real ZFS tests, but has a much simpler API: there were several methods ofStorageManagerTestHarness
that had no callers, and it handles disks / datasets / zpools itself (in a very simple way) instead of handing that off toStorageManager
. Both of the test modules above are updated to useZfsTestHarness
, which I think clears the way to removingStorageManager
andStorageManagerTestHarness
.