From 2b0bbfef6e487846eccbc8e336169cc299b26fbb Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Tue, 6 Feb 2024 10:32:49 +0000 Subject: [PATCH] fix(test/drivers): wait the right pid Signed-off-by: Roberto Scolaro --- .../test_suites/syscall_exit_suite/process_vm_readv_x.cpp | 4 +++- .../test_suites/syscall_exit_suite/process_vm_writev_x.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/drivers/test_suites/syscall_exit_suite/process_vm_readv_x.cpp b/test/drivers/test_suites/syscall_exit_suite/process_vm_readv_x.cpp index 1952ccfd1b..34eb232f4b 100644 --- a/test/drivers/test_suites/syscall_exit_suite/process_vm_readv_x.cpp +++ b/test/drivers/test_suites/syscall_exit_suite/process_vm_readv_x.cpp @@ -98,7 +98,9 @@ TEST(SyscallExit, process_vm_readvX_success) assert_syscall_state(SYSCALL_SUCCESS, "process_vm_readv", read, NOT_EQUAL, 0); close(pipe_fd[0]); - wait(NULL); + + int wstatus; + waitpid(child_pid, &wstatus, 0); } /*=============================== TRIGGER SYSCALL ===========================*/ diff --git a/test/drivers/test_suites/syscall_exit_suite/process_vm_writev_x.cpp b/test/drivers/test_suites/syscall_exit_suite/process_vm_writev_x.cpp index f936e6fe11..0aa9aee64b 100644 --- a/test/drivers/test_suites/syscall_exit_suite/process_vm_writev_x.cpp +++ b/test/drivers/test_suites/syscall_exit_suite/process_vm_writev_x.cpp @@ -102,7 +102,8 @@ TEST(SyscallExit, process_vm_writevX_success) close(pipe_fd[1]); - wait(NULL); + int wstatus; + waitpid(child_pid, &wstatus, 0); } /*=============================== TRIGGER SYSCALL ===========================*/