Repository navigation
Make the Rust test suite portable to macOS (printf, timeout, temp-dir paths) - #1747
Merged
Merged
Conversation
skip-changelog: CI-only, no package source changes
…n macOS rustix has no mknodat or mkfifoat on Apple targets. skip-changelog: test-only change, no observable behaviour
skip-changelog: test-only change, no observable behaviour
…Events paths) BSD printf fails on arguments its format does not consume, so a bare printf hook is wrapped in sh -c. macOS ships no timeout(1); perl's alarm bounds the command instead. BSD stat spells the mtime format -f %m. FSEvents reports paths with symlinks resolved, so the watcher test compares against the canonical temp dir. skip-changelog: test-only change, no observable behaviour
…tects skip-changelog: test-only
…ortability-1117 # Conflicts: # packages/rust/tests/scan_failures.rs
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.
Part of #1574
Slice 1 of macOS support: test-portability fixes only. No production behavior changes.
printfon-file hooks wrapped insh -c(BSDprintffails on arguments its format does not consume).timeoutreplaced withperl -e 'alarm shift; exec @ARGV'(macOS ships notimeout).stat -cfalls back to BSDstat -f.libc::mkfifo(rustix has no FIFO API on macOS).over_detectsaccepts the watched dir as supplied or canonicalized (macOS/var->/private/var); Windows leg green.macOS result
A temporary
macOS testsjob witnessed progress and is removed in this PR; it cannot be required until every macOS failure is fixed.Left for later slices (each needs a maintainer ruling):
glob_conformancefixture collidesÉ/éon a case- and normalization-insensitive filesystem (1).on_filetrailing args: path as supplied vs canonical (1).config_glob_parity; FSEvents replay double-running a startup hook.E2E Verification
Test-only change under
packages/rust/src(test modules), so both receipts:uv run python -m pytest tests/e2e/cli_version_test.py tests/e2e/on_file_query_test.py tests/e2e/on_file_failure_test.py -x -q-- pass.pnpm test:e2e-- pass.Manual exercise: the probe job ran the full Rust suite on
macos-latest; failures dropped 34 -> 21, with no new Linux or Windows failures.