Skip to content

[stable 1.94] Fix symlink_and_directory when running in a long target dir name#16777

Merged
epage merged 1 commit intorust-lang:rust-1.94.0from
ehuss:fix-symlink_and_directory-stable-1.94
Mar 21, 2026
Merged

[stable 1.94] Fix symlink_and_directory when running in a long target dir name#16777
epage merged 1 commit intorust-lang:rust-1.94.0from
ehuss:fix-symlink_and_directory-stable-1.94

Conversation

@ehuss
Copy link
Copy Markdown
Contributor

@ehuss ehuss commented Mar 21, 2026

This is a stable backport of #16775 to fix the symlink_and_directory test.

…t-lang#16775)

This fixes the `symlink_and_directory` test which is failing on
rust-lang/rust because it runs in a longer target directory name. This
causes the path to exceed the limit of 100 characters for a USTAR tar
header.

The fix is to just use a directory from the `tempfile` crate instead of
trying to create one inside the test sandbox. I believe this should be
reliably under 100 characters.

Unfortunately we cannot switch to GNU tar headers which dynamically
switch to using GNU extensions for long paths because it would cause the
package checksums to change based on whether or not the path causes it
to exceed the limit.

I double checked the old tar 0.4.44, and the test fails as expected.
@rustbot rustbot added A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 21, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 21, 2026

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from epage, weihanglo

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 21, 2026

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-1.94.0. Please double check that you specified the right target!

@epage epage merged commit 292f395 into rust-lang:rust-1.94.0 Mar 21, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 21, 2026
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 22, 2026
[stable] 1.94.1 release


This backports:

* [STABLE] library: wasm32-wasip1-threads has functional pthreads #153634
* Move freeze_* methods to OpenOptionsExt2 #153491
* [Clippy] Fix ICE in match_same_arms rust-lang/rust-clippy#16685

Cargo:

* [stable 1.94] Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16777)
* Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16775)
* [stable 1.94] Update tar to 0.4.45 (rust-lang/cargo#16769)
* test: Remove unused docker ip_address (rust-lang/cargo#16636)
* Increase cache_lock test timeout (rust-lang/cargo#16545)
* chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
* test(build-std): Update error message (rust-lang/cargo#16658)
* fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
* fix(script): surpress `unused_features` lint for embedded (rust-lang/cargo#16714)
* test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
* test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Mar 22, 2026
[stable] 1.94.1 release


This backports:

* [STABLE] library: wasm32-wasip1-threads has functional pthreads #153634
* Move freeze_* methods to OpenOptionsExt2 #153491
* [Clippy] Fix ICE in match_same_arms rust-lang/rust-clippy#16685

Cargo:

* [stable 1.94] Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16777)
* Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16775)
* [stable 1.94] Update tar to 0.4.45 (rust-lang/cargo#16769)
* test: Remove unused docker ip_address (rust-lang/cargo#16636)
* Increase cache_lock test timeout (rust-lang/cargo#16545)
* chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
* test(build-std): Update error message (rust-lang/cargo#16658)
* fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
* fix(script): surpress `unused_features` lint for embedded (rust-lang/cargo#16714)
* test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
* test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
@rustbot rustbot added this to the 1.94.1 milestone Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testing-cargo-itself Area: cargo's tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants