git: 646375408742 - main - rc/tests: Fix process flags checks using ps(1)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 May 2025 09:15:36 UTC
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=646375408742dd5ed9abb174a621a3f8f65a56ef commit 646375408742dd5ed9abb174a621a3f8f65a56ef Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-05-06 13:52:39 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-05-07 09:14:55 +0000 rc/tests: Fix process flags checks using ps(1) These checks use ps(1) with both the '-p' and '-a' flags, which worked so far as ps(1)'s '-a' option was buggy. Since the fix in commit "ps(1): Make '-a' and '-A' always show all processes" (93a94ce731a89b56), such a command-line always selects all processes, making the specified '-p' useless and the test wrong. Remove the useless '-a'. While here, remove the redundant '-x', as '-p' implies '-x' by default. MFC after: 1 day Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50201 --- libexec/rc/tests/rc_subr_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh index f004354fe52e..60f77c2c2de3 100644 --- a/libexec/rc/tests/rc_subr_test.sh +++ b/libexec/rc/tests/rc_subr_test.sh @@ -59,9 +59,9 @@ oomprotect_all_body() atf_check -s exit:0 -o inline:"Starting ${__name}.\n" -e empty \ /bin/sh "$__script" "$__name" "$__pidfile" "$__childpidfile" onestart atf_check -s exit:0 -o match:'^..1..... .......1$' -e empty \ - ps -p "$(cat "$__pidfile")" -ax -o flags,flags2 + ps -p "$(cat "$__pidfile")" -o flags,flags2 atf_check -s exit:0 -o match:'^..1..... .......1$' -e empty \ - ps -p "$(cat "$__childpidfile")" -ax -o flags,flags2 + ps -p "$(cat "$__childpidfile")" -o flags,flags2 atf_check -s exit:0 -o ignore -e empty \ /bin/sh "$__script" "$__name" "$__pidfile" "$__childpidfile" onestop }