syscalls: kill: Remove kill12
PATCH 1/1 syscalls: kill: Remove kill12
From: Ricardo B. Marlière <[email protected]>
The test scenario is already covered in kill11.
---
Hello,
after converting this test to the new API we have this:
static void run(void)
{
int pid;
int status;
for (int sig = 1; sig < 14; sig++) {
/* SIGKILL and SIGSTOP can't be catched */
if (sig == SIGKILL || sig == SIGSTOP)
continue;
pid = SAFE_FORK();
if (!pid) {
SAFE_SIGNAL(sig, SIG_IGN);
TST_CHECKPOINT_WAKE(0);
_exit(1);
}
TST_CHECKPOINT_WAIT(0);
SAFE_KILL(pid, sig); /* child should ignore this sig */
SAFE_WAIT(&status);
TST_EXP_EQ_LI(WTERMSIG(status), 0);
TST_EXP_EQ_LI(WIFEXITED(status), 1);
}
}static struct tst_test test = {
.test_all = run,
.forks_child = 1,
.needs_checkpoints = 1,
};
IMHO it should be removed in favor of kill11.
--- runtest/syscalls | 1 - testcases/kernel/syscalls/kill/.gitignore | 1 - testcases/kernel/syscalls/kill/kill12.c | 236 ------------------------------ 3 files changed, 238 deletions(-)
runtest/syscalls +0 -1
@@ -701,7 +701,6 @@ kill06 kill06 kill08 kill08 kill10 kill10 kill11 kill11 -kill12 kill12 kill13 kill13 landlock01 landlock01
testcases/kernel/syscalls/kill/.gitignore +0 -1
@@ -5,5 +5,4 @@ /kill08 /kill10 /kill11 -/kill12 /kill13
testcases/kernel/syscalls/kill/kill12.c deleted +0 -236
236 lines not on this page · raw message
---
base-commit: a908cff70f9389c2dd2bf535976cb179bfa8f340
change-id: 20250702-conversions-kill12-25f02d64de5f
Best regards,
Signature · 5 lines
Ricardo B. Marlière <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Merged! Thanks.
- Andrea
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 37 lines · Ricardo B. Marlière via ltp
From: Ricardo B. Marlière <[email protected]>
The test scenario is already covered in kill11.
Signed-off-by Ricardo B. Marlière <[email protected]>---
Hello,after converting this test to the new API we have this:
static void run(void)
{ int pid; int status; for (int sig = 1; sig < 14; sig++) { /* SIGKILL and SIGSTOP can't be catched */ if (sig == SIGKILL || sig == SIGSTOP) continue; pid = SAFE_FORK(); if (!pid) { SAFE_SIGNAL(sig, SIG_IGN); TST_CHECKPOINT_WAKE(0); _exit(1); } TST_CHECKPOINT_WAIT(0); SAFE_KILL(pid, sig); /* child should ignore this sig */ SAFE_WAIT(&status); TST_EXP_EQ_LI(WTERMSIG(status), 0); TST_EXP_EQ_LI(WIFEXITED(status), 1); } }
Quoted 5 lines
static struct
tst_testtest = {
.test_all = run,
.forks_child = 1,
.needs_checkpoints = 1,
};
I guess the reason why kill12 is still there is that we are also testing signals which were not defined in between 1-14. As far as I see, nowadays it makes sense to remove kill12.
@Cyril WDYT ?
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp