ZTS: snapshot_018_pos.ksh add extra margin#18450
Open
behlendorf wants to merge 1 commit intoopenzfs:masterfrom
Open
ZTS: snapshot_018_pos.ksh add extra margin#18450behlendorf wants to merge 1 commit intoopenzfs:masterfrom
behlendorf wants to merge 1 commit intoopenzfs:masterfrom
Conversation
The date(1) command and snapshot timestamps use different clock sources which can result in a small discrepency. This can cause the test the incorrectly fail. To avoid this, add a brief delay to the test case to allow for minor skew. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
There was a problem hiding this comment.
Pull request overview
This PR addresses a ZTS flake in snapshot_018_pos.ksh where snapshot timestamps can be slightly behind date(1) due to differing clock sources, causing occasional failures in snapshots_changed time comparisons.
Changes:
- Insert a 1-second delay after capturing
curr_timeand before snapshot/destroy operations to tolerate minor timestamp skew. - Apply the delay consistently across all the test’s
curr_time-based timestamp assertions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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/24764467025/job/72455377060?pr=18445
Description
The date(1) command and snapshot timestamps use different clock sources which can result in a small discrepancy. This can cause the test the incorrectly fail. To avoid this, add a brief delay to the test case to allow for minor skew.
How Has This Been Tested?
Will be tested by the CI.
Types of changes