ZTS: mmp_on_uberblocks.ksh simplify#18452
Open
behlendorf wants to merge 1 commit intoopenzfs:masterfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR simplifies the mmp_on_uberblocks.ksh ZTS test to avoid a known flaky sequence-number assertion and instead validate MMP write frequency via kstat, using within_percent for readability.
Changes:
- Removes the
mmp_seqincrement check which could fail when a TXG sync resets the sequence. - Computes an expected MMP write target from the current
MULTIHOST_INTERVALand verifies writes against that target. - Simplifies the pass/fail logic into a single
within_percentcheck.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The last portion of mmp_on_uberblocks.ksh was intended to verify that the sequence number was incremented. However, it failed to account for the case where a txg sync would occur resulting in the sequence number being correctly reset. Rather than add additional code to detect this that check has been removed. The mmp update frequency is still verified via the kstat which is a more reliably mechanism to detect the writes. There are several other mmp tests which verify the uberblock changes are reflected on disk so there's no significant loss of test coverage. Finally, the test case has been simplified to use the within_percent function for readability. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
0b466b8 to
d6206f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
https://github.com/openzfs/zfs/actions/runs/24792352037/job/72552994804?pr=18398
Resolve a long standing flaw in the mmp_on_uberblocks.ksh test case which was causing CI failures.
Description
The last portion of mmp_on_uberblocks.ksh was intended to verify that the sequence number was incremented. However, it failed to account for the case where a txg sync would occur resulting in the sequence number being correctly reset.
Rather than add additional code to detect this that check has been removed. The mmp update frequency is still verified via the kstat which is a more reliably mechanism to detect the writes. There are several other mmp tests which verify the uberblock changes are reflected on disk so there's no significant loss of test coverage.
Finally, the test case has been simplified to use the within_percent function for readability.
How Has This Been Tested?
Locally tested with 100 iterations of the updated test and will be further verified by the CI.
Types of changes