[PATCH 6/7] kselftest/arm64: tpidr2: Switch to waitpid() over wait4()

Thomas Weißschuh posted 7 patches 1 month, 1 week ago
[PATCH 6/7] kselftest/arm64: tpidr2: Switch to waitpid() over wait4()
Posted by Thomas Weißschuh 1 month, 1 week ago
wait4() is deprecated, non-standard and about to be removed from nolibc.

Switch to the equivalent waitpid() call.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/testing/selftests/arm64/abi/tpidr2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/arm64/abi/tpidr2.c b/tools/testing/selftests/arm64/abi/tpidr2.c
index f58a9f89b952c42c5393b93a2db4fefe3f335e5a..3b520b7efa49e0058616c04fcdc0222bd8b03d8a 100644
--- a/tools/testing/selftests/arm64/abi/tpidr2.c
+++ b/tools/testing/selftests/arm64/abi/tpidr2.c
@@ -182,16 +182,16 @@ static int write_clone_read(void)
 	}
 
 	for (;;) {
-		waiting = wait4(ret, &status, __WCLONE, NULL);
+		waiting = waitpid(ret, &status, __WCLONE);
 
 		if (waiting < 0) {
 			if (errno == EINTR)
 				continue;
-			ksft_print_msg("wait4() failed: %d\n", errno);
+			ksft_print_msg("waitpid() failed: %d\n", errno);
 			return 0;
 		}
 		if (waiting != ret) {
-			ksft_print_msg("wait4() returned wrong PID %d\n",
+			ksft_print_msg("waitpid() returned wrong PID %d\n",
 				       waiting);
 			return 0;
 		}

-- 
2.50.1

Re: [PATCH 6/7] kselftest/arm64: tpidr2: Switch to waitpid() over wait4()
Posted by Catalin Marinas 1 month, 1 week ago
On Thu, Aug 21, 2025 at 05:40:37PM +0200, Thomas Weißschuh wrote:
> wait4() is deprecated, non-standard and about to be removed from nolibc.
> 
> Switch to the equivalent waitpid() call.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Re: [PATCH 6/7] kselftest/arm64: tpidr2: Switch to waitpid() over wait4()
Posted by Mark Brown 1 month, 1 week ago
On Thu, Aug 21, 2025 at 05:40:37PM +0200, Thomas Weißschuh wrote:
> wait4() is deprecated, non-standard and about to be removed from nolibc.
> 
> Switch to the equivalent waitpid() call.

Reviewed-by: Mark Brown <broonie@kernel.org>