Signed-off-by: Stanislav Kholmanskikh <[email protected]> --- include/ltp_signal.h | 17 +++++++++++++++++ .../kernel/syscalls/rt_sigaction/rt_sigaction02.c | 20 +------------------- .../kernel/syscalls/rt_sigaction/rt_sigaction03.c | 1 + 3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/include/ltp_signal.h b/include/ltp_signal.h index 95134e9..e6fb2e0 100644 --- a/include/ltp_signal.h +++ b/include/ltp_signal.h @@ -34,7 +34,24 @@ #include <stdio.h> #include "config.h" +/* + * For all but __mips__: + * + * _COMPAT_NSIG / _COMPAT_NSIG_BPW == 2. + * + * For __mips__: + * + * _COMPAT_NSIG / _COMPAT_NSIG_BPW == 4. + * + * See asm/compat.h under the kernel source for more details. + * + * Multiply that by a fudge factor of 4 and you have your SIGSETSIZE. + */ +#if defined __mips__ +#define SIGSETSIZE 16 +#else #define SIGSETSIZE (_NSIG / 8) +#endif #ifdef LTP_RT_SIG_TEST diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c index 5beabef..b89324f 100644 --- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c +++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c @@ -49,25 +49,7 @@ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" - -/* - * For all but __mips__: - * - * _COMPAT_NSIG / _COMPAT_NSIG_BPW == 2. - * - * For __mips__: - * - * _COMPAT_NSIG / _COMPAT_NSIG_BPW == 4. - * - * See asm/compat.h under the kernel source for more details. - * - * Multiply that by a fudge factor of 4 and you have your SIGSETSIZE. - */ -#if defined (__mips__) -#define SIGSETSIZE 16 -#else -#define SIGSETSIZE 8 -#endif +#include "ltp_signal.h" #define INVAL_STRUCT -1 diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c index 646c37d..279f342 100644 --- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c +++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c @@ -49,6 +49,7 @@ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" +#include "ltp_signal.h" #define INVAL_SIGSETSIZE -1 -- 1.7.1 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
