-
Notifications
You must be signed in to change notification settings - Fork 13.4k
tests: Port jobserver-error
to rmake.rs
#135461
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
run-make/jobserver-error/Makefile | ||
run-make/split-debuginfo/Makefile | ||
run-make/symbol-mangling-hashed/Makefile | ||
run-make/translation/Makefile |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// ignore-tidy-linelength | ||
//! If the environment variables contain an invalid `jobserver-auth`, this used to cause an ICE | ||
//! until this was fixed in [do not panic on failure to acquire jobserver token | ||
//! #109694](https://github.com/rust-lang/rust/pull/109694). | ||
//! | ||
//! Proper handling has been added, and this test checks that helpful warnings and errors are | ||
//! printed instead in case of a wrong jobserver. See | ||
//! <https://github.com/rust-lang/rust/issues/46981>. | ||
|
||
//@ only-linux | ||
//@ ignore-cross-compile | ||
|
||
#![deny(warnings)] | ||
|
||
use run_make_support::{diff, rustc}; | ||
|
||
fn main() { | ||
let out = rustc() | ||
.stdin_buf(("fn main() {}").as_bytes()) | ||
.env("MAKEFLAGS", "--jobserver-auth=1000,1000") | ||
.run_fail() | ||
.stderr_utf8(); | ||
diff().expected_file("cannot_open_fd.stderr").actual_text("actual", out).run(); | ||
|
||
let out = rustc() | ||
.stdin_buf(("fn main() {}").as_bytes()) | ||
.input("-") | ||
.env("MAKEFLAGS", "--jobserver-auth=3,3") | ||
.set_aux_fd(3, std::fs::File::open("/dev/null").unwrap()) | ||
.run() | ||
.stderr_utf8(); | ||
diff().expected_file("not_a_pipe.stderr").actual_text("actual", out).run(); | ||
|
||
// FIXME(#110321): the Makefile version had a disabled check: | ||
// | ||
// ```makefile | ||
// bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3< <(cat /dev/null)' 2>&1 | diff poisoned_pipe.stderr - | ||
// ``` | ||
// | ||
// > the jobserver helper thread launched here gets starved out and doesn't run, while the | ||
// > coordinator thread continually processes work using the implicit jobserver token, never | ||
// > yielding long enough for the jobserver helper to do its work (and process the error). | ||
// | ||
// but is not necessarily worth fixing as it might require changing coordinator behavior that | ||
// might regress performance. See discussion at | ||
// <https://github.com/rust-lang/rust/issues/110321#issuecomment-1636914956>. | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.