Repository navigation
test(lock): find pid_ns_helper under Cargo's 1.100 build-dir layout - #917
Merged
Merged
Conversation
Rust 1.100 runs integration tests from target/debug/build/<pkg>/<hash>/out/ instead of target/debug/deps/, so the fixed two-level pop in docker_lock_test, nfs_lock_test and pid_namespace_test no longer reaches target/debug/examples/ and the Docker lock tests fail on every Linux runner. The three copies become one tests/pid_ns_helper module that takes the nearest ancestor of the test binary holding examples/pid_ns_helper, which covers both layouts. MINIGRAF_PID_NS_HELPER still overrides it.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
GitHub's runners moved to Rust 1.100.0, which runs integration tests from
target/debug/build/<pkg>/<hash>/out/instead oftarget/debug/deps/. The lock tests computed the helper's path with two fixedpop()s, which no longer reachtarget/debug/examples/, sodocker_lock_testfails on Linux inbuild (ubuntu-latest)andtest-hooks. The macOS and Windows jobs are cancelled by fail-fast. This currently blocks every PR tov3, e.g. #916.The three identical lookups (
docker_lock_test,nfs_lock_test,pid_namespace_test) are replaced by onetests/pid_ns_helpermodule. It takes the nearest ancestor of the test binary that holdsexamples/pid_ns_helper, which covers both layouts.MINIGRAF_PID_NS_HELPERstill overrides it (coverage gates).Verified locally on Rust 1.100.0 (new layout) and 1.89.0 (MSRV, old layout):
docker_lock_testruns against a live Docker daemon and passes on both, and fails on 1.100.0 before this change.pid_namespace_testand the NFS-mount tests skip locally (no PID namespaces, no NFS export); CI's runners exercisepid_namespace_test. Clippy and fmt are clean.mainneeds the same change as a backport PR.