[LTP] [PATCH] waitpid01: Test all standard deadly signals

Petr Vorel pvorel@suse.cz
Wed Jan 31 11:14:20 CET 2024


> On 30. 01. 24 18:22, Petr Vorel wrote:
> > Hi Martin,

> > nice work.

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > ...
> > > +++ b/testcases/kernel/syscalls/waitpid/waitpid01.c
> > > @@ -5,25 +5,57 @@
> > >    * Copyright (c) 2018 Cyril Hrubis <chrubis@suse.cz>

> > Very nice cleanup, you deserve copyright, right?
> >   * Copyright (C) 2024 SUSE LLC <mdoucha@suse.cz>
> > >    */

> It's not that big of a change.

ack.

> > > Extend waitpid01 to test all standard signals that kill the target
> > > process unless caught. Also remove waitpid02 since testing SIGFPE
> > > in waitpid01 makes it redundant.
> > > +static int testcase_list[] = {
> > > +	SIGABRT,
> > > +	SIGALRM,
> > > +	SIGBUS,
> > > +	SIGFPE,
> > > +	SIGHUP,
> > > +	SIGILL,
> > > +	SIGINT,
> > > +	SIGKILL,
> > > +	SIGPIPE,
> > > +	SIGPOLL,
> > > +	SIGPROF,
> > > +	SIGQUIT,
> > > +	SIGSEGV,
> > > +	SIGSYS,
> > > +	SIGTERM,
> > > +	SIGTRAP,
> > > +	SIGVTALRM,
> > > +	SIGXCPU,
> > > +	SIGXFSZ
> > > +};

> > I suppose you ignored from the list of signals in man signal(7) these with
> > action "Core" "Term" unless without standard ("-"), right?
> > So user defined signals (SIGUSR1, SIGUSR2) does not make sense to test?

> I've skipped all non-standard signals (some of which are just aliases for
> standard ones) and I think it's better to avoid SIGUSR* since we use them
> internally. But we could also add signal(sig, SIG_DFL); before raise() and
> add SIGUSR* to the list.

Thanks for info. Feel free to send v2 (or let me know to wait). Otherwise I'll
merge it in the evening or tomorrow.

Kind regards,
Petr

> > Kind regards,
> > Petr


More information about the ltp mailing list