make test_temp_path_resolve_existing_cwd() work with symlink in TMPDIR#403
Open
martinvonz wants to merge 1 commit intoStebalien:masterfrom
Open
make test_temp_path_resolve_existing_cwd() work with symlink in TMPDIR#403martinvonz wants to merge 1 commit intoStebalien:masterfrom
martinvonz wants to merge 1 commit intoStebalien:masterfrom
Conversation
Here's a simple way to reproduce a test failure before this commit: ``` ln -s /tmp /tmp/here TMPDIR=/tmp/here cargo test ``` That fails something like this: ``` test test_temp_path_resolve_existing_cwd ... FAILED failures: ---- test_temp_path_resolve_existing_cwd stdout ---- thread 'test_temp_path_resolve_existing_cwd' (137617) panicked at tests/namedtempfile.rs:376:5: assertion `left == right` failed left: "/tmp/.tmpDu1A7l/foo" right: "/tmp/here/.tmpDu1A7l/foo" note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` This commit fixes it by canonicalizing the CWD path in the test.
978ba33 to
86599a3
Compare
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.
Here's a simple way to reproduce a test failure before this commit:
That fails something like this:
This commit fixes it by canonicalizing the CWD path in the test.