Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: Simplify zpool_initialize_verify_initialized #11328

Closed
wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 11, 2020

Motivation and Context

The test is failing on FreeBSD.

Description

FreeBSD doesn't do od -t x8 -Ad. Instead of converting values
between decimal and hex, let's just compare the decimal values.

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.

Speaking of spacemaps, it's a confusing name for this counter since
we're actually counting the number of metaslabs that don't have any
spacemaps. Change the naming to metaslabs instead.

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

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Sorry, something went wrong.

@ghost ghost added Component: Test Suite Indicates an issue with the test framework or a test case Status: Work in Progress Not yet ready for general review labels Dec 11, 2020

Unverified

No user is associated with the committer email.
FreeBSD doesn't do `od -t x8 -Ad`. Instead of converting values
between decimal and hex, let's just compare the decimal values.

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.

Speaking of `spacemaps`, it's a confusing name for this counter since
we're actually counting the number of metaslabs that *don't* have any
spacemaps.  Change the naming to `metaslabs` instead.

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

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
@ghost ghost force-pushed the zts-verify-initialized branch from 9045ad4 to 80eadb7 Compare December 14, 2020 20:18
@ghost
Copy link
Author

ghost commented Dec 14, 2020

  • Whoops, logged the debug file path instead of its contents
  • Rebased

@ghost
Copy link
Author

ghost commented Dec 18, 2020

Final version here #11365

@ghost ghost closed this Dec 18, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Work in Progress Not yet ready for general review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants