-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes. #136556
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
[AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes. #136556
Conversation
…xiting and idle processes.
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
AFAIK this is less of a compiler test and more of a libs test, so r? libs |
// expected to be an integer. | ||
let filtered_ps: Vec<_> = ps_output | ||
.lines() | ||
.filter(|line| line.split(' ').filter(|x| 0 < x.len()).nth(1) != Some("-")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.filter(|line| line.split(' ').filter(|x| 0 < x.len()).nth(1) != Some("-")) | |
.filter(|line| line.split_whitespace().nth(1) != Some("-")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion, Xing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Looks fine! |
…ed-but-failed-child.rs, r=joboet [AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes. The `wait-forked-but-failed-child.rs` test expects to see an integer PPID in the output of the command: `ps -A -o pid,ppid,args`. However, on AIX, sometimes an integer PPID is not available when a process is either exiting or idle, as documented in https://www.ibm.com/docs/en/aix/7.3?topic=p-ps-command. In these situations, a `-` is instead shown in the PPID column of the `ps` output. This PR updates the test to accommodate this behaviour on AIX by first filtering out the lines of the `ps` output where a `-` is found in the `PPID` column.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#135179 (Make sure to use `Receiver` trait when extracting object method candidate) - rust-lang#136554 (Add `opt_alias_variances` and use it in outlives code) - rust-lang#136556 ([AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes.) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) - rust-lang#136615 (sys: net: Add UEFI stubs) - rust-lang#136635 (Remove outdated `base_port` calculation in std net test) - rust-lang#136682 (Move two windows process tests to tests/ui) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136556 - amy-kwan:amy-kwan/update_wait-forked-but-failed-child.rs, r=joboet [AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes. The `wait-forked-but-failed-child.rs` test expects to see an integer PPID in the output of the command: `ps -A -o pid,ppid,args`. However, on AIX, sometimes an integer PPID is not available when a process is either exiting or idle, as documented in https://www.ibm.com/docs/en/aix/7.3?topic=p-ps-command. In these situations, a `-` is instead shown in the PPID column of the `ps` output. This PR updates the test to accommodate this behaviour on AIX by first filtering out the lines of the `ps` output where a `-` is found in the `PPID` column.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#135179 (Make sure to use `Receiver` trait when extracting object method candidate) - rust-lang#136554 (Add `opt_alias_variances` and use it in outlives code) - rust-lang#136556 ([AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes.) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) - rust-lang#136615 (sys: net: Add UEFI stubs) - rust-lang#136635 (Remove outdated `base_port` calculation in std net test) - rust-lang#136682 (Move two windows process tests to tests/ui) r? `@ghost` `@rustbot` modify labels: rollup
The
wait-forked-but-failed-child.rs
test expects to see an integer PPID in theoutput of the command:
ps -A -o pid,ppid,args
.However, on AIX, sometimes an integer PPID is not available when a process is
either exiting or idle, as documented in https://www.ibm.com/docs/en/aix/7.3?topic=p-ps-command.
In these situations, a
-
is instead shown in the PPID column of theps
output.This PR updates the test to accommodate this behaviour on AIX by first filtering out the
lines of the
ps
output where a-
is found in thePPID
column.