Date: Thu, 8 May 2025 17:38:08 GMT From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a69fe6260402 - stable/14 - rc/tests: Fix process flags checks using ps(1) Message-ID: <202505081738.548Hc8TK042896@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a69fe62604021f120206e4064ca7463195aeb3a0 commit a69fe62604021f120206e4064ca7463195aeb3a0 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-05-06 13:52:39 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-05-08 17:34:53 +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 (cherry picked from commit 646375408742dd5ed9abb174a621a3f8f65a56ef) --- 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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505081738.548Hc8TK042896>