From: Caspar Zhang <caspar@casparzhang.com>
To: Zhouping Liu <zliu@redhat.com>
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH 2/3] syscalls/move_pages: modified HAS_NUMA_H as HAVE_NUMA_H
Date: Sat, 28 Apr 2012 15:56:25 +0800 [thread overview]
Message-ID: <4F9BA2A9.3000709@casparzhang.com> (raw)
In-Reply-To: <66ac99257dc97775fbb2b44287874ad43d408b4c.1335599279.git.zliu@redhat.com>
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 <zliu@redhat.com>
Acked-by: Caspar Zhang <caspar@casparzhang.com>
> ---
> 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 <numa.h>
> +#endif
> +#if HAVE_NUMAIF_H
> +#include <numaif.h>
> +#endif
> #include <semaphore.h>
>
> 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
next prev parent reply other threads:[~2012-04-28 7:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 7:48 [LTP] [PATCH 1/3] m4/ltp-numa.m4: fixed numa config Zhouping Liu
2012-04-28 7:48 ` [LTP] [PATCH 2/3] syscalls/move_pages: modified HAS_NUMA_H as HAVE_NUMA_H Zhouping Liu
2012-04-28 7:53 ` Garrett Cooper
2012-04-28 7:56 ` Caspar Zhang [this message]
2012-04-28 7:48 ` [LTP] [PATCH 3/3] syscalls/move_pages: removed tst_exit in check_config() Zhouping Liu
2012-04-28 7:56 ` Caspar Zhang
2012-04-28 7:57 ` [LTP] [PATCH 1/3] m4/ltp-numa.m4: fixed numa config Caspar Zhang
2012-04-28 11:35 ` Wanlong Gao
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=4F9BA2A9.3000709@casparzhang.com \
--to=caspar@casparzhang.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=zliu@redhat.com \
/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