also handle ENOTTY ioctl errors when checking pidfd -> pid support#151072
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Jan 14, 2026
Merged
also handle ENOTTY ioctl errors when checking pidfd -> pid support#151072rust-bors[bot] merged 1 commit intorust-lang:mainfrom
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
Member
Author
|
FYI @zmodem |
This comment has been minimized.
This comment has been minimized.
Otherwise the std testsuite fails on older kernels.
38e9b0c to
5435e81
Compare
zmodem
reviewed
Jan 13, 2026
| match pidfd.as_inner().pid() { | ||
| Ok(pid) => assert_eq!(pid, id), | ||
| Err(e) if e.kind() == ErrorKind::InvalidInput => { /* older kernel */ } | ||
| Err(e) if matches!(e.raw_os_error(), Some(libc::EINVAL | libc::ENOTTY)) => { |
Contributor
There was a problem hiding this comment.
Does libc::EINVAL | libc::ENOTTY do the right thing here? Doesn't it bitwise OR these, so it would also cover some values in between?
Member
Author
There was a problem hiding this comment.
Yes, that macro takes a pattern, so this is an OR-pattern match, not a value.
Member
|
While I'm not super familiar with this, it's a test, so I think it's reasonable to trust your expertise here :) @bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jan 14, 2026
also handle ENOTTY ioctl errors when checking pidfd -> pid support Otherwise the std testsuite fails on older kernels. Reported in rust-lang#150412 (comment)
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 14, 2026
…uwer Rollup of 12 pull requests Successful merges: - #149408 (refactor: remove Ord bound from BinaryHeap::new etc) - #150406 (Change some `matches!(.., .. if ..)` with let-chains) - #150723 (std: move `errno` and related functions into `sys::io`) - #150877 (resolve: Refactor away the side table `decl_parent_modules`) - #150902 (Update to_uppercase docs to avoid ß->SS example) - #150962 (Remove `FeedConstTy` and provide ty when lowering const arg) - #151034 (std: Change UEFI env vars to volatile storage) - #151036 (Better handle when trying to iterate on a `Range` of a type that isn't `Step`) - #151067 (Avoid should-fail in two ui tests and a codegen-llvm test) - #151072 (also handle ENOTTY ioctl errors when checking pidfd -> pid support) - #151077 (Recognize potential `impl<const N: usize>` to `impl<N>` mistake) - #151096 (Remove `Deref`/`DerefMut` impl for `Providers`.) Failed merges: - #150939 (resolve: Relax some asserts in glob overwriting and add tests) r? @ghost
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 14, 2026
…uwer Rollup of 11 pull requests Successful merges: - #149408 (refactor: remove Ord bound from BinaryHeap::new etc) - #150406 (Change some `matches!(.., .. if ..)` with let-chains) - #150723 (std: move `errno` and related functions into `sys::io`) - #150877 (resolve: Refactor away the side table `decl_parent_modules`) - #150902 (Update to_uppercase docs to avoid ß->SS example) - #151034 (std: Change UEFI env vars to volatile storage) - #151036 (Better handle when trying to iterate on a `Range` of a type that isn't `Step`) - #151067 (Avoid should-fail in two ui tests and a codegen-llvm test) - #151072 (also handle ENOTTY ioctl errors when checking pidfd -> pid support) - #151077 (Recognize potential `impl<const N: usize>` to `impl<N>` mistake) - #151096 (Remove `Deref`/`DerefMut` impl for `Providers`.) Failed merges: - #150939 (resolve: Relax some asserts in glob overwriting and add tests) r? @ghost
rust-timer
added a commit
that referenced
this pull request
Jan 14, 2026
Rollup merge of #151072 - fix-pidfd-ioctl, r=jhpratt also handle ENOTTY ioctl errors when checking pidfd -> pid support Otherwise the std testsuite fails on older kernels. Reported in #150412 (comment)
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jan 15, 2026
…uwer Rollup of 11 pull requests Successful merges: - rust-lang/rust#149408 (refactor: remove Ord bound from BinaryHeap::new etc) - rust-lang/rust#150406 (Change some `matches!(.., .. if ..)` with let-chains) - rust-lang/rust#150723 (std: move `errno` and related functions into `sys::io`) - rust-lang/rust#150877 (resolve: Refactor away the side table `decl_parent_modules`) - rust-lang/rust#150902 (Update to_uppercase docs to avoid ß->SS example) - rust-lang/rust#151034 (std: Change UEFI env vars to volatile storage) - rust-lang/rust#151036 (Better handle when trying to iterate on a `Range` of a type that isn't `Step`) - rust-lang/rust#151067 (Avoid should-fail in two ui tests and a codegen-llvm test) - rust-lang/rust#151072 (also handle ENOTTY ioctl errors when checking pidfd -> pid support) - rust-lang/rust#151077 (Recognize potential `impl<const N: usize>` to `impl<N>` mistake) - rust-lang/rust#151096 (Remove `Deref`/`DerefMut` impl for `Providers`.) Failed merges: - rust-lang/rust#150939 (resolve: Relax some asserts in glob overwriting and add tests) r? @ghost
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Otherwise the std testsuite fails on older kernels.
Reported in #150412 (comment)