On Tue, Jul 7, 2009 at 5:46 AM, naresh kamboju<[email protected]> wrote: > Hi Garrett Cooper, > > Thanks for your info. > >>Oops... looks like someone forgot __amd64__ / >__ia64__: > > yes. > i forgot to add these ARCH. > Because I am not having this Architecture at my end :-( > >>gcc -g -O2 -I../../include -g -Wall -I../../../../include >-Wall -O2 -W >>rt_sigaction01.c -L../../../../lib -lltp -o rt_sigaction01 >>rt_sigaction01.c: In function 'set_handler': >>rt_sigaction01.c:147: error: 'SIGSETSIZE' >undeclared .(first use in >>this function) >>rt_sigaction01.c:147: error: (Each undeclared >identifier is reported only >>once >>rt_sigaction01.c:147: error: for each function it >appears in.) >>make[4]: *** [rt_sigaction01] Error 1 > >>I tried using sizeof(sigaction_t), but unfortunately the >results for >>the testcase(s) on my system were always EINVAL. >This issue wasn't >>present a few days ago... > >>Any ideas? > > > I have made a patch to fix this issue please review the this temporary fix. > > In my previous mail I have stated that sigset size (size_t sigsetsize) > will be different for Different ARCH. It is depending on > _COMPAT_NSIG_WORDS Macro. > > We have to conform how its different with respect to ARCH and need to > have a generic solution to fix this issue. > > I think its going to be an issue othere than __arm__ || __i386__ || > __powerpc__ || __amd64__ || __ia64__ and __mips__ > > There are different ARCH are being used by our LTP developers. > > I’ll investigate this issue and come back with generic Solution to > support most of the ARCH. > > > please refer this linux-2.6.30/include/linux/compat.h > > http://lxr.linux.no/linux+v2.6.30/include/linux/compat.h#L75 > > #define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) > > typedef struct { > compat_sigset_word sig[_COMPAT_NSIG_WORDS]; > } compat_sigset_t; > > Your suggestions are welcome ... :) > > > Best regards > Naresh Kamboju > > Signed-off-by: Naresh Kamboju < naresh.ker...@gm... > > > diff -Naurb a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c > b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c > --- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c 2009-07-07 > 16:58:11.000000000 +0530 > +++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c 2009-07-07 > 16:59:38.000000000 +0530 > @@ -59,7 +59,7 @@ > #define SIGSETSIZE 16 > #endif > > -#if defined __arm__ || __i386__ || __powerpc__ > +#if defined __arm__ || __i386__ || __powerpc__ || __amd64__ || __ia64__ > #define SIGSETSIZE 8 > #endif > > diff -Naurb a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c > b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c > --- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c 2009-07-07 > 16:58:11.000000000 +0530 > +++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c 2009-07-07 > 16:59:48.000000000 +0530 > @@ -55,7 +55,7 @@ > #define SIGSETSIZE 16 > #endif > > -#if defined __arm__ || __i386__ || __powerpc__ > +#if defined __arm__ || __i386__ || __powerpc__ || __amd64__ || __ia64__ > #define SIGSETSIZE 8 > #endif
Interesting. I checked the kernel sources and it appears that __mips__ is the only odd man out. Here's what I did (similar to what you did above, but I hardcoded values because you can't determine the actual values from compat.h without kernel sources AFAIK). It might be wiser to move to a general purpose header, btw... Thanks, -Garrett Signed-off-by: Garrett Cooper <[email protected]> Index: testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c,v retrieving revision 1.2 diff -u -r1.2 rt_sigaction01.c --- testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c 6 Jul 2009 15:24:06 -0000 1.2 +++ testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c 7 Jul 2009 16:02:21 -0000 @@ -55,15 +55,19 @@ #include "usctest.h" #include "linux_syscall_numbers.h" -#if defined __mips__ +/* + * _COMPAT_NSIG / _COMPAT_NSIG_BPW == 2. + * + * 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 -#endif - -#if defined __arm__ || __i386__ || __powerpc__ +#else #define SIGSETSIZE 8 #endif - /* Extern Global Variables */ extern int Tst_count; /* counter for tst_xxx routines. */ extern char *TESTDIR; /* temporary dir created by tst_tmpdir() */ Index: testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c,v retrieving revision 1.1 diff -u -r1.1 rt_sigaction02.c --- testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c 6 Jul 2009 15:24:06 -0000 1.1 +++ testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c 7 Jul 2009 16:02:21 -0000 @@ -51,11 +51,16 @@ #include "usctest.h" #include "linux_syscall_numbers.h" -#if defined __mips__ +/* + * _COMPAT_NSIG / _COMPAT_NSIG_BPW == 2. + * + * 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 -#endif - -#if defined __arm__ || __i386__ || __powerpc__ +#else #define SIGSETSIZE 8 #endif ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
