[LTP] 回复: [PATCH] rt_sigqueueinfo: Add negative tests for rt_sigqueueinfo

Xinjian Ma (Fujitsu) maxj.fnst@fujitsu.com
Thu Jan 9 11:15:19 CET 2025


Hi Petr

> Hi Ma Xinjian,
> 
> Gently ping.

Thanks for the ping, but this patch has been merged into before.
https://lore.kernel.org/ltp/Zw587CW6NtzV8es2@yuki.lan/

Best regards
Ma

> 
> Kind regards,
> Petr
> 
> > > +static siginfo_t siginfo_einval;
> > > +static siginfo_t siginfo_eperm;
> > > +static siginfo_t siginfo_esrch;
> 
> > Ideally these should be allocated as guarded buffers:
> 
> > https://linux-test-project.readthedocs.io/en/latest/developers/api_c_t
> > ests.html#guarded-buffers
> 
> > You can have a look at signalfd02.c and the .bufs in the tst_test
> > structure initialization.
> 
> ...
> > > +static void child_do(struct test_case_t *tc) {
> > > +	struct sigaction sa;
> > > +
> > > +	sa.sa_handler = sig_handler;
> > > +	SAFE_SIGEMPTYSET(&sa.sa_mask);
> > > +	if (tc->sig > 0)
> > > +		SAFE_SIGACTION(tc->sig, &sa, NULL);
> > > +	else
> > > +		SAFE_SIGACTION(SIGUSR1, &sa, NULL);
> > > +
> > > +	TST_CHECKPOINT_WAKE(0);
> > > +	TST_CHECKPOINT_WAIT(1);
> 
> > The child will never get any signal so all that needs to be done here
> > is to do TST_CHECKPOINT_WAIT() so that the child exists while the
> > parent runs.


More information about the ltp mailing list