syscalls: kill: Remove kill07
PATCH 1/1 syscalls: kill: Remove kill07
From: Ricardo B. Marlière <[email protected]>
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of sigaction() to set up a handler for SIGKILL, but according to its manual page:
"EINVAL An invalid signal was specified. This will also be generated if an attempt is made to change the action for SIGKILL or SIGSTOP, which cannot be caught or ignored."
Therefore, since the handler can never be executed, flag will never be set to 1. This renders the test invalid.
--- runtest/syscalls | 1 - testcases/kernel/syscalls/kill/.gitignore | 1 - testcases/kernel/syscalls/kill/Makefile | 3 +- testcases/kernel/syscalls/kill/kill07.c | 230 ------------------------------ 4 files changed, 1 insertion(+), 234 deletions(-)
runtest/syscalls +0 -1
@@ -698,7 +698,6 @@ kill02 kill02 kill03 kill03 kill05 kill05 kill06 kill06 -kill07 kill07 kill08 kill08 kill10 kill10 kill11 kill11
testcases/kernel/syscalls/kill/.gitignore +0 -1
@@ -2,7 +2,6 @@ /kill03 /kill05 /kill06 -/kill07 /kill08 /kill10 /kill11
testcases/kernel/syscalls/kill/Makefile +1 -2
@@ -3,11 +3,10 @@ top_srcdir ?= ../../../.. -LTPLIBS = ipc newipc +LTPLIBS = newipc include $(top_srcdir)/include/mk/testcases.mk -kill07: LTPLDLIBS = -lltpipc kill05: LTPLDLIBS = -lltpnewipc include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/kill/kill07.c deleted +0 -230
230 lines not on this page · raw message
---
base-commit: bf9589d5bdeef15b3dbb03f896793306552d0d0f
change-id: 20250611-conversions-kill-a31e42d7bc24
Best regards,
Signature · 5 lines
Ricardo B. Marlière <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 12 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:"EINVAL An invalid signal was specified. This will also be generated if an attempt is made to change the action for SIGKILL or SIGSTOP, which cannot be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing action on SIGKILL/SIGSTOP?
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 11 lines · Li Wang
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 8 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:
Quoted 7 lines
Quoted 4 lines
"EINVAL An invalid signal was specified. This will also be generated if an attempt is made to change the action for SIGKILL or SIGSTOP, which cannot be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing action on SIGKILL/SIGSTOP?
But then we would be testing sigaction(). Could you please elaborate?
Thanks,
- Ricardo.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 16 lines · Ricardo B. Marlière
Quoted 12 lines · Li Wang
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 9 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:"EINVAL An invalid signal was specified. This will also be generated
if an
Quoted 1 line
Quoted 1 line
attempt is made to change the action for SIGKILL or SIGSTOP, which
cannot
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing action
on
Quoted 1 line
SIGKILL/SIGSTOP?
But then we would be testing
sigaction(). Could you please elaborate?
You're right, if we test sigaction(), then the code should be put into kernel/syscalls/sigaction/sigaction03.c.
Maybe we can try:
static void run(void)
{
struct sigaction act = {
.sa_handler = SIG_IGN,
};
int ret;
ret = sigaction(SIGKILL, &act, NULL);
if (ret == -1 && errno == EINVAL) {
tst_res(TPASS, "sigaction(SIGKILL) failed as expected with EINVAL");
} else {
tst_res(TFAIL, ...);
}
ret = sigaction(SIGSTOP, &act, NULL);
If (ret == -1 && errno == EINVAL) {
tst_res(TPASS, "sigaction(SIGSTOP) failed as expected with EINVAL");
} else {
tst_res(TFAIL, ...);
}
}Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 25 lines · Li Wang
Quoted 23 lines · Ricardo B. Marlière
Quoted 12 lines · Li Wang
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 9 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:"EINVAL An invalid signal was specified. This will also be generated
if an
Quoted 1 line
Quoted 1 line
attempt is made to change the action for SIGKILL or SIGSTOP, which
cannot
Quoted 4 lines
Quoted 2 lines
be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing action
on
Quoted 1 line
SIGKILL/SIGSTOP?
Quoted 7 lines
Quoted 2 lines
But then we would be testing
sigaction(). Could you please elaborate?You're right, if we test
sigaction(), then the code should be put intokernel/syscalls/sigaction/sigaction03.c.Maybe we can try:
Sure! But in any case kill07 should still be removed IMHO.
Quoted 23 lines
static void run(void)
{ struct sigaction act = { .sa_handler = SIG_IGN, }; int ret; ret = sigaction(SIGKILL, &act, NULL); if (ret == -1 && errno == EINVAL) { tst_res(TPASS, "sigaction(SIGKILL) failed as expected with EINVAL"); } else { tst_res(TFAIL, ...); } ret = sigaction(SIGSTOP, &act, NULL); If (ret == -1 && errno == EINVAL) { tst_res(TPASS, "sigaction(SIGSTOP) failed as expected with EINVAL"); } else { tst_res(TFAIL, ...); } }
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Li Wang via ltp
Reviewed-by Li WangQuoted 31 lines · Ricardo B. Marlière
Quoted 1 line · Li Wang
On Mon, Jun 16, 2025 at 7:02 PM Ricardo B. Marlière <[email protected]>
Quoted 13 lines · wrote:
Quoted 13 lines · Li Wang
Quoted 11 lines
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 8 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
"EINVAL An invalid signal was specified. This will also be generated
if an
Quoted 1 line
Quoted 1 line
attempt is made to change the action for SIGKILL or SIGSTOP, which
cannot
Quoted 4 lines
Quoted 2 lines
be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing
action
Quoted 6 lines
Quoted 5 lines
on
Quoted 1 line
SIGKILL/SIGSTOP?
But then we would be testing
sigaction(). Could you please elaborate?
Quoted 7 lines
Quoted 4 lines
You're right, if we test
sigaction(), then the code should be put intokernel/syscalls/sigaction/sigaction03.c.Maybe we can try:
Sure! But in any case kill07 should still be removed IMHO.
Agreed. If you plan to add sigaction03.c separately, this one should be good.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 36 lines · Li Wang
Quoted 34 lines · Ricardo B. Marlière
Quoted 1 line · Li Wang
On Mon, Jun 16, 2025 at 7:02 PM Ricardo B. Marlière <[email protected]>
Quoted 13 lines · wrote:
Quoted 13 lines · Li Wang
Quoted 11 lines
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 8 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
"EINVAL An invalid signal was specified. This will also be generated
if an
Quoted 1 line
Quoted 1 line
attempt is made to change the action for SIGKILL or SIGSTOP, which
cannot
Quoted 4 lines
Quoted 2 lines
be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing
action
Quoted 9 lines
Quoted 5 lines
on
Quoted 1 line
SIGKILL/SIGSTOP?
But then we would be testing
sigaction(). Could you please elaborate?You're right, if we test
sigaction(), then the code should be put intokernel/syscalls/sigaction/sigaction03.c.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Maybe we can try:
Sure! But in any case kill07 should still be removed IMHO.
Agreed. If you plan to add
sigaction03.cseparately, this one should be good.
I think this is already covered in sigaction02.c:
They should be converted to the new API, though.
Quoted 2 lines
Reviewed-by Li Wang <[email protected]>
Thanks for reviewing,
- Ricardo.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 44 lines · Ricardo B. Marlière
Quoted 1 line · Li Wang
On Mon, Jun 16, 2025 at 10:09 PM Ricardo B. Marlière <[email protected]>
Quoted 10 lines · wrote:
Quoted 10 lines · Li Wang
Quoted 1 line
On Mon, Jun 16, 2025 at 7:02 PM Ricardo B. Marlière <[email protected]>
Quoted 6 lines · wrote:
Quoted 6 lines · Li Wang
Quoted 4 lines
Ricardo B. Marlière via ltp <[email protected]> wrote:
From: Ricardo B. Marlière <[email protected]>
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
The test case description reads:
"Test case to check that SIGKILL can not be caught."
It makes use of
sigaction()to set up a handler for SIGKILL, but according to its manual page:"EINVAL An invalid signal was specified. This will also be
generated
Quoted 22 lines
Quoted 21 lines
Quoted 7 lines
Quoted 7 lines
if an
Quoted 1 line
Quoted 1 line
attempt is made to change the action for SIGKILL or SIGSTOP, which
cannot
Quoted 4 lines
Quoted 2 lines
be caught or ignored."
Or could we refactor kill07 to validate the EINVAL when changing
action
Quoted 10 lines
Quoted 5 lines
on
Quoted 1 line
SIGKILL/SIGSTOP?
But then we would be testing
sigaction(). Could you please elaborate?You're right, if we test
sigaction(), then the code should be put intokernel/syscalls/sigaction/sigaction03.c.Maybe we can try:
Sure! But in any case kill07 should still be removed IMHO.
Quoted 7 lines
Quoted 2 lines
Agreed. If you plan to add
sigaction03.cseparately, this one should be good.I think this is already covered in
sigaction02.c:
Oh, yes, I wasn't aware of that. Thanks for pointing that out. This patch merged!
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp