Repository navigation
ZTS: make zpool_iostat_interval_all teardown deterministic - #18776
Merged
Merged
Conversation
MorganaFuture
force-pushed
the
iostat-export-flaky
branch
2 times, most recently
from
July 10, 2026 12:05
46a8f83 to
edb26fc
Compare
behlendorf
approved these changes
Jul 10, 2026
behlendorf
left a comment
Contributor
There was a problem hiding this comment.
Ah, that nicely explains things.
MorganaFuture
marked this pull request as ready for review
July 11, 2026 16:30
Contributor
|
@MorganaFuture when you get a chance can you rebase this and resolve the conflict. |
amotin
approved these changes
Jul 14, 2026
zpool_iostat_interval_all runs "zpool iostat" in the background at a 0.1s interval and compares its output, parsed into a sequence of chunks, against a fixed expected sequence as pools are created, imported, exported and destroyed. Every step changes the visible pool list by exactly one pool except the teardown, which used a single "zpool export -a". export -a exports the pools one after another rather than atomically, so there is a brief window in which one pool is already gone and the other is not. At the 0.1s sampling interval iostat occasionally catches that intermediate single-pool state and emits an extra chunk that is not in the expected sequence, and the test fails. Whether a sample lands in the window depends on timing, which is why it shows up as a flake. Export the two pools explicitly, one at a time, and add the intermediate single-pool state to the expected output, the same way the imports and destroys elsewhere in the test already change one pool at a time. The teardown transition is now deterministic. Drop the test from the zts-report.py.in "maybe" list. Signed-off-by: MorganaFuture <103630661+MorganaFuture@users.noreply.github.com> Closes openzfs#18273
MorganaFuture
force-pushed
the
iostat-export-flaky
branch
from
July 17, 2026 11:53
edb26fc to
417ee75
Compare
Contributor
Author
|
Done |
behlendorf
approved these changes
Jul 17, 2026
lundman
pushed a commit
to openzfsonosx/openzfs-fork
that referenced
this pull request
Jul 30, 2026
zpool_iostat_interval_all runs "zpool iostat" in the background at a 0.1s interval and compares its output, parsed into a sequence of chunks, against a fixed expected sequence as pools are created, imported, exported and destroyed. Every step changes the visible pool list by exactly one pool except the teardown, which used a single "zpool export -a". export -a exports the pools one after another rather than atomically, so there is a brief window in which one pool is already gone and the other is not. At the 0.1s sampling interval iostat occasionally catches that intermediate single-pool state and emits an extra chunk that is not in the expected sequence, and the test fails. Whether a sample lands in the window depends on timing, which is why it shows up as a flake. Export the two pools explicitly, one at a time, and add the intermediate single-pool state to the expected output, the same way the imports and destroys elsewhere in the test already change one pool at a time. The teardown transition is now deterministic. Drop the test from the zts-report.py.in "maybe" list. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: MorganaFuture <103630661+MorganaFuture@users.noreply.github.com> Closes openzfs#18273 Closes openzfs#18776
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Aug 12, 2026
zpool_iostat_interval_all runs "zpool iostat" in the background at a 0.1s interval and compares its output, parsed into a sequence of chunks, against a fixed expected sequence as pools are created, imported, exported and destroyed. Every step changes the visible pool list by exactly one pool except the teardown, which used a single "zpool export -a". export -a exports the pools one after another rather than atomically, so there is a brief window in which one pool is already gone and the other is not. At the 0.1s sampling interval iostat occasionally catches that intermediate single-pool state and emits an extra chunk that is not in the expected sequence, and the test fails. Whether a sample lands in the window depends on timing, which is why it shows up as a flake. Export the two pools explicitly, one at a time, and add the intermediate single-pool state to the expected output, the same way the imports and destroys elsewhere in the test already change one pool at a time. The teardown transition is now deterministic. Drop the test from the zts-report.py.in "maybe" list. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: MorganaFuture <103630661+MorganaFuture@users.noreply.github.com> Closes openzfs#18273 Closes openzfs#18776
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Aug 13, 2026
zpool_iostat_interval_all runs "zpool iostat" in the background at a 0.1s interval and compares its output, parsed into a sequence of chunks, against a fixed expected sequence as pools are created, imported, exported and destroyed. Every step changes the visible pool list by exactly one pool except the teardown, which used a single "zpool export -a". export -a exports the pools one after another rather than atomically, so there is a brief window in which one pool is already gone and the other is not. At the 0.1s sampling interval iostat occasionally catches that intermediate single-pool state and emits an extra chunk that is not in the expected sequence, and the test fails. Whether a sample lands in the window depends on timing, which is why it shows up as a flake. Export the two pools explicitly, one at a time, and add the intermediate single-pool state to the expected output, the same way the imports and destroys elsewhere in the test already change one pool at a time. The teardown transition is now deterministic. Drop the test from the zts-report.py.in "maybe" list. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: MorganaFuture <103630661+MorganaFuture@users.noreply.github.com> Closes openzfs#18273 Closes openzfs#18776
pull Bot
pushed a commit
to A-Archives-and-Forks/openzfs
that referenced
this pull request
Sep 26, 2026
zpool_iostat_interval_all runs "zpool iostat" in the background at a 0.1s interval and compares its output, parsed into a sequence of chunks, against a fixed expected sequence as pools are created, imported, exported and destroyed. Every step changes the visible pool list by exactly one pool except the teardown, which used a single "zpool export -a". export -a exports the pools one after another rather than atomically, so there is a brief window in which one pool is already gone and the other is not. At the 0.1s sampling interval iostat occasionally catches that intermediate single-pool state and emits an extra chunk that is not in the expected sequence, and the test fails. Whether a sample lands in the window depends on timing, which is why it shows up as a flake. Export the two pools explicitly, one at a time, and add the intermediate single-pool state to the expected output, the same way the imports and destroys elsewhere in the test already change one pool at a time. The teardown transition is now deterministic. Drop the test from the zts-report.py.in "maybe" list. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: MorganaFuture <103630661+MorganaFuture@users.noreply.github.com> Closes openzfs#18273 Closes openzfs#18776
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
cli_root/zpool_iostat/zpool_iostat_interval_allis intermittently failingand is currently suppressed in
tests/test-runner/bin/zts-report.py.in(#18273).
The test runs
zpool iostat -T u 0.1 in the background and comparesits output, parsed into a sequence of "chunks", against a fixed expected
sequence as pools are created, imported, exported and destroyed. Every step
changes the visible pool list by exactly one pool except the teardown, which
uses a single
zpool export -a.export -aexports the pools one after another rather than atomically, sothere is a brief window in which one pool is already gone and the other is
not. At the 0.1s sampling interval iostat occasionally catches that
intermediate single-pool state and emits an extra chunk that is not in the
expected sequence, and the test fails. Whether a sample lands in the window
depends on timing, which is why it shows up as a flake.
Description
Export the two pools explicitly, one at a time, and add the intermediate
single-pool state to the expected output — the same one-pool-at-a-time shape
the imports and destroys elsewhere in the test already use. The teardown
transition becomes deterministic and the spurious extra chunk can no longer
appear.
With the race removed the test's entry is dropped from the
zts-report.py.in"maybe" list.How Has This Been Tested?
Looped the teardown in a VM (150 iterations each):
zpool export -a, iostat emitted a spurious extra single-pool chunkduring teardown in 17 of 150 runs — the failure mode from ZTS: zpool_iostat_interval_all #18273.
POOLBOTH -> POOL2 -> NOPOOLteardown; no spurious chunk in any run.Opening as a draft to get a full CI run on the de-suppressed test.
Types of changes
Checklist
Signed-off-by.