Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite symlinked-extern, symlinked-rlib and symlinked-libraries run-make tests in rmake.rs format #125674

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

Oneirical
Copy link
Contributor

@Oneirical Oneirical commented May 28, 2024

Part of #121876 and the associated Google Summer of Code project.

try-job: x86_64-msvc

@rustbot
Copy link
Collaborator

rustbot commented May 28, 2024

r? @jieyouxu

rustbot has assigned @jieyouxu.
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

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 28, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 28, 2024

Some changes occurred in run-make tests.

cc @jieyouxu

The run-make-support library was changed

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Oneirical
Copy link
Contributor Author

Oneirical commented May 28, 2024

Supporting Windows symlinks requires importing symlink_file, only available on Windows. Writing std::os::windows on an OS that is not Windows results in an error.

The previous test simply ignored Windows. Is it pertinent to make this test work on Windows too?

src/tools/run-make-support/src/lib.rs Outdated Show resolved Hide resolved
tests/run-make/symlinked-rlib/rmake.rs Outdated Show resolved Hide resolved
@jieyouxu
Copy link
Member

Supporting Windows symlinks requires importing symlink_file, only available on Windows. Writing std::os::windows on an OS that is not Windows results in an error.

The previous test simply ignored Windows. Is it pertinent to make this test work on Windows too?

I think that is reasonable, but it looks like you have cfg-enabled specific versions. I think you need #[cfg(target_family = "unix")] instead of target_os?

@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2024
@Oneirical Oneirical force-pushed the another-day-another-test branch from 58ac55a to 1e0a952 Compare May 29, 2024 15:57
@Oneirical
Copy link
Contributor Author

Oneirical commented May 29, 2024

Changes applied, and once again the important of #[must_use] is highlighted.
@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 29, 2024
@rust-log-analyzer

This comment has been minimized.

@Oneirical Oneirical force-pushed the another-day-another-test branch from afbdbbe to 2e08de0 Compare May 29, 2024 16:41
src/tools/run-make-support/src/lib.rs Outdated Show resolved Hide resolved
tests/run-make/symlinked-rlib/rmake.rs Outdated Show resolved Hide resolved
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 29, 2024
@Oneirical Oneirical force-pushed the another-day-another-test branch from 2e08de0 to 1b8d584 Compare May 29, 2024 17:05
@Oneirical Oneirical requested a review from jieyouxu May 29, 2024 17:09
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 29, 2024
@jieyouxu
Copy link
Member

Thanks, r=me after CI is green
@bors delegate+

@bors
Copy link
Contributor

bors commented May 29, 2024

✌️ @Oneirical, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@Oneirical Oneirical force-pushed the another-day-another-test branch from a94c002 to 2ac5faa Compare June 12, 2024 13:44
@Oneirical
Copy link
Contributor Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 12, 2024
@jieyouxu
Copy link
Member

Let's run a msvc try job to double check:
@bors try

@jieyouxu
Copy link
Member

r=me if the try job comes back green.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 12, 2024
…r=<try>

Rewrite `symlinked-extern`, `symlinked-rlib` and `symlinked-libraries` `run-make` tests in `rmake.rs` format

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

try-job: x86_64-msvc
@bors
Copy link
Contributor

bors commented Jun 12, 2024

⌛ Trying commit 2ac5faa with merge 274423a...

@bors
Copy link
Contributor

bors commented Jun 13, 2024

☀️ Try build successful - checks-actions
Build commit: 274423a (274423a5b5c831de005e321701e7b3b5a378f2cb)

@Oneirical
Copy link
Contributor Author

@bors r=@jieyouxu

@bors
Copy link
Contributor

bors commented Jun 13, 2024

📌 Commit 2ac5faa has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 13, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 13, 2024
…, r=jieyouxu

Rewrite `symlinked-extern`, `symlinked-rlib` and `symlinked-libraries` `run-make` tests in `rmake.rs` format

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

try-job: x86_64-msvc
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 13, 2024
…kingjubilee

Rollup of 11 pull requests

Successful merges:

 - rust-lang#125165 (Migrate `run-make/pgo-branch-weights` to `rmake`)
 - rust-lang#125674 (Rewrite `symlinked-extern`, `symlinked-rlib` and `symlinked-libraries` `run-make` tests in `rmake.rs` format)
 - rust-lang#125688 (Walk into alias-eq nested goals even if normalization fails)
 - rust-lang#126142 (Harmonize using root or leaf obligation in trait error reporting)
 - rust-lang#126303 (Urls to docs in rust_hir)
 - rust-lang#126328 (Add Option::is_none_or)
 - rust-lang#126337 (Add test for walking order dependent opaque type behaviour)
 - rust-lang#126351 (std::unix::fs::link using direct linkat call for Solaris.)
 - rust-lang#126353 (Move `MatchAgainstFreshVars` to old solver)
 - rust-lang#126356 (docs(rustc): Improve discoverable of Cargo docs)
 - rust-lang#126362 (Make `try_from_target_usize` method public)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 13, 2024
…kingjubilee

Rollup of 10 pull requests

Successful merges:

 - rust-lang#125674 (Rewrite `symlinked-extern`, `symlinked-rlib` and `symlinked-libraries` `run-make` tests in `rmake.rs` format)
 - rust-lang#125688 (Walk into alias-eq nested goals even if normalization fails)
 - rust-lang#126142 (Harmonize using root or leaf obligation in trait error reporting)
 - rust-lang#126303 (Urls to docs in rust_hir)
 - rust-lang#126328 (Add Option::is_none_or)
 - rust-lang#126337 (Add test for walking order dependent opaque type behaviour)
 - rust-lang#126353 (Move `MatchAgainstFreshVars` to old solver)
 - rust-lang#126356 (docs(rustc): Improve discoverable of Cargo docs)
 - rust-lang#126358 (safe transmute: support `Single` enums)
 - rust-lang#126362 (Make `try_from_target_usize` method public)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1a6b1a1 into rust-lang:master Jun 13, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 13, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 13, 2024
Rollup merge of rust-lang#125674 - Oneirical:another-day-another-test, r=jieyouxu

Rewrite `symlinked-extern`, `symlinked-rlib` and `symlinked-libraries` `run-make` tests in `rmake.rs` format

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

try-job: x86_64-msvc
@Oneirical Oneirical deleted the another-day-another-test branch June 13, 2024 13:41
@petrochenkov
Copy link
Contributor

@Oneirical @jieyouxu
These tests (symlinked-extern, symlinked-rlib, symlinked-libraries) are now failing on Windows for me.
The errors look like this:

thread 'main' panicked at C:\msys64\home\we\rust\src\tools\run-make-support\src\lib.rs:115:56:
failed to create symlink "other" for "libfoo.rlib": Os { code: 1314, kind: Uncategorized, message: "A required privilege is not held by the client." }

Symlink creation is a privileged operation (https://doc.rust-lang.org/stable/std/os/windows/fs/fn.symlink_file.html#limitations), it may be enabled on CI, but it's typically not enabled on user machines.

Standard library tests do not currently consider such failures fatal and treat the tests as ignored or passed, it would be better if run-make tests did the same thing.

@jieyouxu
Copy link
Member

jieyouxu commented Jun 22, 2024

@petrochenkov thanks for the heads up. I think I will mark these symlink tests as //@ ignore-windows, because imo it would be lying (false sense of security) to say the test "passed" on Windows because symlink failed.

@jieyouxu
Copy link
Member

Update: opened PR #126846 to ignore these tests on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants