Fix mtools version sensitivity in 095 and 099 FAT tests - #297
Merged
Conversation
Follow-up to fwup-home#287, which relaxed the exact mdir directory-listing comparison in the other FAT tests but missed these two sparse tests. Newer mtools (4.0.44+) renders the short-name directory entry with a phantom column (e.g. "sparse _bin bin") for entries that use the VFAT lowercase NT-case flags, so the exact diff fails nondeterministically on the macOS CI runners. Replace the full-listing diff with the same targeted grep fwup-home#287 used, which tolerates the mtools formatting. File content is still verified byte-for-byte by the existing mcopy + cmp.
Collaborator
|
Thanks! |
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.
Follow-up to #287. That PR relaxed the exact
mdirdirectory-listing comparison in the FAT tests to tolerate newer mtools formatting, but missed095_sparse_applyand099_sparse_lasthole(the two sparse tests that mkfs at offset 0 and so weren't in the@@32256batch).The failure
On the macOS CI runners (mtools 4.0.49),
mdirrenders the short-name directory entry with a phantom column for entries that use the VFAT lowercase NT-case flags:so the exact
difffails. It's nondeterministic — it hits a different subset of the exact-diff FAT tests each run, which is why it only ever showed up on CI.Root cause (confirmed, not an fwup bug)
fwup writes a valid entry — verified by dumping the raw root-dir bytes on both Linux and an arm64 Mac:
Short name
SPARSE␠␠BIN, byte 0x0C =0x18(lowercase basename + ext), no LFN entry, preceding slot zeroed. The_binis purely mtools's rendering of that entry. File content is already independently verified by the existingmcopy+cmp.Fix
Replace the full-listing
diffwith the same targetedgrep#287 introduced. Reproduced the failure and verified the fix on an arm64 Mac (macOS 26, mtools 4.0.49) viamake distcheck, and confirmed no regression on Linux.