Skip to content

test: avoid temp path collisions in install strip tests - #13664

Open
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:pr/test-install-pid-temp-path
Open

test: avoid temp path collisions in install strip tests#13664
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:pr/test-install-pid-temp-path

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor

Function strip_source_file() reused a fixed hello.rs/hello_bin path in std::env::temp_dir(), which races when tests run in separate processes (e.g. under cargo nextest, which runs each test in its own process) and could pick up another process's file mid-write or mid-compile. Suffix both paths with the process PID.

strip_source_file() reused a fixed hello.rs/hello_bin path in
std::env::temp_dir(), which races when tests run in separate
processes (e.g. under cargo nextest, which runs each test in its own
process) and could pick up another process's file mid-write or
mid-compile. Suffix both paths with the process PID.
@codspeed-hq

codspeed-hq Bot commented Jul 30, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 4.96%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
✅ 343 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation du_max_depth_balanced_tree[(6, 4, 10)] 64.2 ms 60.9 ms +5.45%
Simulation du_summarize_balanced_tree[(5, 4, 10)] 16.4 ms 15.7 ms +4.48%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing eduardomourar:pr/test-install-pid-temp-path (9f3445a) with main (d183a67)2

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (91f6543) during the generation of this report, so d183a67 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@oech3

oech3 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No need. We can use other binaries. See #13612

@sylvestre

Copy link
Copy Markdown
Contributor

So should we close that PR?

@eduardomourar

Copy link
Copy Markdown
Contributor Author

Removing the function strip_source_file() (if possible) is a better option. So #13612 should take priority and this current PR can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants