Skip to content

[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

Conversation

amy-kwan
Copy link
Contributor

@amy-kwan amy-kwan commented Feb 4, 2025

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.

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 4, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Feb 5, 2025

AFAIK this is less of a compiler test and more of a libs test, so

r? libs

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Feb 5, 2025
@rustbot rustbot assigned joboet and unassigned fee1-dead Feb 5, 2025
// expected to be an integer.
let filtered_ps: Vec<_> = ps_output
.lines()
.filter(|line| line.split(' ').filter(|x| 0 < x.len()).nth(1) != Some("-"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.filter(|line| line.split(' ').filter(|x| 0 < x.len()).nth(1) != Some("-"))
.filter(|line| line.split_whitespace().nth(1) != Some("-"))

Copy link
Contributor Author

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.

@amy-kwan amy-kwan requested a review from xingxue-ibm February 6, 2025 20:06
Copy link
Contributor

@xingxue-ibm xingxue-ibm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@joboet
Copy link
Member

joboet commented Feb 7, 2025

Looks fine!
@bors r+

@bors
Copy link
Collaborator

bors commented Feb 7, 2025

📌 Commit bdaf7a8 has been approved by joboet

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 Feb 7, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 7, 2025
…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.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2025
…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
@bors bors merged commit 8aa6cfb into rust-lang:master Feb 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2025
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.
@workingjubilee workingjubilee added the O-aix OS: Big Blue's Advanced Interactive eXecutive.. label Feb 14, 2025
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-aix OS: Big Blue's Advanced Interactive eXecutive.. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants