[PATCH v1] add -Y test for waitid
SuHsueyu
anolasc13 at gmail.com
Wed Mar 16 05:32:40 UTC 2022
---
tests/Makefile.am | 2 +-
tests/gen_tests.in | 2 +-
tests/waitid.c | 12 ++++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4ece0cde3..9328a734c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -371,8 +371,8 @@ check_PROGRAMS = $(PURE_EXECUTABLES) \
unix-pair-sendto-recvfrom \
vfork-f \
wait4-v \
- waitid-v \
waitid-Y \
+ waitid-v \
xet_robust_list--pidns-translation \
xetpgid--pidns-translation \
xetpriority--pidns-translation \
diff --git a/tests/gen_tests.in b/tests/gen_tests.in
index 1630edd50..a4b61fb61 100644
--- a/tests/gen_tests.in
+++ b/tests/gen_tests.in
@@ -1049,8 +1049,8 @@ vmsplice -ewrite=1
wait4 -esignal=none
wait4-v -v -e signal=none -e trace=wait4
waitid -esignal=none
-waitid-v -v -e signal=none -e trace=waitid
waitid-Y -Y -e signal=none -e trace=waitid
+waitid-v -v -e signal=none -e trace=waitid
waitpid -a28
xattr -a22 -e trace=getxattr,fgetxattr,lgetxattr,setxattr,fsetxattr,lsetxattr,listxattr,flistxattr,llistxattr,removexattr,fremovexattr,lremovexattr
xattr-strings -a22 -s 4 -e trace=fsetxattr
diff --git a/tests/waitid.c b/tests/waitid.c
index cef0194d0..6e425f485 100644
--- a/tests/waitid.c
+++ b/tests/waitid.c
@@ -170,7 +170,8 @@ main(void)
if (do_waitid(P_PID, pid, 0, WNOHANG|WEXITED, 0))
perror_msg_and_fail("waitid #1");
- tprintf("waitid(P_PID, %d%s, NULL, WNOHANG|WEXITED, NULL) = 0\n", pid, MY_COMM);
+ tprintf("waitid(P_PID, %d%s, NULL, WNOHANG|WEXITED, NULL) = 0\n",
+ pid, MY_COMM);
TAIL_ALLOC_OBJECT_CONST_PTR(siginfo_t, sinfo);
memset(sinfo, 0, sizeof(*sinfo));
@@ -200,7 +201,8 @@ main(void)
if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage))
perror_msg_and_fail("waitid #4");
tprintf("waitid(P_PID, %d%s, %s, WEXITED, %s) = 0\n",
- pid, MY_COMM, sprint_siginfo(sinfo, "SIGUSR1"), sprint_rusage(rusage));
+ pid, MY_COMM, sprint_siginfo(sinfo, "SIGUSR1"),
+ sprint_rusage(rusage));
if (pipe(fds))
perror_msg_and_fail("pipe");
@@ -221,7 +223,8 @@ main(void)
if (do_waitid(P_PID, pid, sinfo, WSTOPPED, rusage))
perror_msg_and_fail("waitid #5");
tprintf("waitid(P_PID, %d%s, %s, WSTOPPED, %s) = 0\n",
- pid, MY_COMM, sprint_siginfo(sinfo, "SIGSTOP"), sprint_rusage(rusage));
+ pid, MY_COMM, sprint_siginfo(sinfo, "SIGSTOP"),
+ sprint_rusage(rusage));
if (kill(pid, SIGCONT))
perror_msg_and_fail("kill(SIGCONT)");
@@ -230,7 +233,8 @@ main(void)
if (do_waitid(P_PID, pid, sinfo, WCONTINUED, rusage))
perror_msg_and_fail("waitid #6");
tprintf("waitid(P_PID, %d%s, %s, WCONTINUED, %s) = 0\n",
- pid, MY_COMM, sprint_siginfo(sinfo, "SIGCONT"), sprint_rusage(rusage));
+ pid, MY_COMM, sprint_siginfo(sinfo, "SIGCONT"),
+ sprint_rusage(rusage));
#endif /* WCONTINUED */
assert(write(1, "", 1) == 1);
--
2.25.1
More information about the Strace-devel
mailing list