[LTP] [PATCH] syscalls: kill: Remove kill12

Andrea Cervesato andrea.cervesato@suse.com
Tue Jul 15 10:40:40 CEST 2025


Hi!

On 7/2/25 4:13 PM, Ricardo B. Marlière via ltp wrote:
> From: Ricardo B. Marlière <rbm@suse.com>
>
> The test scenario is already covered in kill11.
>
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> 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,
> };

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 ?



More information about the ltp mailing list