Implement needs-subprocess directive, and cleanup a bunch of tests to use needs-{subprocess,threads} by jieyouxu · Pull Request #135926 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation34 Commits26 Checks6 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

jieyouxu

Summary

Closes #128295.

Count of tests that use ignore-{wasm,wasm32,emscripten,sgx} before and after this PR:

State ignore-sgx ignore-wasm ignore-emscripten
Before this PR 96 88 207
After this PR 36 38 61

Commands used to find out locally

--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61

Review advice


r? @ghost (need to run try jobs)

try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: i686-mingw
try-job: x86_64-mingw-1
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: test-various
try-job: armhf-gnu

@rustbot

This comment was marked as resolved.

@rustbot

r? @oli-obk

rustbot has assigned @oli-obk.
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-compiletest

Area: The compiletest test runner

A-rustc-dev-guide

Area: rustc-dev-guide

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)

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jan 23, 2025

@jieyouxu

This comment was marked as outdated.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 23, 2025

@bors

Implement needs-subprocess directive, and cleanup a bunch of tests to use `needs-{subprocess,threads}

Summary

Count of tests that use ignore-{wasm,wasm32,emscripten,sgx} before and after this PR:

State ignore-sgx ignore-wasm ignore-emscripten
Before this PR 96 88 207
After this PR 36 38 61
Commands used to find out locally
--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61

Review advice


r? @ghost (need to run try jobs)

try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: aarch64-gnu try-job: test-various try-job: armhf-gnu

@bors

This comment was marked as outdated.

@jieyouxu jieyouxu changed the titleImplement needs-subprocess directive, and cleanup a bunch of tests to use `needs-{subprocess,threads} Implement needs-subprocess directive, and cleanup a bunch of tests to use needs-{subprocess,threads}

Jan 23, 2025

jieyouxu

@@ -4,8 +4,6 @@
// these platforms also.
//@ ignore-windows
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes
use std::process::Command;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is actually exercising the use import suggestion for the Unix CommandExt as an example

jieyouxu

#![allow(non_upper_case_globals)]
//@ ignore-emscripten no threads
//@ check-pass

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another closure type inference test, does not need to run

@jieyouxu jieyouxu 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

Jan 23, 2025

fmease

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as outdated.

@jieyouxu

This comment was marked as outdated.

jieyouxu

Comment on lines +492 to +501

pub fn has_subprocess_support(&self) -> bool {
// FIXME(#135928): compiletest is always a **host** tool. Building and running an
// capability detection executable against the **target** is not trivial. The short term
// solution here is to hard-code some targets to allow/deny, unfortunately.
let unsupported_target = self.target_cfg().env == "sgx"
| matches!(self.target_cfg().arch.as_str(), "wasm32"
| self.target_cfg().os == "emscripten";
!unsupported_target
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like it, but it is what it is, at least it's centralized here.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 23, 2025

@bors

Implement needs-subprocess directive, and cleanup a bunch of tests to use needs-{subprocess,threads}

Summary

Closes rust-lang#128295.

Count of tests that use ignore-{wasm,wasm32,emscripten,sgx} before and after this PR:

State ignore-sgx ignore-wasm ignore-emscripten
Before this PR 96 88 207
After this PR 36 38 61
Commands used to find out locally
--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61

Review advice


r? @ghost (need to run try jobs)

try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: aarch64-gnu try-job: test-various try-job: armhf-gnu

@bors

This comment was marked as resolved.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@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

Jan 23, 2025

@jieyouxu

I updated the tests manually and unfortunately there isn't really an easy way to just yolo replace, sorry for the ton of test changes.

oli-obk

@jieyouxu jieyouxu 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

Jan 23, 2025

@jieyouxu

@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

Jan 24, 2025

oli-obk

@@ -18,9 +18,9 @@
//@ ignore-android FIXME #17520
//@ ignore-openbsd no support for libbacktrace without filename
//@ ignore-wasm no backtrace support
//@ ignore-emscripten no panic or subprocess support
//@ ignore-sgx no subprocess support
//@ ignore-emscripten no panic support

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this also "no backtrace support"? It's a panic=abort target anyway, and this is not an unwind test

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wasn't sure about that one, which is why I opened Cleanup "no panic support" tests #135923. I have no idea what "no panic support" actually means, so I didn't modify those ones in this PR. I suspect it's actually needs-unwind, but I wasn't 100% sure so...

oli-obk

@oli-obk

@bors

📌 Commit 071ad37 has been approved by oli-obk

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

Jan 24, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jan 24, 2025

@matthiaskrgr

…r=oli-obk

Implement needs-subprocess directive, and cleanup a bunch of tests to use needs-{subprocess,threads}

Summary

Closes rust-lang#128295.

Count of tests that use ignore-{wasm,wasm32,emscripten,sgx} before and after this PR:

State ignore-sgx ignore-wasm ignore-emscripten
Before this PR 96 88 207
After this PR 36 38 61
Commands used to find out locally
--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61

Review advice


r? @ghost (need to run try jobs)

try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: aarch64-gnu try-job: test-various try-job: armhf-gnu

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 24, 2025

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 24, 2025

@bors

…iaskrgr

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jan 24, 2025

@rust-timer

Rollup merge of rust-lang#135926 - jieyouxu:needs-subprocess-thread, r=oli-obk

Implement needs-subprocess directive, and cleanup a bunch of tests to use needs-{subprocess,threads}

Summary

Closes rust-lang#128295.

Count of tests that use ignore-{wasm,wasm32,emscripten,sgx} before and after this PR:

State ignore-sgx ignore-wasm ignore-emscripten
Before this PR 96 88 207
After this PR 36 38 61
Commands used to find out locally
--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61

Review advice


r? @ghost (need to run try jobs)

try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: aarch64-gnu try-job: test-various try-job: armhf-gnu

@jieyouxu jieyouxu deleted the needs-subprocess-thread branch

January 25, 2025 03:45

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 3, 2025

@bors

Remove redundant //@ ignore-{wasm,wasm32,emscripten} in tests

Follow-up to rust-lang#135926.

When //@ needs-{unwind,subprocess} are the suitable capability guards.

Resolves rust-lang#135923.

r? @ghost

try-job: test-various

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 3, 2025

@bors

Remove generic //@ ignore-{wasm,wasm32,emscripten} in tests

Follow-up to rust-lang#135926.

In favor of capability-based guards //@ needs-{unwind,subprocess}.

Resolves rust-lang#135923.

r? @ghost

try-job: test-various

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Feb 3, 2025

@matthiaskrgr

Remove generic //@ ignore-{wasm,wasm32,emscripten} in tests

Follow-up to rust-lang#135926.

In favor of capability-based guards //@ needs-{unwind,subprocess}.

Resolves rust-lang#135923.

r? @ghost

try-job: test-various

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Feb 3, 2025

@matthiaskrgr

Remove generic //@ ignore-{wasm,wasm32,emscripten} in tests

Follow-up to rust-lang#135926.

In favor of capability-based guards //@ needs-{unwind,subprocess}.

Resolves rust-lang#135923.

r? @ghost

try-job: test-various

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Feb 4, 2025

@rust-timer

Rollup merge of rust-lang#136476 - jieyouxu:panic-panic-panic, r=lcnr

Remove generic //@ ignore-{wasm,wasm32,emscripten} in tests

Follow-up to rust-lang#135926.

In favor of capability-based guards //@ needs-{unwind,subprocess}.

Resolves rust-lang#135923.

r? @ghost

try-job: test-various

Labels

A-compiletest

Area: The compiletest test runner

A-rustc-dev-guide

Area: rustc-dev-guide

A-testsuite

Area: The testsuite used to check the correctness of rustc

A-tidy

Area: The tidy tool

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)

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.