[LTP] [PATCH] rt_sigaction.h: adjust for ARC

Vineet Gupta Vineet.Gupta1 at synopsys.com
Mon Mar 7 03:50:52 PST 2016


On Monday 07 March 2016 04:29 PM, Cyril Hrubis wrote:
> We also check that we got EINVAL if the sigsetsize is wrong, which
> cannot be done with the libc wrapper.
>
> And we several testscases for the libc wrapper as well. Two in
> testcases/syscalls/sigaction/ directory and much more in
> testcases/open_posix_testsuite/conformance/interfaces/sigaction/.
>
> So both raw syscall and libc call are covered in LTP.

Fair enough - so LTP was a "Linux" test project - testing the raw kernel ABI makes
sense to check for correctness.
Although users will complain that sigaction(n, -1, 0) doesn't return with -EFAULT
but crashes. Oh well !

>>>> So for ARC just call what libc provides and don't claim to support
>>>> more/less.
> I do not understand, looking at:
>
> https://github.com/foss-for-synopsys-dwc-arc-processors/uClibc/blob/314dd3440686d6225ef1b93b5c5bdce852747a6b/libc/sysdeps/linux/arc/sigaction.c
>
> All you have to do in sa_restorer for arc is to call __NR_rt_sigreturn.
>
> Looking at the INTERNAL_SYSCALL_NCS it's just a few lines of inline
> assembler. So all you have to do to support this properly in LTP is to
> create restorer function taking the assembler and passing NR_sigreturn
> as syscall number to it.

Will do in next patch !

Thx,
-Vineet





More information about the linux-snps-arc mailing list