Hi, Got a chance to look into it further. There seems to be 2 issues.
1) eventfd didn't seem to get into the kernel until 2.6.22 (at least going
by what I found on lxr.linux.no). The system I was on was a Red Hat
Enterprise Linux 5 release with kernel 2.6.18 (this is the supported kernel
version that all RHEL5 update levels include by default). So
2) On SUSE Linux Enterprise Server 11 (kernel 2.6.27+), I find the
following for s390x:
lac0055:/usr/include # grep eventfd asm/unistd.h
#define __NR_eventfd 318
#define __NR_eventfd2 323
lac0055:/usr/include #
Playing with the testcase on the SLES11 system, it looks like the label is
defined if you include syscall.h otherwise you have to manually define it.
- Mark Ver
office: Building 710 / Room 2-RF-10
phone: (845) 435-7794 [tie 8 295-7794]
Garrett Cooper
<[email protected]
om> To
Mark Ver/Poughkeepsie/i...@ibmus
07/22/2009 08:09 cc
PM [email protected]
Subject
Re: [LTP] eventfd2_03
On Wed, Jul 22, 2009 at 4:36 PM, Mark Ver<[email protected]> wrote:
> Hi,
>
> Just recently downloaded the 20090630 version LTP. But it looks like
there
> is a new testcase "eventfd2_03" included as part of default which is
getting
> a compile problem and causing the LTP build to abort on s390x
architecture:
>
> ...
> make[4]: Entering directory
> `/root/ltp-full-20090630/testcases/kernel/syscalls/eventfd2'
> gcc -g -O2 -I../../include -g -Wall -I../../../../include -Wall
> eventfd2_03.c -L../../../../lib -lltp -o eventfd2_03
> eventfd2_03.c:48:2: error: #error Cannot detect your architecture!
> eventfd2_03.c: In function ‘eventfd2’:
> eventfd2_03.c:54: error: ‘__NR_eventfd2’ undeclared (first use in this
> function)
> eventfd2_03.c:54: error: (Each undeclared identifier is reported only
once
> eventfd2_03.c:54: error: for each function it appears in.)
> eventfd2_03.c: In function ‘xsem_wait’:
> eventfd2_03.c:65: warning: format ‘%llu’ expects type ‘long long unsigned
> int’, but argument 5 has type ‘u_int64_t’
> eventfd2_03.c: In function ‘main’:
> eventfd2_03.c:129: warning: implicit declaration of function ‘waitpid’
> make[4]: *** [eventfd2_03] Error 1
> make[4]: Leaving directory
> `/root/ltp-full-20090630/testcases/kernel/syscalls/eventfd2'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory
> `/root/ltp-full-20090630/testcases/kernel/syscalls'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/root/ltp-full-20090630/testcases/kernel'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/ltp-full-20090630/testcases'
> make: *** [all] Error 2
> [r...@m36distro2 ltp-full-20090630]#
>
>
> Looking at the code it does:
>
> #ifndef __NR_eventfd2
> #if defined(__x86_64__)
> #define __NR_eventfd2 290
> #elif defined(__i386__)
> #define __NR_eventfd2 328
> #else
> #error Cannot detect your architecture!
> #endif
> #endif
>
> So right away it looks like this test is expecting some PC based features
> and may not work on any architecture except x86_64 and i386 compatible
> systems. Not really sure why it got included as part of the default set
of
> testcases or why configure script did not weed it out as not for
s390/s390x.
>
> The testcase seems to be new and is not there on the 20090228 release.
I've
> heard that folks were successful using the 2009 May release as well, so
this
> looks to be just an issue in the 20090630 release.
Mark,
All of the issues minus the syscalls on have been solved.
As for it not compiling on x86 / x86_64, yes, it will need to be
removed from the compile list. We're not there yet though with the
Makefiles, so until then, maybe this should be yanked from the default
build?
I can't seem to find anything that clearly states that this is
strictly an x86 specific kernel feature though, so maybe the syscalls
just need to be filled in...
Thanks,
-Garrett
<<inline: graycol.gif>>
<<inline: pic65210.gif>>
<<inline: ecblank.gif>>
------------------------------------------------------------------------------
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
