ZTS: remove outdated FreeBSD skip from trim tests#18398
Open
chrislongros wants to merge 2 commits intoopenzfs:masterfrom
Open
ZTS: remove outdated FreeBSD skip from trim tests#18398chrislongros wants to merge 2 commits intoopenzfs:masterfrom
chrislongros wants to merge 2 commits intoopenzfs:masterfrom
Conversation
amotin
approved these changes
Apr 3, 2026
Member
amotin
left a comment
There was a problem hiding this comment.
Thanks. It is good to have proper test coverage.
Contributor
|
There are a couple lines in |
60cd2b7 to
13e5de9
Compare
Contributor
Author
Done :) |
behlendorf
approved these changes
Apr 3, 2026
Contributor
|
@chrislongros one last rebase to resolve the new conflict and this is all set. |
FreeBSD has supported hole punching via fspacectl(2) since FreeBSD 14.0 and the test library already handles this using truncate -d. Remove the skip that prevented trim tests from running on FreeBSD. Tests will still skip if the hardware does not support TRIM/UNMAP, which is checked separately via diskinfo. Signed-off-by: Christos Longros <chris.longros@gmail.com>
13e5de9 to
d601396
Compare
behlendorf
approved these changes
Apr 4, 2026
Member
|
@chrislongros It seems few more tests need polishing. For example, see |
Replace GNU-specific du flags (--block-size, -B1) and dd conv=nocreat with POSIX compatible commands. Move -O flag before pool name in zpool create to align with FreeBSD's strict POSIX getopt(). Relax vdev size thresholds to be applicable for ZFS-on-ZFS. Add sync_pool before zpool trim -w to ensure freed blocks are committed before trimming. Skip three tests (zpool_trim_partial, zpool_trim_verify_trimmed, trim_config) on FreeBSD where manual zpool trim does not reclaim space on file vdevs stored on a ZFS filesystem within the test framework. Tested on FreeBSD 16.0-CURRENT: 26 PASS, 3 SKIP, 0 FAIL. Signed-off-by: Christos Longros <chris.longros@gmail.com>
c8d2ecf to
97c1750
Compare
Contributor
Author
|
I converted the test commands to their POSIX analogues. I could not make the manual trim test to succeed no matter how many times I tried ... that's why I skipped it. |
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.
FreeBSD has supported hole punching via fspacectl(2) since FreeBSD 14.0
and the test library already handles this using
truncate -d. Removethe skip that prevented trim tests from running on FreeBSD.
Tests will still skip if the hardware does not support TRIM/UNMAP,
which is checked separately via
diskinfo.The second commit fixes portability issues exposed by enabling the tests.
Tested on FreeBSD 16.0-CURRENT: 26 PASS, 3 SKIP, 0 FAIL.
Signed-off-by: Christos Longros chris.longros@gmail.com