syscalls/waitpid: implement waitpid_ret_test()

Several test cases call waitpid() and then verify the returned
value and errno set. Moved this code into a function.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
3 files changed