From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SO2We-0004z6-Cl for ltp-list@lists.sourceforge.net; Sat, 28 Apr 2012 07:57:04 +0000 Received: from mail-pz0-f46.google.com ([209.85.210.46]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1SO2Wb-0002TA-CQ for ltp-list@lists.sourceforge.net; Sat, 28 Apr 2012 07:57:04 +0000 Received: by dadz9 with SMTP id z9so2150767dad.33 for ; Sat, 28 Apr 2012 00:56:55 -0700 (PDT) Message-ID: <4F9BA2A9.3000709@casparzhang.com> Date: Sat, 28 Apr 2012 15:56:25 +0800 From: Caspar Zhang MIME-Version: 1.0 References: <9f6a3874d522c848218b164f61ff207760ed2b22.1335599279.git.zliu@redhat.com> <66ac99257dc97775fbb2b44287874ad43d408b4c.1335599279.git.zliu@redhat.com> In-Reply-To: <66ac99257dc97775fbb2b44287874ad43d408b4c.1335599279.git.zliu@redhat.com> Subject: Re: [LTP] [PATCH 2/3] syscalls/move_pages: modified HAS_NUMA_H as HAVE_NUMA_H List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: Zhouping Liu Cc: LTP List On 04/28/2012 03:48 PM, Zhouping Liu wrote: > HAS_NUMA_H should be HAVE_NUMA_H, and most functions are defined > in numa.h and numaif.h, so added the include headers into > move_pages_support.h > > Signed-off-by: Zhouping Liu Acked-by: Caspar Zhang > --- > testcases/kernel/syscalls/move_pages/move_pages_support.c | 12 ++++++------ > testcases/kernel/syscalls/move_pages/move_pages_support.h | 7 +++++++ > 2 files changed, 13 insertions(+), 6 deletions(-) > > diff --git a/testcases/kernel/syscalls/move_pages/move_pages_support.c b/testcases/kernel/syscalls/move_pages/move_pages_support.c > index 168805e..6bd95d3 100644 > --- a/testcases/kernel/syscalls/move_pages/move_pages_support.c > +++ b/testcases/kernel/syscalls/move_pages/move_pages_support.c > @@ -37,7 +37,7 @@ long get_page_size() > void free_pages(void **pages, unsigned int num) > { > > -#if HAS_NUMA_H > +#if HAVE_NUMA_H > int i; > size_t onepage = get_page_size(); > > @@ -112,7 +112,7 @@ int alloc_pages_linear(void **pages, unsigned int num) > { > int nodes[num]; > > -#if HAS_NUMA_H > +#if HAVE_NUMA_H > unsigned int i; > unsigned int n; > > @@ -208,7 +208,7 @@ verify_pages_on_nodes(void **pages, int *status, unsigned int num, int *nodes) > */ > void verify_pages_linear(void **pages, int *status, unsigned int num) > { > -#if HAS_NUMA_H > +#if HAVE_NUMA_H > unsigned int i; > unsigned int n; > int nodes[num]; > @@ -257,7 +257,7 @@ void verify_pages_on_node(void **pages, int *status, unsigned int num, int node) > */ > int alloc_shared_pages_on_node(void **pages, unsigned int num, int node) > { > -#if HAS_NUMA_H > +#if HAVE_NUMA_H > char *shared; > unsigned int i; > int nodes[num]; > @@ -380,7 +380,7 @@ void free_sem(sem_t * sem, int num) > */ > void check_config(unsigned int min_nodes) > { > -#if HAS_NUMA_H > +#if HAVE_NUMA_H && HAVE_NUMAIF_H > if (numa_available() < 0) { > tst_resm(TCONF, "NUMA support is not available"); > } else if (numa_max_node() < (min_nodes - 1)) { > @@ -392,4 +392,4 @@ void check_config(unsigned int min_nodes) > tst_resm(TCONF, "NUMA support not provided"); > #endif > tst_exit(); > -} > \ No newline at end of file > +} > diff --git a/testcases/kernel/syscalls/move_pages/move_pages_support.h b/testcases/kernel/syscalls/move_pages/move_pages_support.h > index 4081625..fd78572 100644 > --- a/testcases/kernel/syscalls/move_pages/move_pages_support.h > +++ b/testcases/kernel/syscalls/move_pages/move_pages_support.h > @@ -19,6 +19,13 @@ > #ifndef MOVE_PAGES_SUPPORT_H > #define MOVE_PAGES_SUPPORT_H > > +#include "config.h" > +#if HAVE_NUMA_H > +#include > +#endif > +#if HAVE_NUMAIF_H > +#include > +#endif > #include > > long get_page_size(); ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list