-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #121527 - Enselic:unix_sigpipe-tests-fixes, r=davidtwco
unix_sigpipe: Simple fixes and improvements in tests In #120832 I included 5 preparatory commits. It will take a while before discussions there and in #62569 is settled, so here is a PR that splits out 4 of the commits that are easy to review, to get them out of the way. r? ``@davidtwco`` who already approved these commits in #120832 (but I have tweaked them a bit and rebased them since then). For the convenience of my reviewer, here are the full commit messages of the commits: <details> <summary>Click to expand</summary> ``` commit 948b1d6 (HEAD -> unix_sigpipe-tests-fixes, origin/unix_sigpipe-tests-fixes) Author: Martin Nordholts <[email protected]> Date: Fri Feb 9 07:57:27 2024 +0100 tests: Add unix_sigpipe-different-duplicates.rs test variant To make sure that #[unix_sigpipe = "x"] #[unix_sigpipe = "y"] behaves like #[unix_sigpipe = "x"] #[unix_sigpipe = "x"] commit d14f158 Author: Martin Nordholts <[email protected]> Date: Fri Feb 9 08:47:47 2024 +0100 tests: Combine unix_sigpipe-not-used.rs and unix_sigpipe-only-feature.rs The only difference between the files is the presence/absence of #![feature(unix_sigpipe)] attribute. Avoid duplication by using revisions instead. commit a1cb3db Author: Martin Nordholts <[email protected]> Date: Fri Feb 9 06:44:56 2024 +0100 tests: Rename unix_sigpipe.rs to unix_sigpipe-bare.rs for clarity The test is for the "bare" variant of the attribute that looks like this: #[unix_sigpipe] which is not allowed, because it must look like this: #[unix_sigpipe = "sig_ign"] commit e060274 Author: Martin Nordholts <[email protected]> Date: Fri Feb 9 05:48:24 2024 +0100 tests: Fix typo unix_sigpipe-error.rs -> unix_sigpipe-sig_ign.rs There is no error expected. It's simply the "regular" test for sig_ign. So rename it. ``` </details> Tracking issue: #97889
- Loading branch information
Showing
9 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...tributes/unix_sigpipe/unix_sigpipe.stderr → ...tes/unix_sigpipe/unix_sigpipe-bare.stderr
This file contains 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
5 changes: 5 additions & 0 deletions
5
tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.rs
This file contains 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,5 @@ | ||
#![feature(unix_sigpipe)] | ||
|
||
#[unix_sigpipe = "sig_ign"] | ||
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes | ||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/attributes/unix_sigpipe/unix_sigpipe-different-duplicates.stderr
This file contains 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,14 @@ | ||
error: multiple `unix_sigpipe` attributes | ||
--> $DIR/unix_sigpipe-different-duplicates.rs:4:1 | ||
| | ||
LL | #[unix_sigpipe = "inherit"] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | ||
| | ||
note: attribute also specified here | ||
--> $DIR/unix_sigpipe-different-duplicates.rs:3:1 | ||
| | ||
LL | #[unix_sigpipe = "sig_ign"] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains 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,5 +1,5 @@ | ||
#![feature(unix_sigpipe)] | ||
|
||
#[unix_sigpipe = "sig_ign"] | ||
#[unix_sigpipe = "inherit"] | ||
#[unix_sigpipe = "inherit"] //~ error: multiple `unix_sigpipe` attributes | ||
fn main() {} |
This file contains 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 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
13 changes: 0 additions & 13 deletions
13
tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs
This file was deleted.
Oops, something went wrong.
File renamed without changes.