Skip to contentSkip to conversation

syscalls: kill: Remove kill12

PATCH In review Ricardo B. Marlière via ltp 1 participant 3 messages Jul 2, 2025 – Jul 15, 2025

lore
Share & tools
lore
#0 lore raw

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
index 582422ac9ca8ccae598c626a11cf6ee7c30f0e3a..d6cced4a0bbd8a6e1e99f71a427edf403ef103b8 100644
@@ -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
index f73696b9d076e6e9cae9359dd825b3324115ed67..bdac95c157c685c594520e71776aefa6925d6d81 100644
@@ -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
#2 lore raw
In reply to Ricardo B. Marlière via 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.

---
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_test test = {
.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