[LTP] [PATCH v1] sigpending: use direct syscall

Matthias Männich maennich@google.com
Mon Feb 11 09:28:33 CET 2019



> On 7 Feb 2019, at 18:58, Steve Muckle <smuckle@google.com> wrote:
> 
> On 02/07/2019 07:51 AM, Matthias Maennich wrote:
>>  	/* set sigset to point to an invalid location */
>>  	sigset_t *sigset = (sigset_t *) - 1;
>>  -	TEST(sigpending(sigset));
>> +	TEST(tst_syscall(__NR_rt_sigpending, sigset, NSIG / 8));
>>    	/* check return code */
>>  	if (TST_RET == -1) {
> 
> Should this be using __NR_sigpending instead? That worked for me (for 32-bit anyway, it's not available on arm64).
> 
> Alternately, this test/dir could be renamed to rt_sigpending, though we should also add a test for sigpending.
> 

Syscall wrappers usually call __NR_rt_sigpending if the kernel provides it. So, I was going with this. But I guess you are right: if we already bypass the wrappers, we should adjust the tests accordingly.

I will update the patch.

Cheers,
Matthias


More information about the ltp mailing list