public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: ljhc@br.ibm.com
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] Fix eventfd2_03 build failure on powerpc	architecture
Date: Mon, 06 Jul 2009 21:20:30 +0530	[thread overview]
Message-ID: <1246895430.4887.45.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <1246486113.31426.12.camel@lucio-laptop>

On Wed, 2009-07-01 at 19:08 -0300, Lucio wrote: 
> Hi, 
> 
> I've found a failure when building ltp-full-20090630 on powerpc:
> 
> 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 ‘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
> 
> 
> This patch fixes the failure, the test program identifier and 
> adds a kernel version check.
> 
> 
> Signed-off-by Lucio Correia <ljhc@br.ibm.com>

Thanks.

Regards--
Subrata

> 
> diff -Nurp ltp-full-20090630/testcases/kernel/include/powerpc64.in ltp-full-20090630.new/testcases/kernel/include/powerpc64.in
> --- ltp-full-20090630/testcases/kernel/include/powerpc64.in	2008-12-12 13:13:18.000000000 -0200
> +++ ltp-full-20090630.new/testcases/kernel/include/powerpc64.in	2009-07-01 18:35:52.000000000 -0300
> @@ -20,6 +20,7 @@ __NR_symlinkat (__NR_openat + 9)
>  __NR_readlinkat (__NR_openat + 10)
>  __NR_fchmodat  (__NR_openat + 11)
>  __NR_faccessat (__NR_openat + 12)
> +__NR_utimensat 304
>  __NR_eventfd 307
>  __NR_fallocate 309
> -__NR_utimensat 304
> +__NR_eventfd2 314
> diff -Nurp ltp-full-20090630/testcases/kernel/include/powerpc.in ltp-full-20090630.new/testcases/kernel/include/powerpc.in
> --- ltp-full-20090630/testcases/kernel/include/powerpc.in	2009-07-01 18:08:33.000000000 -0300
> +++ ltp-full-20090630.new/testcases/kernel/include/powerpc.in	2009-07-01 18:24:24.000000000 -0300
> @@ -20,7 +20,8 @@ __NR_symlinkat (__NR_openat + 9)
>  __NR_readlinkat (__NR_openat + 10)
>  __NR_fchmodat  (__NR_openat + 11)
>  __NR_faccessat (__NR_openat + 12)
> +__NR_utimensat 304
>  __NR_eventfd 307
>  __NR_fallocate 309
> -__NR_utimensat 304
> +__NR_eventfd2 314
>  __NR_perf_counter_open 319
> diff -Nurp ltp-full-20090630/testcases/kernel/syscalls/eventfd2/eventfd2_03.c ltp-full-20090630.new/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
> --- ltp-full-20090630/testcases/kernel/syscalls/eventfd2/eventfd2_03.c	2009-06-15 15:26:34.000000000 -0300
> +++ ltp-full-20090630.new/testcases/kernel/syscalls/eventfd2/eventfd2_03.c	2009-07-01 18:50:26.000000000 -0300
> @@ -33,22 +33,17 @@
>  #include <unistd.h>
>  #include <errno.h>
>  
> -char *TCID = "eventfd2_02";     /* test program identifier*/
> +/* Harness Specific Include Files. */
> +#include "test.h"
> +#include "linux_syscall_numbers.h"
> +
> +char *TCID = "eventfd2_03";     /* test program identifier*/
> +int TST_TOTAL = 1;	        	/* total number of tests in this file */
>  
>  #ifndef EFD_SEMLIKE
>  #define EFD_SEMLIKE (1 << 0)
>  #endif
>  
> -#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
> -
>  
>  static int eventfd2(int count, int flags) {
>  	return syscall(__NR_eventfd2, count, flags);
> @@ -113,6 +108,11 @@ int main (int argc, char **argv) {
>  			return 1;
>  		}
>  	}
> +	if ((tst_kvercmp(2, 6, 27)) < 0) {
> +		tst_resm(TCONF,
> +			 "This test can only run on kernels that are 2.6.27 and higher");
> +		tst_exit();
> +	}
>  	if ((fd1 = eventfd2(0, EFD_SEMLIKE)) == -1 ||
>  	    (fd2 = eventfd2(0, EFD_SEMLIKE)) == -1) {
>  		perror("eventfd2");
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      reply	other threads:[~2009-07-06 15:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 22:08 [LTP] [PATCH] Fix eventfd2_03 build failure on powerpc architecture Lucio
2009-07-06 15:50 ` Subrata Modak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246895430.4887.45.camel@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=ljhc@br.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox