Hi,

> On Mon, 2008-09-01 at 13:39 +0900, Masatake YAMATO wrote:
> > Hi,
> > 
> > I've written a testcase for signalfd.
> > 
> > Signed-off-by: Masatake YAMATO <[EMAIL PROTECTED]>
> 
> Thanks for writing these tests afresh. But, there seems to be some
> inherent problem in it´s compilation. It fails in all the machine
> combinations i tested. Please look at them below. Can you kindly address
> them and resend me an updated patch ?
> 
> 1) # uname -a
> Linux 2.6.9-22.EL #1 SMP Mon Sep 19 17:52:20 EDT 2005 ppc64 ppc64 ppc64
> GNU/Linux
> # gcc --version
> gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
> 
> 
> cc -Wall  -I../../include -g -Wall -I../../../../include -Wall
> signalfd01.c  -L../../../../lib -lltp -o signalfd01
> signalfd01.c:49:26: sys/signalfd.h: No such file or directory


signalfd.h is not found. signalfd is too new system call.

You wrote:
> > Is there any standard rule to handle such situation?
> > Generally autoconf helps. However, ltp people may
> > want to handle it runtime, not buildtime.
> > 
> > 
> > What we have to consider are:
> > 
> >      (1)   kernel version
> >      (1.1) kernel configuration
> >      (1.2) system call existence
> >      (2)   hardware platform
> >      (3)   library dependency
> >      (4)   header file dependency
> > 
> 
> Yes, we need to consider all these. I would prefer these things to be
> handled inside the source code itself, rather than handling them from
> Makefile, which otherwise makes the Makefile(s) look dirty. So, the
> handling from test source code should also be able to tell the exact
> reason amongst mentioned above.
> 
> If handled inside code, then the Makefile(s) will be spared from
> thinking what/how things should be built, instead the code inside wiull
> do this. And when the binary gets compiled, let it have the test code or
> exception code.


To handle this situation(no signalfd.h) in .[ch] file, I have to define 
my own signalfd with using syscall macro and types in my test case.
(I call this C level solution.)

To handle this situation in Makefile level, I have to define check_header 
macro in my Makefile and add run-xxx.sh script.
(I call this Makefile level solution.)


You wrote C level solution is better. However, I think implementing the
solution is hard to maintain the test cases. In addition C level solution
cannot detect the bug in glibc.

I'd like to choose Makefile level solution. 
In the next Mail I'll show my implemention of Makefile level solution.
So based on my code, please discuss which solution is better.

Masatake YAMATO

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to