mem/mbind01 was designed to test NUMA v2 lib, it will cause compile
error with old NUMA API version, this patch fixes this issue.

Signed-off-by: Caspar Zhang <[email protected]>
---
 testcases/kernel/mem/mbind/mbind01.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/mem/mbind/mbind01.c b/testcases/kernel/mem/mbind/mbind01.c
index 2bac1ca..9d99873 100644
--- a/testcases/kernel/mem/mbind/mbind01.c
+++ b/testcases/kernel/mem/mbind/mbind01.c
@@ -45,6 +45,8 @@ int TST_TOTAL = 1;
 #include <string.h>
 #include <errno.h>
 
+#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
+
 static unsigned long pagesize;
 static int opt_node;
 static char *opt_nodestr;
@@ -138,7 +140,12 @@ void usage(void)
 {
 	printf("  -n      Number of NUMA nodes\n");
 }
-
+#else /* libnuma v1 */
+int main(void) {
+	tst_brkm(TCONF, "XXX: test is only supported on libnuma v2.");
+	tst_exit();
+}
+#endif
 #else /* no NUMA */
 int main(void) {
 	tst_resm(TCONF, "no NUMA development packages installed.");
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to