syscalls: add tgkill test-cases
v3 cover syscalls: add tgkill test-cases
This patch-set is inherited from Greg which adds test-cases for tgkill syscall.
Changes in v3:
- Use checkpoint library to keep threads asleep while waiting for signals.
- Start threads during test setup() rather than test run().
Changes in v2:
- Free allocated memory for threads.
- Remove redundant call to stop_threads().
- Apply reviewed-by tag.
Greg Hackmann (3):
syscalls/tgkill01: add new test
syscalls/tgkill02: add new test
syscalls/tgkill03: add new test
runtest/syscalls | 4 + testcases/kernel/syscalls/tgkill/.gitignore | 3 + testcases/kernel/syscalls/tgkill/Makefile | 10 +++ testcases/kernel/syscalls/tgkill/tgkill.h | 22 +++++ testcases/kernel/syscalls/tgkill/tgkill01.c | 134 ++++++++++++++++++++++++++++ testcases/kernel/syscalls/tgkill/tgkill02.c | 68 ++++++++++++++ testcases/kernel/syscalls/tgkill/tgkill03.c | 110 +++++++++++++++++++++++ 7 files changed, 351 insertions(+) create mode 100644 testcases/kernel/syscalls/tgkill/.gitignore create mode 100644 testcases/kernel/syscalls/tgkill/Makefile create mode 100644 testcases/kernel/syscalls/tgkill/tgkill.h create mode 100644 testcases/kernel/syscalls/tgkill/tgkill01.c create mode 100644 testcases/kernel/syscalls/tgkill/tgkill02.c create mode 100644 testcases/kernel/syscalls/tgkill/tgkill03.c
Signature · 1 line
2.7.4
PATCH v3 1/3 syscalls/tgkill01: add new test
From: Greg Hackmann <[email protected]>
tgkill() delivers a signal to a specific thread. Test this by installing a SIGUSR1 handler which records the current pthread ID. Start a number of threads in parallel, then one-by-one call tgkill(..., tid, SIGUSR1) and check that the expected pthread ID was recorded.
--- runtest/syscalls | 2 + testcases/kernel/syscalls/tgkill/.gitignore | 1 + testcases/kernel/syscalls/tgkill/Makefile | 10 +++ testcases/kernel/syscalls/tgkill/tgkill.h | 22 +++++ testcases/kernel/syscalls/tgkill/tgkill01.c | 134 ++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+) create mode 100644 testcases/kernel/syscalls/tgkill/.gitignore create mode 100644 testcases/kernel/syscalls/tgkill/Makefile create mode 100644 testcases/kernel/syscalls/tgkill/tgkill.h create mode 100644 testcases/kernel/syscalls/tgkill/tgkill01.c
runtest/syscalls +2 -0
@@ -1400,6 +1400,8 @@ syslog10 syslog10 syslog11 syslog11 syslog12 syslog12 +tgkill01 tgkill01 + time01 time01 time02 time02
testcases/kernel/syscalls/tgkill/.gitignore new file +1 -0
@@ -0,0 +1 @@ +tgkill01
testcases/kernel/syscalls/tgkill/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Google, Inc. + +top_srcdir ?= ../../../.. + +include $(top_srcdir)/include/mk/testcases.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk + +LDLIBS += -pthread
testcases/kernel/syscalls/tgkill/tgkill.h new file +22 -0
@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (c) 2018 Google, Inc. +*/ + +#ifndef TGKILL_H +#define TGKILL_H + +#include "config.h" +#include "lapi/syscalls.h" + +static inline int sys_tgkill (int tgid,int tid,int sig) +{ +return tst_syscall (__NR_tgkill, tgid, tid, sig); +} + +static inline pid_t sys_gettid (void ) +{ +return tst_syscall (__NR_gettid); +} + +#endif /* TGKILL_H */
testcases/kernel/syscalls/tgkill/tgkill01.c new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 1/3 syscalls/tgkill01: add new test
Hi!
testcases/kernel/syscalls/tgkill/Makefile line 10
Quoted 13 lines
testcases/kernel/syscalls/tgkill/Makefile new file +10
-0@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Google, Inc. + +top_srcdir ?= ../../../.. + +include $(top_srcdir)/include/mk/testcases.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk + +LDLIBS += -pthread
I've changed this to CFLAGS += -pthread since that is only supported way how to compile programs with pthreads on Linux.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v3 2/3 syscalls/tgkill02: add new test
In reply to Sumit GargFrom: Greg Hackmann <[email protected]>
tgkill() should fail with EAGAIN when RLIMIT_SIGPENDING is reached with a real-time signal. Test this by starting a child thread with SIGRTMIN blocked and a limit of 0 pending signals, then attempting to deliver SIGRTMIN from the parent thread.
--- runtest/syscalls | 1 + testcases/kernel/syscalls/tgkill/.gitignore | 1 + testcases/kernel/syscalls/tgkill/tgkill02.c | 68 +++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 testcases/kernel/syscalls/tgkill/tgkill02.c
runtest/syscalls +1 -0
@@ -1401,6 +1401,7 @@ syslog11 syslog11 syslog12 syslog12 tgkill01 tgkill01 +tgkill02 tgkill02 time01 time01 time02 time02
testcases/kernel/syscalls/tgkill/.gitignore +1 -0
@@ -1 +1,2 @@ tgkill01 +tgkill02
testcases/kernel/syscalls/tgkill/tgkill02.c new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 3/3 syscalls/tgkill03: add new test
In reply to Sumit GargFrom: Greg Hackmann <[email protected]>
Test simple tgkill() error cases.
--- runtest/syscalls | 1 + testcases/kernel/syscalls/tgkill/.gitignore | 1 + testcases/kernel/syscalls/tgkill/tgkill03.c | 110 ++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 testcases/kernel/syscalls/tgkill/tgkill03.c
runtest/syscalls +1 -0
@@ -1402,6 +1402,7 @@ syslog12 syslog12 tgkill01 tgkill01 tgkill02 tgkill02 +tgkill03 tgkill03 time01 time01 time02 time02
testcases/kernel/syscalls/tgkill/.gitignore +1 -0
@@ -1,2 +1,3 @@ tgkill01 tgkill02 +tgkill03
testcases/kernel/syscalls/tgkill/tgkill03.c new file +110 -0
110 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 3/3 syscalls/tgkill03: add new test
Hi!
I've added one more ESRCH case here:
testcases/kernel/syscalls/tgkill/tgkill03.c +2 -1
@@ -76,7 +76,8 @@ static const struct testcase { { "Invalid tgid", &invalid_pid, &parent_tid, SIGUSR1, EINVAL }, { "Invalid tid", &parent_tgid, &invalid_pid, SIGUSR1, EINVAL }, { "Invalid signal", &parent_tgid, &parent_tid, -1, EINVAL }, - { "Defunct thread ID", &parent_tgid, &defunct_tid, SIGUSR1, ESRCH }, + { "Defunct tid", &parent_tgid, &defunct_tid, SIGUSR1, ESRCH }, + { "Defunct tgid", &defunct_tid, &child_tid, SIGUSR1, ESRCH }, { "Valid tgkill call", &parent_tgid, &child_tid, SIGUSR1, 0 }, };
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v3 3/3 syscalls/tgkill03: add new test
In reply to Sumit Garg----- Original Message -----
Quoted 5 lines
testcases/kernel/syscalls/tgkill/tgkill03.c new file +5
-0+static void setup (void ) +{ +sigset_t sigusr1; +pthread_t defunct_thread; +
testcases/kernel/syscalls/tgkill/tgkill03.c line 55
Quoted 10 lines
testcases/kernel/syscalls/tgkill/tgkill03.c new file +10
-0+sigemptyset (&sigusr1); +sigaddset (&sigusr1,SIGUSR1 ); +pthread_sigmask (SIG_BLOCK , &sigusr1,NULL ); + + parent_tgid =getpid (); + parent_tid =sys_gettid (); + +SAFE_PTHREAD_CREATE (&child_thread,NULL , child_thread_func,NULL ); + +TST_CHECKPOINT_WAIT (0 );
I'm seeing reports of this test failing on s390x:
st_test.c:1096: INFO: Timeout per run is 0h 05m 00s tgkill03.c:92: PASS: Invalid tgid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid tid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid signal failed as expected: EINVAL tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS tgkill03.c:92: PASS: Defunct tgid failed as expected: ESRCH tgkill03.c:99: PASS: Valid tgkill call succeeded
and I suspect this piece:
testcases/kernel/syscalls/tgkill/tgkill03.c line 60
Quoted 5 lines
testcases/kernel/syscalls/tgkill/tgkill03.c new file +5
-0+ +SAFE_PTHREAD_CREATE (&defunct_thread,NULL , defunct_thread_func,NULL ); + +SAFE_PTHREAD_JOIN (defunct_thread,NULL ); +}
glibc pthread_join() waits for CLONE_CHILD_CLEARTID to clear tid, and then resumes. Which kernel does at:
do_exit
exit_mm
mm_release
put_user(0, tsk->clear_child_tid);so there's still work to be done after that, and I suspect tid is still valid while that happens.
My first idea: wait until /proc/pid/task/<tid> disappears.
Regards,
Jan
PATCH v3 3/3 syscalls/tgkill03: add new test
Quoted 44 lines · Jan Stancek
----- Original Message -----
Quoted 5 lines
(quoted diff) +5
-0+static void setup(void) +{ + sigset_t sigusr1; + pthread_t defunct_thread; +Review
Quoted 10 lines
(quoted diff) +10
-0+ sigemptyset(&sigusr1); + sigaddset(&sigusr1, SIGUSR1); + pthread_sigmask(SIG_BLOCK, &sigusr1, NULL); + + parent_tgid = getpid(); + parent_tid = sys_gettid(); + + SAFE_PTHREAD_CREATE(&child_thread, NULL, child_thread_func, NULL); + + TST_CHECKPOINT_WAIT(0);I'm seeing reports of this test failing on s390x:
st_test.c:1096: INFO: Timeout per run is 0h 05m 00s tgkill03.c:92: PASS: Invalid tgid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid tid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid signal failed as expected: EINVAL tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS tgkill03.c:92: PASS: Defunct tgid failed as expected: ESRCH tgkill03.c:99: PASS: Valid tgkill call succeeded
and I suspect this piece:
Review
Quoted 2 lines
(quoted diff) +2
-0+ + SAFE_PTHREAD_CREATE(&defunct_thread, NULL, defunct_thread_func,NULL);
Review
Quoted 3 lines
(quoted diff) +3
-0+ + SAFE_PTHREAD_JOIN(defunct_thread, NULL); +}glibc
pthread_join()waits forCLONE_CHILD_CLEARTIDto clear tid, and then resumes. Which kernel does at:
do_exitexit_mm mm_release put_user(0, tsk->clear_child_tid);
Quoted 6 lines
so there's still work to be done after that, and I suspect tid is still valid
while that happens.My first idea: wait until /proc/pid/task/<tid> disappears.
The anaysis is probably right, but this idea doesn't work for me. Seems /proc/pid/task/<tid> is not the key point to confirm that tid has been clear.
I just have a try as below:
===========
# for i in `seq 1000`; do echo "i = $i" && ./tgkill03 || break; done ... i = 96 tst_test.c:1112: INFO: Timeout per run is 0h 05m 00s tgkill03.c:106: FAIL: Defunct tid should have failed with ESRCH: SUCCESS
===========
testcases/kernel/syscalls/tgkill/tgkill03.c +14 -5
@@ -5,6 +5,7 @@* Test simple tgkill() error cases. */ +#include <stdio.h> #include <pthread.h> #include <pwd.h> #include <sys/types.h>
@@ -19,6 +20,7 @@ static pid_t parent_tgid;static pid_t parent_tid;static pid_t child_tid;static pid_t defunct_tid; +char buf[1024 ];static const int invalid_pid =-1 ;
@@ -35,6 +37,8 @@ static void *defunct_thread_func(void *arg) { defunct_tid =sys_gettid (); +sprintf (buf,"/proc/pid/task/%d" , defunct_tid); +return arg; }
@@ -73,18 +77,23 @@ static const struct testcase {const int sig;const int err; } testcases[] = { - { "Invalid tgid", &invalid_pid, &parent_tid, SIGUSR1, EINVAL }, - { "Invalid tid", &parent_tgid, &invalid_pid, SIGUSR1, EINVAL }, - { "Invalid signal", &parent_tgid, &parent_tid, -1, EINVAL }, +// { "Invalid tgid", &invalid_pid, &parent_tid, SIGUSR1, EINVAL }, +// { "Invalid tid", &parent_tgid, &invalid_pid, SIGUSR1, EINVAL }, +// { "Invalid signal", &parent_tgid, &parent_tid, -1, EINVAL }, { "Defunct tid", &parent_tgid, &defunct_tid, SIGUSR1, ESRCH }, - { "Defunct tgid", &defunct_tid, &child_tid, SIGUSR1, ESRCH }, - { "Valid tgkill call", &parent_tgid, &child_tid, SIGUSR1, 0 }, +// { "Defunct tgid", &defunct_tid, &child_tid, SIGUSR1, ESRCH }, +// { "Valid tgkill call", &parent_tgid, &child_tid, SIGUSR1, 0 }, }; static void run(unsigned int i) { const struct testcase *tc = &testcases[i]; + // debug code // + while (access(buf, F_OK) == 0) { + tst_res(TINFO, "Debug: %s still exist!", buf); + } + TEST(sys_tgkill(*tc->tgid, *tc->tid, tc->sig)); if (tc->err) { if (TST_RET < 0 && TST_ERR == tc->err)
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20190616/e441e026/attachment.html>
PATCH v3 3/3 syscalls/tgkill03: add new test
----- Original Message -----
Quoted 86 lines · Jan Stancek
Quoted 45 lines
----- Original Message -----
Quoted 5 lines
(quoted diff) +5
-0+static void setup(void) +{ + sigset_t sigusr1; + pthread_t defunct_thread; +Review
Quoted 10 lines
(quoted diff) +10
-0+ sigemptyset(&sigusr1); + sigaddset(&sigusr1, SIGUSR1); + pthread_sigmask(SIG_BLOCK, &sigusr1, NULL); + + parent_tgid = getpid(); + parent_tid = sys_gettid(); + + SAFE_PTHREAD_CREATE(&child_thread, NULL, child_thread_func, NULL); + + TST_CHECKPOINT_WAIT(0);I'm seeing reports of this test failing on s390x:
st_test.c:1096: INFO: Timeout per run is 0h 05m 00s tgkill03.c:92: PASS: Invalid tgid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid tid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid signal failed as expected: EINVAL tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS tgkill03.c:92: PASS: Defunct tgid failed as expected: ESRCH tgkill03.c:99: PASS: Valid tgkill call succeeded
and I suspect this piece:
Review
Quoted 2 lines
(quoted diff) +2
-0+ + SAFE_PTHREAD_CREATE(&defunct_thread, NULL, defunct_thread_func,NULL);
Review
Quoted 3 lines
(quoted diff) +3
-0+ + SAFE_PTHREAD_JOIN(defunct_thread, NULL); +}glibc
pthread_join()waits forCLONE_CHILD_CLEARTIDto clear tid, and then resumes. Which kernel does at:
do_exitexit_mm mm_release put_user(0, tsk->clear_child_tid);Quoted 6 lines
so there's still work to be done after that, and I suspect tid is still valid
while that happens.My first idea: wait until /proc/pid/task/<tid> disappears.
The anaysis is probably right, but this idea doesn't work for me. Seems /proc/pid/task/<tid> is not the key point to confirm that tid has been clear.
I just have a try as below:
===========
# for i in `seq 1000`; do echo "i = $i" && ./tgkill03 || break; done ... i = 96 tst_test.c:1112: INFO: Timeout per run is 0h 05m 00s tgkill03.c:106: FAIL: Defunct tid should have failed with ESRCH: SUCCESS===========
testcases/kernel/syscalls/tgkill/tgkill03.c +2
-0@@ -5,6 +5,7 @@* Test simple tgkill() error cases. */ +#include <stdio.h> #include <pthread.h> #include <pwd.h> #include <sys/types.h> @@ -19,6 +20,7 @@ static pid_t parent_tgid;static pid_t parent_tid;static pid_t child_tid;static pid_t defunct_tid; +char buf[1024 ];static const int invalid_pid =-1 ;
testcases/kernel/syscalls/tgkill/tgkill03.c static void *defunct_thread_func(void *arg) · line 40
Quoted 4 lines
testcases/kernel/syscalls/tgkill/tgkill03.c +1
-0@@ -35,6 +37,8 @@ static void *defunct_thread_func(void *arg) { defunct_tid =sys_gettid (); +sprintf (buf,"/proc/pid/task/%d" , defunct_tid);
How about?
sprintf(buf, "/proc/%d/task/%d", getpid(), defunct_tid);
PATCH v3 3/3 syscalls/tgkill03: add new test
Quoted 89 lines · Jan Stancek
----- Original Message -----
Quoted 17 lines · Jan Stancek
Quoted 16 lines
----- Original Message -----
Review
Quoted 13 lines
(quoted diff) +13
-0+static void setup(void) +{ + sigset_t sigusr1; + pthread_t defunct_thread; + + sigemptyset(&sigusr1); + sigaddset(&sigusr1, SIGUSR1); + pthread_sigmask(SIG_BLOCK, &sigusr1, NULL); + + parent_tgid = getpid(); + parent_tid = sys_gettid(); + + SAFE_PTHREAD_CREATE(&child_thread, NULL, child_thread_func,NULL);
Quoted 68 lines
Quoted 29 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ + TST_CHECKPOINT_WAIT(0);I'm seeing reports of this test failing on s390x:
st_test.c:1096: INFO: Timeout per run is 0h 05m 00s tgkill03.c:92: PASS: Invalid tgid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid tid failed as expected: EINVAL tgkill03.c:92: PASS: Invalid signal failed as expected: EINVAL tgkill03.c:96: FAIL: Defunct tid should have failed with ESRCH: SUCCESS tgkill03.c:92: PASS: Defunct tgid failed as expected: ESRCH tgkill03.c:99: PASS: Valid tgkill call succeeded
and I suspect this piece:
Review
Quoted 2 lines
(quoted diff) +2
-0+ + SAFE_PTHREAD_CREATE(&defunct_thread, NULL, defunct_thread_func,NULL);
Review
Quoted 3 lines
(quoted diff) +3
-0+ + SAFE_PTHREAD_JOIN(defunct_thread, NULL); +}glibc
pthread_join()waits forCLONE_CHILD_CLEARTIDto clear tid, and then resumes. Which kernel does at:
do_exitexit_mm mm_release put_user(0, tsk->clear_child_tid);Quoted 6 lines
so there's still work to be done after that, and I suspect tid is still valid
while that happens.My first idea: wait until /proc/pid/task/<tid> disappears.
The anaysis is probably right, but this idea doesn't work for me. Seems /proc/pid/task/<tid> is not the key point to confirm that tid has been clear.
I just have a try as below:
===========
# for i in `seq 1000`; do echo "i = $i" && ./tgkill03 || break; done ... i = 96 tst_test.c:1112: INFO: Timeout per run is 0h 05m 00s tgkill03.c:106: FAIL: Defunct tid should have failed with ESRCH: SUCCESS===========
testcases/kernel/syscalls/tgkill/tgkill03.c +2
-0@@ -5,6 +5,7 @@* Test simple tgkill() error cases. */ +#include <stdio.h> #include <pthread.h> #include <pwd.h> #include <sys/types.h> @@ -19,6 +20,7 @@ static pid_t parent_tgid;static pid_t parent_tid;static pid_t child_tid;static pid_t defunct_tid; +char buf[1024 ];static const int invalid_pid =-1 ;
Quoted 10 lines
testcases/kernel/syscalls/tgkill/tgkill03.c static void *defunct_thread_func(void *arg) · line 40
Quoted 5 lines
testcases/kernel/syscalls/tgkill/tgkill03.c +1
-0@@ -35,6 +37,8 @@ static void *defunct_thread_func(void *arg) { defunct_tid =sys_gettid (); +sprintf (buf,"/proc/pid/task/%d" , defunct_tid);How about?
sprintf(buf, "/proc/%d/task/%d", getpid(), defunct_tid);
Ah, I was stupid to lost the getpid :-).
This look prettry good. The test fall into while loop when defunct_tid is still exit, and get the expected result once /proc/pid/task/<tid> disappears.
# for i in `seq 1000`; do echo "i = $i" && ./tgkill03 || break; done ... i = 997 tst_test.c:1112: INFO: Timeout per run is 0h 05m 00s tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:95: INFO: Debug: /proc/5164/task/5166 still exist! tgkill03.c:102: PASS: Defunct tgid failed as expected: ESRCH
Summary:
passed 1 failed 0 skipped 0
warnings 0
...
i = 1000
tst_test.c:1112: INFO: Timeout per run is 0h 05m 00s tgkill03.c:102: PASS: Defunct tgid failed as expected: ESRCH
Summary:
passed 1 failed 0 skipped 0
warnings 0
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20190616/a5257eb4/attachment-0001.html>
v3 cover syscalls: add tgkill test-cases
In reply to Sumit GargHi!
Pushed with minor changes, thanks.
Also we are still missing the EPERM error case, for that we would have to start the test as root, fork a child change the UID and GID and attempt to send a signal to parent process.
Signature · 2 lines
Cyril Hrubis [email protected]
v3 cover syscalls: add tgkill test-cases
Quoted 3 lines · Cyril Hrubis
Hi!
Pushed with minor changes, thanks.
Thanks for these changes and merge.
Quoted 5 lines
Also we are still missing the EPERM error case, for that we would have to start the test as root, fork a child change the UID and GID and attempt to send a signal to parent process.
Hmm I see. I will try to add test case for this too.
-Sumit
Quoted 3 lines
--
Cyril Hrubis
[email protected]