* [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation
@ 2017-10-12 18:33 Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically Petr Vorel
` (17 more replies)
0 siblings, 18 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Hi,
I tested HEAD against:
./configure "CFLAGS=-m32" "CXXFLAGS=-m32" LDFLAGS="-m32" && make && make install
(I know we don't really need CXXFLAGS)
and each commit against normal build.
Petr Vorel (18):
configure.ac: Sort headers alphabetically
m4: Simplify check for linux/can.h header
m4: Simplify check for linux/keyctl.h header
lapi/keyctl.h: Add doc and reorder definitions
syscalls/request_key: Port to use lapi/keyctl.h header
m4: Fix libkeyutils detection on 32-bit cross build
nfsv4/acl1: Exit with TCONF when libacl not available
m4: Fix libacl detection on 32-bit cross build
m4: Fix libcrypto detection on 32-bit cross build
io/aiocp: Exit with TCONF when libaio is not available
m4: Fix libaio detection on 32-bit cross build
make: Remove workarounds for build without libnuma
numa: Drop NUMA API v1 support
numa: Drop NUMA_CPPFLAGS
hotplug/memory_hotplug: Update TODO
hotplug/memory_hotplug: Remove unused header
hotplug/memory_hotplug: Exit with TCONF when NUMA headers not
available
m4,kernel/lib: Detect libnuma presence in kernel libs
configure.ac | 13 +++---
include/lapi/keyctl.h | 53 +++++++++++++++++-----
include/mk/config.mk.default | 1 -
include/mk/config.mk.in | 1 -
m4/ltp-acl.m4 | 12 +++--
m4/ltp-can.m4 | 25 ----------
m4/ltp-crypto.m4 | 11 +++--
m4/ltp-eventfd.m4 | 17 ++++---
m4/ltp-keyctl.m4 | 25 ----------
m4/ltp-keyutils.m4 | 7 +--
m4/ltp-numa.m4 | 45 ++++++++----------
.../controllers/cpuset/cpuset_lib/libcpuset.c | 1 +
.../cpuset/cpuset_syscall_test/Makefile | 1 -
.../cpuset_syscall_test/cpuset_syscall_test.c | 5 +-
testcases/kernel/hotplug/memory_hotplug/TODO | 5 --
testcases/kernel/hotplug/memory_hotplug/commands.c | 17 ++-----
testcases/kernel/hotplug/memory_hotplug/memtoy.c | 17 ++++---
testcases/kernel/hotplug/memory_hotplug/segment.c | 6 ++-
testcases/kernel/include/lib.mk | 2 +-
testcases/kernel/include/numa_helper.h | 2 +-
testcases/kernel/io/aio/aio01/aio01.c | 23 ++++------
testcases/kernel/io/aio/aio02/aio_tio.c | 3 +-
testcases/kernel/io/aio/aio02/main.c | 8 ++--
testcases/kernel/io/ltp-aiodio/aio-stress.c | 15 +++++-
testcases/kernel/io/ltp-aiodio/aiocp.c | 11 ++---
testcases/kernel/io/ltp-aiodio/aiodio_append.c | 14 +++++-
testcases/kernel/io/ltp-aiodio/aiodio_sparse.c | 18 ++++++--
testcases/kernel/lib/Makefile | 3 +-
testcases/kernel/lib/numa_helper.c | 25 +++-------
testcases/kernel/mem/cpuset/cpuset01.c | 8 ++--
testcases/kernel/mem/ksm/ksm02.c | 9 ++--
testcases/kernel/mem/ksm/ksm04.c | 9 ++--
testcases/kernel/mem/ksm/ksm06.c | 12 +++--
testcases/kernel/mem/lib/mem.c | 13 +++---
testcases/kernel/mem/oom/oom02.c | 9 ++--
testcases/kernel/mem/oom/oom03.c | 10 ++--
testcases/kernel/mem/oom/oom04.c | 9 ++--
testcases/kernel/mem/oom/oom05.c | 9 ++--
testcases/kernel/mem/vma/vma02.c | 14 ++----
testcases/kernel/mem/vma/vma04.c | 13 ++----
testcases/kernel/numa/Makefile | 2 +-
.../integrity/ima/src/ima_boot_aggregate.c | 21 +++++----
.../security/integrity/ima/src/ima_measure.c | 24 +++++-----
testcases/kernel/syscalls/eventfd/eventfd01.c | 16 +++++--
.../syscalls/get_mempolicy/get_mempolicy01.c | 41 ++---------------
testcases/kernel/syscalls/io_cancel/io_cancel01.c | 12 +++--
.../kernel/syscalls/io_destroy/io_destroy01.c | 12 +++--
.../kernel/syscalls/io_getevents/io_getevents01.c | 13 +++---
testcases/kernel/syscalls/io_setup/io_setup01.c | 12 +++--
testcases/kernel/syscalls/io_submit/io_submit01.c | 11 +++--
testcases/kernel/syscalls/mbind/Makefile | 9 ----
testcases/kernel/syscalls/mbind/mbind01.c | 9 ++--
testcases/kernel/syscalls/migrate_pages/Makefile | 3 --
.../syscalls/migrate_pages/migrate_pages01.c | 8 ++--
.../syscalls/migrate_pages/migrate_pages02.c | 9 ++--
testcases/kernel/syscalls/move_pages/Makefile | 5 --
.../syscalls/move_pages/move_pages_support.c | 14 +++---
.../kernel/syscalls/request_key/request_key01.c | 14 +-----
.../kernel/syscalls/request_key/request_key02.c | 15 +-----
testcases/network/nfsv4/acl/acl1.c | 24 ++--------
60 files changed, 359 insertions(+), 416 deletions(-)
delete mode 100644 m4/ltp-can.m4
delete mode 100644 m4/ltp-keyctl.m4
--
2.14.2
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-13 11:24 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 02/18] m4: Simplify check for linux/can.h header Petr Vorel
` (16 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 82ebfc8da..fa66db6fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,18 +33,18 @@ AC_PREFIX_DEFAULT(/opt/ltp)
AC_CHECK_HEADERS([ \
ifaddrs.h \
libaio.h \
- mm.h \
- pthread.h \
- sys/xattr.h \
linux/genetlink.h \
linux/mempolicy.h \
linux/module.h \
linux/netlink.h \
+ mm.h \
+ pthread.h \
sys/epoll.h \
- sys/inotify.h \
sys/fanotify.h \
+ sys/inotify.h \
sys/prctl.h \
sys/ustat.h \
+ sys/xattr.h \
])
AC_CHECK_FUNCS([ \
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 02/18] m4: Simplify check for linux/can.h header
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 03/18] m4: Simplify check for linux/keyctl.h header Petr Vorel
` (15 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 2 +-
m4/ltp-can.m4 | 25 -------------------------
2 files changed, 1 insertion(+), 26 deletions(-)
delete mode 100644 m4/ltp-can.m4
diff --git a/configure.ac b/configure.ac
index fa66db6fc..0884d1f76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,7 @@ AC_PREFIX_DEFAULT(/opt/ltp)
AC_CHECK_HEADERS([ \
ifaddrs.h \
libaio.h \
+ linux/can.h \
linux/genetlink.h \
linux/mempolicy.h \
linux/module.h \
@@ -182,7 +183,6 @@ LTP_CHECK_TEE
LTP_CHECK_SPLICE
LTP_CHECK_VMSPLICE
LTP_CHECK_TIMERFD
-LTP_CHECK_CAN_SUPPORT
LTP_CHECK_IOVEC
LTP_CHECK_KEYCTL
LTP_CHECK_LINUXRANDOM
diff --git a/m4/ltp-can.m4 b/m4/ltp-can.m4
deleted file mode 100644
index af437ef5e..000000000
--- a/m4/ltp-can.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl
-dnl Copyright (c) Linux Test Project, 2014
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-dnl the GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-dnl
-
-dnl
-dnl LTP_CHECK_CAN_SUPPORT
-dnl ----------------------------
-dnl
-AC_DEFUN([LTP_CHECK_CAN_SUPPORT],[
-AC_CHECK_HEADERS([linux/can.h])
-])
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 03/18] m4: Simplify check for linux/keyctl.h header
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 02/18] m4: Simplify check for linux/can.h header Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 04/18] lapi/keyctl.h: Add doc and reorder definitions Petr Vorel
` (14 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 2 +-
m4/ltp-keyctl.m4 | 25 -------------------------
2 files changed, 1 insertion(+), 26 deletions(-)
delete mode 100644 m4/ltp-keyctl.m4
diff --git a/configure.ac b/configure.ac
index 0884d1f76..78d9da680 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,7 @@ AC_CHECK_HEADERS([ \
libaio.h \
linux/can.h \
linux/genetlink.h \
+ linux/keyctl.h \
linux/mempolicy.h \
linux/module.h \
linux/netlink.h \
@@ -184,7 +185,6 @@ LTP_CHECK_SPLICE
LTP_CHECK_VMSPLICE
LTP_CHECK_TIMERFD
LTP_CHECK_IOVEC
-LTP_CHECK_KEYCTL
LTP_CHECK_LINUXRANDOM
LTP_CHECK_IF_LINK
LTP_CHECK_KCMP
diff --git a/m4/ltp-keyctl.m4 b/m4/ltp-keyctl.m4
deleted file mode 100644
index 6a239ca64..000000000
--- a/m4/ltp-keyctl.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl
-dnl Copyright (c) 2014 Linux Test Project
-dnl
-dnl This program is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU General Public License as
-dnl published by the Free Software Foundation; either version 2 of
-dnl the License, or (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it would be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write the Free Software Foundation,
-dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-dnl
-
-dnl
-dnl LTP_CHECK_KEYCTL
-dnl ----------------------------
-dnl
-AC_DEFUN([LTP_CHECK_KEYCTL],[
-AC_CHECK_HEADERS([linux/keyctl.h])
-])
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 04/18] lapi/keyctl.h: Add doc and reorder definitions
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (2 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 03/18] m4: Simplify check for linux/keyctl.h header Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 05/18] syscalls/request_key: Port to use lapi/keyctl.h header Petr Vorel
` (13 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/lapi/keyctl.h | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
index 3e7ce4708..021d94868 100644
--- a/include/lapi/keyctl.h
+++ b/include/lapi/keyctl.h
@@ -65,12 +65,23 @@ static inline long keyctl(int cmd, ...)
}
#endif /* HAVE_KEYUTILS_H */
-#ifndef KEYCTL_GET_KEYRING_ID
-# define KEYCTL_GET_KEYRING_ID 0
+/* special process keyring shortcut IDs */
+#ifndef KEY_SPEC_THREAD_KEYRING
+# define KEY_SPEC_THREAD_KEYRING -1
#endif
-#ifndef KEYCTL_SET_REQKEY_KEYRING
-# define KEYCTL_SET_REQKEY_KEYRING 14
+#ifndef KEY_SPEC_SESSION_KEYRING
+# define KEY_SPEC_SESSION_KEYRING -3
+#endif
+
+/* request-key default keyrings */
+#ifndef KEY_REQKEY_DEFL_THREAD_KEYRING
+# define KEY_REQKEY_DEFL_THREAD_KEYRING 1
+#endif
+
+/* keyctl commands */
+#ifndef KEYCTL_GET_KEYRING_ID
+# define KEYCTL_GET_KEYRING_ID 0
#endif
#ifndef KEYCTL_JOIN_SESSION_KEYRING
@@ -89,16 +100,8 @@ static inline long keyctl(int cmd, ...)
# define KEYCTL_UNLINK 9
#endif
-#ifndef KEY_SPEC_THREAD_KEYRING
-# define KEY_SPEC_THREAD_KEYRING -1
-#endif
-
-#ifndef KEY_SPEC_SESSION_KEYRING
-# define KEY_SPEC_SESSION_KEYRING -3
-#endif
-
-#ifndef KEY_REQKEY_DEFL_THREAD_KEYRING
-# define KEY_REQKEY_DEFL_THREAD_KEYRING 1
+#ifndef KEYCTL_SET_REQKEY_KEYRING
+# define KEYCTL_SET_REQKEY_KEYRING 14
#endif
#endif /* KEYCTL_H__ */
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 05/18] syscalls/request_key: Port to use lapi/keyctl.h header
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (3 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 04/18] lapi/keyctl.h: Add doc and reorder definitions Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 06/18] m4: Fix libkeyutils detection on 32-bit cross build Petr Vorel
` (12 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/lapi/keyctl.h | 24 ++++++++++++++++++++++
.../kernel/syscalls/request_key/request_key01.c | 14 +------------
.../kernel/syscalls/request_key/request_key02.c | 15 ++------------
3 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
index 021d94868..b48bc1a3e 100644
--- a/include/lapi/keyctl.h
+++ b/include/lapi/keyctl.h
@@ -70,15 +70,27 @@ static inline long keyctl(int cmd, ...)
# define KEY_SPEC_THREAD_KEYRING -1
#endif
+#ifndef KEY_SPEC_PROCESS_KEYRING
+# define KEY_SPEC_PROCESS_KEYRING -2
+#endif
+
#ifndef KEY_SPEC_SESSION_KEYRING
# define KEY_SPEC_SESSION_KEYRING -3
#endif
+#ifndef KEY_SPEC_USER_SESSION_KEYRING
+#define KEY_SPEC_USER_SESSION_KEYRING -5
+#endif
+
/* request-key default keyrings */
#ifndef KEY_REQKEY_DEFL_THREAD_KEYRING
# define KEY_REQKEY_DEFL_THREAD_KEYRING 1
#endif
+#ifndef KEY_REQKEY_DEFL_DEFAULT
+#define KEY_REQKEY_DEFL_DEFAULT 0
+#endif
+
/* keyctl commands */
#ifndef KEYCTL_GET_KEYRING_ID
# define KEYCTL_GET_KEYRING_ID 0
@@ -92,6 +104,10 @@ static inline long keyctl(int cmd, ...)
# define KEYCTL_UPDATE 2
#endif
+#ifndef KEYCTL_REVOKE
+# define KEYCTL_REVOKE 3
+#endif
+
#ifndef KEYCTL_SETPERM
# define KEYCTL_SETPERM 5
#endif
@@ -100,8 +116,16 @@ static inline long keyctl(int cmd, ...)
# define KEYCTL_UNLINK 9
#endif
+#ifndef KEYCTL_READ
+# define KEYCTL_READ 11
+#endif
+
#ifndef KEYCTL_SET_REQKEY_KEYRING
# define KEYCTL_SET_REQKEY_KEYRING 14
#endif
+#ifndef KEYCTL_SET_TIMEOUT
+#define KEYCTL_SET_TIMEOUT 15
+#endif
+
#endif /* KEYCTL_H__ */
diff --git a/testcases/kernel/syscalls/request_key/request_key01.c b/testcases/kernel/syscalls/request_key/request_key01.c
index d46bafac0..457466cff 100644
--- a/testcases/kernel/syscalls/request_key/request_key01.c
+++ b/testcases/kernel/syscalls/request_key/request_key01.c
@@ -25,16 +25,10 @@
*
*/
-#include "config.h"
#include <errno.h>
-#include <sys/types.h>
-#ifdef HAVE_KEYUTILS_H
-# include <keyutils.h>
-#endif
#include "tst_test.h"
-
-#ifdef HAVE_KEYUTILS_H
+#include "lapi/keyctl.h"
static int key;
@@ -64,9 +58,3 @@ static struct tst_test test = {
.setup = setup,
.test_all = verify_request_key,
};
-
-#else
-
-TST_TEST_TCONF("keyutils.h was missing at compilation");
-
-#endif /* HAVE_LINUX_KEYCTL_H */
diff --git a/testcases/kernel/syscalls/request_key/request_key02.c b/testcases/kernel/syscalls/request_key/request_key02.c
index 9bba24119..5744378d7 100644
--- a/testcases/kernel/syscalls/request_key/request_key02.c
+++ b/testcases/kernel/syscalls/request_key/request_key02.c
@@ -29,15 +29,10 @@
*
*/
-#include "config.h"
#include <errno.h>
-#include <sys/types.h>
-#ifdef HAVE_KEYUTILS_H
-# include <keyutils.h>
-#endif
-#include "tst_test.h"
-#ifdef HAVE_KEYUTILS_H
+#include "tst_test.h"
+#include "lapi/keyctl.h"
static int key1;
static int key2;
@@ -111,9 +106,3 @@ static struct tst_test test = {
.tcnt = ARRAY_SIZE(tcases),
.test = verify_request_key,
};
-
-#else
-
-TST_TEST_TCONF("keyutils.h was missing at compilation");
-
-#endif /* HAVE_LINUX_KEYCTL_H */
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 06/18] m4: Fix libkeyutils detection on 32-bit cross build
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (4 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 05/18] syscalls/request_key: Port to use lapi/keyctl.h header Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 07/18] nfsv4/acl1: Exit with TCONF when libacl not available Petr Vorel
` (11 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
configure.ac | 1 +
include/lapi/keyctl.h | 6 ++++--
m4/ltp-keyutils.m4 | 7 ++++---
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 78d9da680..2356531cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_PREFIX_DEFAULT(/opt/ltp)
AC_CHECK_HEADERS([ \
ifaddrs.h \
+ keyutils.h \
libaio.h \
linux/can.h \
linux/genetlink.h \
diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
index b48bc1a3e..60d233462 100644
--- a/include/lapi/keyctl.h
+++ b/include/lapi/keyctl.h
@@ -19,12 +19,14 @@
#define KEYCTL_H__
#include "config.h"
-#ifdef HAVE_KEYUTILS_H
+
+#if defined(HAVE_KEYUTILS_H) && defined(HAVE_LIBKEYUTILS)
# include <keyutils.h>
#else
# ifdef HAVE_LINUX_KEYCTL_H
# include <linux/keyctl.h>
# endif /* HAVE_LINUX_KEYCTL_H */
+
# include <stdarg.h>
# include <stdint.h>
# include "lapi/syscalls.h"
@@ -63,7 +65,7 @@ static inline long keyctl(int cmd, ...)
return tst_syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
}
-#endif /* HAVE_KEYUTILS_H */
+#endif /* defined(HAVE_KEYUTILS_H) && defined(HAVE_LIBKEYUTILS) */
/* special process keyring shortcut IDs */
#ifndef KEY_SPEC_THREAD_KEYRING
diff --git a/m4/ltp-keyutils.m4 b/m4/ltp-keyutils.m4
index 74b7d3249..c65004947 100644
--- a/m4/ltp-keyutils.m4
+++ b/m4/ltp-keyutils.m4
@@ -18,7 +18,8 @@ dnl
dnl LTP_CHECK_KEYUTILS_SUPPORT
dnl ----------------------------
dnl
-AC_DEFUN([LTP_CHECK_KEYUTILS_SUPPORT],[
-AC_CHECK_HEADERS([keyutils.h], [keyutils_libs="-lkeyutils"])
-AC_SUBST([KEYUTILS_LIBS], [$keyutils_libs])
+AC_DEFUN([LTP_CHECK_KEYUTILS_SUPPORT], [
+ AC_CHECK_LIB([keyutils], [add_key],
+ [AC_DEFINE(HAVE_LIBKEYUTILS, 1, [Define to 1 if you have libkeyutils installed]),
+ AC_SUBST(KEYUTILS_LIBS, "-lkeyutils")])
])
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 07/18] nfsv4/acl1: Exit with TCONF when libacl not available
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (5 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 06/18] m4: Fix libkeyutils detection on 32-bit cross build Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-13 12:13 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 08/18] m4: Fix libacl detection on 32-bit cross build Petr Vorel
` (10 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
+ cleanup dos/windows headers
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/nfsv4/acl/acl1.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
index b8b67b4e3..1693d4347 100644
--- a/testcases/network/nfsv4/acl/acl1.c
+++ b/testcases/network/nfsv4/acl/acl1.c
@@ -4,31 +4,20 @@
* Purpose: setting an acl on a file a verifies that the accesses are right
*/
-#if defined (DOS) || defined (WIN32)
-/* If Dos, Windows or Win32 */
-#define DOSorWIN32
-#endif
-
-#ifndef DOSorWIN32
#include <sys/param.h>
-#endif
#include <stdlib.h>
#include <sys/types.h>
-#ifdef DOSorWIN32
-#include <time.h>
-#else
#include <sys/time.h>
-#endif
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
-//#include "../tests.h"
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
-#include <config.h>
+#include "config.h"
+#include "tst_res_flags.h"
#ifdef HAVE_SYS_ACL_H
@@ -378,11 +367,9 @@ int main(int argc, char *argv[])
}
#else
-
int main(void)
{
printf("The acl library was missing upon compilation.\n");
- return 0;
+ return TCONF;
}
-
#endif /* HAVE_SYS_ACL_H */
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 08/18] m4: Fix libacl detection on 32-bit cross build
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (6 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 07/18] nfsv4/acl1: Exit with TCONF when libacl not available Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-13 12:25 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 09/18] m4: Fix libcrypto " Petr Vorel
` (9 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
m4/ltp-acl.m4 | 12 +++++++-----
testcases/network/nfsv4/acl/acl1.c | 5 ++---
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/m4/ltp-acl.m4 b/m4/ltp-acl.m4
index 6b739346b..603837d9e 100644
--- a/m4/ltp-acl.m4
+++ b/m4/ltp-acl.m4
@@ -22,9 +22,11 @@ dnl
dnl LTP_CHECK_ACL_SUPPORT
dnl ----------------------------
dnl
-AC_DEFUN([LTP_CHECK_ACL_SUPPORT],[
-AH_TEMPLATE(HAVE_LIBACL,
-[Define to 1 if you have libacl installed.])
-AC_CHECK_HEADERS([sys/acl.h], [acl_libs="-lacl"])
-AC_SUBST([ACL_LIBS], [$acl_libs])
+AC_DEFUN([LTP_CHECK_ACL_SUPPORT], [
+ AC_CHECK_LIB([acl], [acl_init], [have_libacl=yes], [AC_MSG_WARN(missing libacl)])
+ AC_CHECK_HEADERS([sys/acl.h], [have_acl=yes], [AC_MSG_WARN(missing libacl headers)])
+ if test "x$have_libacl" = "xyes" -a "x$have_acl" = "xyes"; then
+ AC_DEFINE(HAVE_LIBACL, 1, [Define to 1 if you have libacl and it's headers installed])
+ AC_SUBST(ACL_LIBS, "-lacl")
+ fi
])
diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
index 1693d4347..bdf0180da 100644
--- a/testcases/network/nfsv4/acl/acl1.c
+++ b/testcases/network/nfsv4/acl/acl1.c
@@ -19,7 +19,7 @@
#include "config.h"
#include "tst_res_flags.h"
-#ifdef HAVE_SYS_ACL_H
+#ifdef HAVE_LIBACL
#include <sys/acl.h>
@@ -365,11 +365,10 @@ int main(int argc, char *argv[])
showstats();
return 1;
}
-
#else
int main(void)
{
printf("The acl library was missing upon compilation.\n");
return TCONF;
}
-#endif /* HAVE_SYS_ACL_H */
+#endif /* HAVE_LIBACL */
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 09/18] m4: Fix libcrypto detection on 32-bit cross build
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (7 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 08/18] m4: Fix libacl detection on 32-bit cross build Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-13 12:27 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 10/18] io/aiocp: Exit with TCONF when libaio is not available Petr Vorel
` (8 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
We check not only for openssl/sha.h but also for libcrypto.so.
Check are added in m4 so to simplify #if checks in C sources.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
m4/ltp-crypto.m4 | 11 ++++++----
.../integrity/ima/src/ima_boot_aggregate.c | 21 +++++++++++--------
.../security/integrity/ima/src/ima_measure.c | 24 +++++++++++-----------
3 files changed, 31 insertions(+), 25 deletions(-)
diff --git a/m4/ltp-crypto.m4 b/m4/ltp-crypto.m4
index 3dfc51266..c0c65e0cd 100644
--- a/m4/ltp-crypto.m4
+++ b/m4/ltp-crypto.m4
@@ -2,8 +2,11 @@ dnl
dnl LTP_CHECK_CRYPTO
dnl ----------------------------
dnl
-AC_DEFUN([LTP_CHECK_CRYPTO],
-[dnl
-AC_CHECK_HEADERS(openssl/sha.h,[CRYPTO_LIBS=-lcrypto],[CRYPTO_LIBS=])
-AC_SUBST(CRYPTO_LIBS)
+AC_DEFUN([LTP_CHECK_CRYPTO], [
+ AC_CHECK_LIB([crypto], [SHA1_Init], [have_libcrypto=yes], [AC_MSG_WARN(missing libcrypto)])
+ AC_CHECK_HEADERS([openssl/sha.h], [have_sha=yes], [AC_MSG_WARN(missing openssl headers)])
+ if test "x$have_libcrypto" = "xyes" -a "x$have_sha" = "xyes"; then
+ AC_DEFINE(HAVE_LIBCRYPTO, 1, [Define whether libcrypto and openssl headers are installed])
+ AC_SUBST(CRYPTO_LIBS, "-lcrypto")
+ fi
])
diff --git a/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c b/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c
index f67eb684b..d8e08928b 100644
--- a/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c
+++ b/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c
@@ -13,8 +13,6 @@
*
* Calculate a SHA1 boot aggregate value based on the TPM
* binary_bios_measurements.
-*
-* Requires openssl; compile with -lcrypto option
*/
#include <stdio.h>
#include <stdlib.h>
@@ -23,18 +21,20 @@
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+
#include "config.h"
#include "test.h"
-#if HAVE_OPENSSL_SHA_H
+
+char *TCID = "ima_boot_aggregate";
+
+#if HAVE_LIBCRYPTO
#include <openssl/sha.h>
-#endif
#define MAX_EVENT_SIZE 500
#define EVENT_HEADER_SIZE 32
#define MAX_EVENT_DATA_SIZE (MAX_EVENT_SIZE - EVENT_HEADER_SIZE)
#define NUM_PCRS 8 /* PCR registers 0-7 in boot aggregate */
-char *TCID = "ima_boot_aggregate";
int TST_TOTAL = 1;
static void display_sha1_digest(unsigned char *pcr)
@@ -48,7 +48,6 @@ static void display_sha1_digest(unsigned char *pcr)
int main(int argc, char *argv[])
{
-#if HAVE_OPENSSL_SHA_H
unsigned char boot_aggregate[SHA_DIGEST_LENGTH];
struct {
struct {
@@ -113,8 +112,12 @@ int main(int argc, char *argv[])
printf("boot_aggregate:");
display_sha1_digest(boot_aggregate);
-#else
- tst_resm(TCONF, "System doesn't have openssl/sha.h");
-#endif
tst_exit();
}
+
+#else
+int main(void)
+{
+ tst_resm(TCONF, "test requires libcrypto and openssl development packages");
+}
+#endif
diff --git a/testcases/kernel/security/integrity/ima/src/ima_measure.c b/testcases/kernel/security/integrity/ima/src/ima_measure.c
index 61851a36a..673e6ab2a 100644
--- a/testcases/kernel/security/integrity/ima/src/ima_measure.c
+++ b/testcases/kernel/security/integrity/ima/src/ima_measure.c
@@ -22,15 +22,17 @@
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+
#include "config.h"
#include "test.h"
-#if HAVE_OPENSSL_SHA_H
+
+char *TCID = "ima_measure";
+
+#if HAVE_LIBCRYPTO
#include <openssl/sha.h>
-#endif
#define TCG_EVENT_NAME_LEN_MAX 255
-char *TCID = "ima_measure";
int TST_TOTAL = 1;
static int verbose;
@@ -39,8 +41,6 @@ static int verbose;
if (verbose) \
printf(format, ##arg)
-#if HAVE_OPENSSL_SHA_H
-
static u_int8_t zero[SHA_DIGEST_LENGTH];
static u_int8_t fox[SHA_DIGEST_LENGTH];
@@ -97,8 +97,6 @@ static int verify_template_hash(struct event *template)
return 0;
}
-#endif
-
/*
* ima_measurements.c - calculate the SHA1 aggregate-pcr value based
* on the IMA runtime binary measurements.
@@ -131,8 +129,6 @@ static int verify_template_hash(struct event *template)
*/
int main(int argc, char *argv[])
{
-
-#if HAVE_OPENSSL_SHA_H
FILE *fp;
struct event template;
u_int8_t pcr[SHA_DIGEST_LENGTH];
@@ -212,8 +208,12 @@ int main(int argc, char *argv[])
verbose = 1;
print_info("PCRAggr (re-calculated):");
display_sha1_digest(pcr);
-#else
- tst_resm(TCONF, "System doesn't have openssl/sha.h");
-#endif
tst_exit();
}
+
+#else
+int main(void)
+{
+ tst_resm(TCONF, "test requires libcrypto and openssl development packages");
+}
+#endif
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 10/18] io/aiocp: Exit with TCONF when libaio is not available
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (8 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 09/18] m4: Fix libcrypto " Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-13 14:47 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 11/18] m4: Fix libaio detection on 32-bit cross build Petr Vorel
` (7 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/io/ltp-aiodio/aiocp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/io/ltp-aiodio/aiocp.c b/testcases/kernel/io/ltp-aiodio/aiocp.c
index a00a1a09f..93984bf28 100644
--- a/testcases/kernel/io/ltp-aiodio/aiocp.c
+++ b/testcases/kernel/io/ltp-aiodio/aiocp.c
@@ -34,7 +34,9 @@
#include <mntent.h>
#include <sys/select.h>
#include <sys/mount.h>
+
#include "config.h"
+#include "tst_res_flags.h"
#if HAVE_LIBAIO_H
@@ -602,7 +604,7 @@ int main(int argc, char *const *argv)
int main(void)
{
fprintf(stderr, "System doesn't have libaio support.\n");
- return 1;
+ return TCONF;
}
#endif
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 11/18] m4: Fix libaio detection on 32-bit cross build
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (9 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 10/18] io/aiocp: Exit with TCONF when libaio is not available Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-13 14:46 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 12/18] make: Remove workarounds for build without libnuma Petr Vorel
` (6 subsequent siblings)
17 siblings, 1 reply; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
m4/ltp-eventfd.m4 | 17 +++++++++-------
testcases/kernel/io/aio/aio01/aio01.c | 23 ++++++++++------------
testcases/kernel/io/aio/aio02/aio_tio.c | 3 +--
testcases/kernel/io/aio/aio02/main.c | 8 ++++----
testcases/kernel/io/ltp-aiodio/aio-stress.c | 15 ++++++++++++--
testcases/kernel/io/ltp-aiodio/aiocp.c | 7 ++-----
testcases/kernel/io/ltp-aiodio/aiodio_append.c | 14 +++++++++++--
testcases/kernel/io/ltp-aiodio/aiodio_sparse.c | 18 +++++++++++++----
testcases/kernel/syscalls/eventfd/eventfd01.c | 16 ++++++++++-----
testcases/kernel/syscalls/io_cancel/io_cancel01.c | 12 ++++++-----
.../kernel/syscalls/io_destroy/io_destroy01.c | 12 ++++++-----
.../kernel/syscalls/io_getevents/io_getevents01.c | 13 ++++++------
testcases/kernel/syscalls/io_setup/io_setup01.c | 12 ++++++-----
testcases/kernel/syscalls/io_submit/io_submit01.c | 11 ++++++-----
14 files changed, 111 insertions(+), 70 deletions(-)
diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
index 923b9bde3..c62ff87ba 100644
--- a/m4/ltp-eventfd.m4
+++ b/m4/ltp-eventfd.m4
@@ -22,13 +22,12 @@ dnl
dnl LTP_CHECK_SYSCALL_EVENTFD
dnl ----------------------------
dnl
-AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD],
-[dnl
+AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
AH_TEMPLATE(HAVE_IO_SET_EVENTFD,
[Define to 1 if you have the `io_set_eventfd' function.])
-AC_CHECK_HEADERS(libaio.h,[
- AC_CHECK_LIB(aio,io_setup,[
- AIO_LIBS="-laio"
+AC_CHECK_HEADERS(libaio.h, [
+ AC_CHECK_LIB(aio,io_setup, [
+ have_aio=yes
AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
AC_TRY_LINK([#include <stdio.h>
#include <libaio.h>
@@ -38,6 +37,10 @@ AC_CHECK_HEADERS(libaio.h,[
[AC_DEFINE(HAVE_IO_SET_EVENTFD)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])],
- AIO_LIBS="")])
-AC_SUBST(AIO_LIBS)
+ have_aio=no)])
+
+if test "x$have_aio" = "xyes"; then
+ AC_SUBST(AIO_LIBS, "-laio")
+ AC_DEFINE(HAVE_LIBAIO, 1, [Define whether libaio and it's headers are installed])
+fi
])
diff --git a/testcases/kernel/io/aio/aio01/aio01.c b/testcases/kernel/io/aio/aio01/aio01.c
index 2829b2485..ba23e226c 100644
--- a/testcases/kernel/io/aio/aio01/aio01.c
+++ b/testcases/kernel/io/aio/aio01/aio01.c
@@ -47,26 +47,26 @@
#define _XOPEN_SOURCE 600
-#include "test.h"
-#include "config.h"
-
-char *TCID = "aio01";
-int TST_TOTAL = 6;
-
-#ifdef HAVE_LIBAIO_H
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
-#include <libaio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include "test.h"
+#include "config.h"
+
+char *TCID = "aio01";
+int TST_TOTAL = 6;
+
+#ifdef HAVE_LIBAIO
+#include <libaio.h>
+
static void help(void);
static void setup(void);
static void cleanup(void);
@@ -413,14 +413,11 @@ static void cleanup(void)
close(fd);
io_queue_release(io_ctx);
tst_rmdir();
-
}
#else
-
int main(void)
{
- tst_brkm(TCONF, NULL, "libaio missing");
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
}
-
#endif
diff --git a/testcases/kernel/io/aio/aio02/aio_tio.c b/testcases/kernel/io/aio/aio02/aio_tio.c
index 34fa9ed51..08fb04162 100644
--- a/testcases/kernel/io/aio/aio02/aio_tio.c
+++ b/testcases/kernel/io/aio/aio02/aio_tio.c
@@ -37,7 +37,7 @@
#include <string.h>
#include <errno.h>
-#if HAVE_LIBAIO_H
+#ifdef HAVE_LIBAIO
#define AIO_MAXIO 32
#define AIO_BLKSIZE (64*1024)
@@ -237,5 +237,4 @@ int test_main(void)
return status;
}
-
#endif
diff --git a/testcases/kernel/io/aio/aio02/main.c b/testcases/kernel/io/aio/aio02/main.c
index 24ec17181..7b157f31b 100644
--- a/testcases/kernel/io/aio/aio02/main.c
+++ b/testcases/kernel/io/aio/aio02/main.c
@@ -6,16 +6,16 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include "test.h"
+
#include "config.h"
+#include "test.h"
#define TEST_NAME "aio_tio"
char *TCID = "aio02/" TEST_NAME;
int TST_TOTAL = 0;
-#if HAVE_LIBAIO_H
-
+#ifdef HAVE_LIBAIO
#include <libaio.h>
int test_main(void);
@@ -32,6 +32,6 @@ int main(void)
#else
int main(void)
{
- tst_brkm(TCONF, NULL, "libaio missing");
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
}
#endif
diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c b/testcases/kernel/io/ltp-aiodio/aio-stress.c
index d6d7b0880..348f398db 100644
--- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
+++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
@@ -50,19 +50,23 @@
#include <errno.h>
#include <assert.h>
#include <stdlib.h>
-
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
-#include <libaio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/mman.h>
#include <string.h>
#include <pthread.h>
+#include "config.h"
+#include "tst_res_flags.h"
+
+#ifdef HAVE_LIBAIO
+#include <libaio.h>
+
#define IO_FREE 0
#define IO_PENDING 1
#define RUN_FOREVER -1
@@ -1557,3 +1561,10 @@ int main(int ac, char **av)
}
return status;
}
+#else
+int main(void)
+{
+ fprintf(stderr, "test requires libaio and it's development packages\n");
+ return TCONF;
+}
+#endif
diff --git a/testcases/kernel/io/ltp-aiodio/aiocp.c b/testcases/kernel/io/ltp-aiodio/aiocp.c
index 93984bf28..d315353d0 100644
--- a/testcases/kernel/io/ltp-aiodio/aiocp.c
+++ b/testcases/kernel/io/ltp-aiodio/aiocp.c
@@ -38,8 +38,7 @@
#include "config.h"
#include "tst_res_flags.h"
-#if HAVE_LIBAIO_H
-
+#ifdef HAVE_LIBAIO
#include <libaio.h>
#define AIO_BLKSIZE (64*1024)
@@ -600,11 +599,9 @@ int main(int argc, char *const *argv)
*/
#else
-
int main(void)
{
- fprintf(stderr, "System doesn't have libaio support.\n");
+ fprintf(stderr, "test requires libaio and it's development packages\n");
return TCONF;
}
-
#endif
diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_append.c b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
index 39a529fa3..5d97ed941 100644
--- a/testcases/kernel/io/ltp-aiodio/aiodio_append.c
+++ b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
@@ -32,10 +32,14 @@
#include <fcntl.h>
#include <unistd.h>
-#include <libaio.h>
-
+#include "config.h"
#include "test.h"
+char *TCID = "aiodio_append";
+
+#ifdef HAVE_LIBAIO
+#include <libaio.h>
+
#define NUM_CHILDREN 8
#include "common_checkzero.h"
@@ -174,3 +178,9 @@ int main(int argc, char **argv)
return 0;
}
+#else
+int main(void)
+{
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
+}
+#endif
diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
index d40e45b1b..4767f49d2 100644
--- a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
+++ b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
@@ -35,11 +35,17 @@
#include <limits.h>
#include <getopt.h>
-#include <libaio.h>
+#include "config.h"
#include "test.h"
#include "safe_macros.h"
+char *TCID = "aiodio_sparse";
+int TST_TOTAL = 1;
+
+#ifdef HAVE_LIBAIO
+#include <libaio.h>
+
#define NUM_CHILDREN 1000
int debug;
@@ -49,9 +55,6 @@ static void setup(void);
static void cleanup(void);
static void usage(void);
-char *TCID = "aiodio_sparse";
-int TST_TOTAL = 1;
-
#include "common_sparse.h"
/*
@@ -325,3 +328,10 @@ static void cleanup(void)
tst_rmdir();
}
+
+#else
+int main(void)
+{
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
+}
+#endif
diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
index 37cca7d53..e4f9c804a 100644
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -61,15 +61,14 @@
#define CLEANUP cleanup
#include "lapi/syscalls.h"
-#ifdef HAVE_LIBAIO_H
+TCID_DEFINE(eventfd01);
+int TST_TOTAL = 15;
+
+#ifdef HAVE_LIBAIO
#include <libaio.h>
-#endif
static void setup(void);
-TCID_DEFINE(eventfd01);
-int TST_TOTAL = 15;
-
static int myeventfd(unsigned int initval, int flags)
{
/* eventfd2 uses FLAGS but eventfd doesn't take FLAGS. */
@@ -727,3 +726,10 @@ static void cleanup(void)
{
tst_rmdir();
}
+
+#else
+int main(void)
+{
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
+}
+#endif
diff --git a/testcases/kernel/syscalls/io_cancel/io_cancel01.c b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
index 8d7ca2607..ed6af050b 100644
--- a/testcases/kernel/syscalls/io_cancel/io_cancel01.c
+++ b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
@@ -21,6 +21,9 @@
/* Porting from Crackerjack to LTP is done
by Masatake YAMATO <yamato@redhat.com> */
+#include <errno.h>
+#include <string.h>
+
#include "config.h"
#include "test.h"
@@ -28,10 +31,8 @@ char *TCID = "io_cancel01";
int TST_TOTAL = 1;
-#ifdef HAVE_LIBAIO_H
+#ifdef HAVE_LIBAIO
#include <libaio.h>
-#include <errno.h>
-#include <string.h>
static void cleanup(void)
{
@@ -105,9 +106,10 @@ int main(int argc, char *argv[])
cleanup();
tst_exit();
}
+
#else
-int main(int argc, char *argv[])
+int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't have libaio support");
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
}
#endif
diff --git a/testcases/kernel/syscalls/io_destroy/io_destroy01.c b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
index 9de4987f4..88bef7ecf 100644
--- a/testcases/kernel/syscalls/io_destroy/io_destroy01.c
+++ b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
@@ -21,6 +21,9 @@
/* Porting from Crackerjack to LTP is done
by Masatake YAMATO <yamato@redhat.com> */
+#include <errno.h>
+#include <string.h>
+
#include "config.h"
#include "test.h"
@@ -28,10 +31,8 @@ char *TCID = "io_destroy01";
int TST_TOTAL = 1;
-#ifdef HAVE_LIBAIO_H
+#ifdef HAVE_LIBAIO
#include <libaio.h>
-#include <errno.h>
-#include <string.h>
static void cleanup(void)
{
@@ -99,9 +100,10 @@ int main(int argc, char *argv[])
cleanup();
tst_exit();
}
+
#else
-int main(int argc, char *argv[])
+int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
}
#endif
diff --git a/testcases/kernel/syscalls/io_getevents/io_getevents01.c b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
index 0f31ece32..b34f17907 100644
--- a/testcases/kernel/syscalls/io_getevents/io_getevents01.c
+++ b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
@@ -21,17 +21,17 @@
/* Porting from Crackerjack to LTP is done
by Masatake YAMATO <yamato@redhat.com> */
+#include <errno.h>
+#include <string.h>
+
#include "config.h"
#include "test.h"
char *TCID = "io_getevents01";
-
int TST_TOTAL = 1;
-#ifdef HAVE_LIBAIO_H
+#ifdef HAVE_LIBAIO
#include <libaio.h>
-#include <errno.h>
-#include <string.h>
static void cleanup(void)
{
@@ -104,9 +104,10 @@ int main(int argc, char *argv[])
cleanup();
tst_exit();
}
+
#else
-int main(int argc, char *argv[])
+int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
}
#endif
diff --git a/testcases/kernel/syscalls/io_setup/io_setup01.c b/testcases/kernel/syscalls/io_setup/io_setup01.c
index 829cef516..22b91bc17 100644
--- a/testcases/kernel/syscalls/io_setup/io_setup01.c
+++ b/testcases/kernel/syscalls/io_setup/io_setup01.c
@@ -21,6 +21,9 @@
/* Porting from Crackerjack to LTP is done
by Masatake YAMATO <yamato@redhat.com> */
+#include <errno.h>
+#include <string.h>
+
#include "config.h"
#include "test.h"
@@ -28,10 +31,8 @@ char *TCID = "io_setup01";
int TST_TOTAL = 4;
-#ifdef HAVE_LIBAIO_H
+#ifdef HAVE_LIBAIO
#include <libaio.h>
-#include <errno.h>
-#include <string.h>
static void cleanup(void)
{
@@ -131,9 +132,10 @@ int main(int argc, char *argv[])
tst_exit();
}
+
#else
-int main(int argc, char *argv[])
+int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
+ tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
}
#endif
diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
index 9baf520b8..f4f9933f6 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit01.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
@@ -20,14 +20,15 @@
/* Porting from Crackerjack to LTP is done
by Masatake YAMATO <yamato@redhat.com> */
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+
#include "config.h"
#include "tst_test.h"
-#ifdef HAVE_LIBAIO_H
+#ifdef HAVE_LIBAIO
#include <libaio.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
static io_context_t ctx;
static io_context_t invalid_ctx;
@@ -139,5 +140,5 @@ static struct tst_test test = {
};
#else
- TST_TEST_TCONF("libaio.h was mission upon compilation");
+ TST_TEST_TCONF("test requires libaio and it's development packages");
#endif
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 12/18] make: Remove workarounds for build without libnuma
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (10 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 11/18] m4: Fix libaio detection on 32-bit cross build Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 13/18] numa: Drop NUMA API v1 support Petr Vorel
` (5 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/mbind/Makefile | 9 ---------
testcases/kernel/syscalls/migrate_pages/Makefile | 3 ---
testcases/kernel/syscalls/move_pages/Makefile | 5 -----
3 files changed, 17 deletions(-)
diff --git a/testcases/kernel/syscalls/mbind/Makefile b/testcases/kernel/syscalls/mbind/Makefile
index 5132dffa4..1e2f5e4de 100644
--- a/testcases/kernel/syscalls/mbind/Makefile
+++ b/testcases/kernel/syscalls/mbind/Makefile
@@ -20,15 +20,6 @@ top_srcdir ?= ../../../..
include $(top_srcdir)/include/mk/testcases.mk
-#
-# gcc complains about unused functions / variables when HAS_NUMA_H isn't
-# defined, so let's just skip the warning. It's nothing more than a few extra
-# variables and functions allocated on the stack, so meh... no harm, no foul.
-#
-ifeq ($(NUMA_LIBS),)
-CPPFLAGS += -Wno-unused
-endif
-
CPPFLAGS += -I$(abs_srcdir)/../utils/
include $(top_srcdir)/testcases/kernel/include/lib.mk
diff --git a/testcases/kernel/syscalls/migrate_pages/Makefile b/testcases/kernel/syscalls/migrate_pages/Makefile
index 7168cd6e1..46a35d3e0 100644
--- a/testcases/kernel/syscalls/migrate_pages/Makefile
+++ b/testcases/kernel/syscalls/migrate_pages/Makefile
@@ -23,9 +23,6 @@ include $(top_srcdir)/include/mk/testcases.mk
MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*[0-9].c))
$(MAKE_TARGETS): %: %.o migrate_pages_common.o
-ifeq ($(NUMA_LIBS),)
-CPPFLAGS += -Wno-unused
-endif
CPPFLAGS += -I$(abs_srcdir)/../utils/
include $(top_srcdir)/testcases/kernel/include/lib.mk
diff --git a/testcases/kernel/syscalls/move_pages/Makefile b/testcases/kernel/syscalls/move_pages/Makefile
index d4620e10a..989277019 100644
--- a/testcases/kernel/syscalls/move_pages/Makefile
+++ b/testcases/kernel/syscalls/move_pages/Makefile
@@ -26,11 +26,6 @@ INSTALL_TARGETS := move_pages.sh
MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*[0-9].c))
-# linux_syscall_numbers.h is forcing move_pages_support.o to complain about
-# cleanup being undefined [and when defined] unused. Let's just skip this
-# warning...
-move_pages_support.o: CFLAGS += -Wno-unused-function
-
$(MAKE_TARGETS): %: %.o move_pages_support.o
LDLIBS += -lpthread -lrt
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 13/18] numa: Drop NUMA API v1 support
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (11 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 12/18] make: Remove workarounds for build without libnuma Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 14/18] numa: Drop NUMA_CPPFLAGS Petr Vorel
` (4 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
NOTE: there still some code using v1 API
(thus flag -DNUMA_VERSION1_COMPATIBILITY is needed)
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.../cpuset_syscall_test/cpuset_syscall_test.c | 4 +--
testcases/kernel/hotplug/memory_hotplug/commands.c | 12 +------
testcases/kernel/lib/numa_helper.c | 15 ++-------
testcases/kernel/mem/vma/vma02.c | 13 +++-----
testcases/kernel/mem/vma/vma04.c | 12 ++-----
.../syscalls/get_mempolicy/get_mempolicy01.c | 38 ++--------------------
6 files changed, 14 insertions(+), 80 deletions(-)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
index 371cbc751..c3ed1a502 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
@@ -51,8 +51,8 @@
char *TCID = "cpuset_syscall_test";
int TST_TOTAL = 1;
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS \
+ && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#include "../cpuset_lib/cpuset.h"
#include "../cpuset_lib/bitmask.h"
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index a9c618d82..7f271c341 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_LINUX_MEMPOLICY_H
+#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H
#include <linux/mempolicy.h>
#include <sys/types.h>
#include <sys/time.h>
@@ -59,7 +59,6 @@
#define MPOL_MF_WAIT (1<<2) /* Wait for existing pages to migrate */
#endif
-#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
static inline int nodemask_isset(nodemask_t * mask, int node)
{
if ((unsigned)node >= NUMA_NUM_NODES)
@@ -75,7 +74,6 @@ static inline void nodemask_set(nodemask_t * mask, int node)
mask->n[node / (8 * sizeof(unsigned long))] |=
(1UL << (node % (8 * sizeof(unsigned long))));
}
-#endif
static char *whitespace = " \t";
@@ -385,11 +383,7 @@ static int get_arg_nodeid_list(char *args, unsigned int *list)
int node, count = 0;
gcp = &glctx;
-#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
my_allowed_nodes = numa_get_membind_compat();
-#else
- my_allowed_nodes = numa_get_membind();
-#endif
while (*args != '\0') {
if (!isdigit(*args)) {
fprintf(stderr, "%s: expected digit for <node/list>\n",
@@ -447,11 +441,7 @@ static int get_current_nodeid_list(unsigned int *fromids)
int node;
gcp = &glctx;
-#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
my_allowed_nodes = numa_get_membind_compat();
-#else
- my_allowed_nodes = numa_get_membind();
-#endif
for (node = 0; node <= max_node; ++node) {
if (nodemask_isset(&my_allowed_nodes, node))
*(fromids + nr_nodes++) = node;
diff --git a/testcases/kernel/lib/numa_helper.c b/testcases/kernel/lib/numa_helper.c
index dd080ee4e..8dc9d23a8 100644
--- a/testcases/kernel/lib/numa_helper.c
+++ b/testcases/kernel/lib/numa_helper.c
@@ -39,20 +39,9 @@
unsigned long get_max_node(void)
{
unsigned long max_node = 0;
-#if HAVE_NUMA_H
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- max_node = NUMA_NUM_NODES;
- /*
- * NUMA_NUM_NODES is not reliable, libnuma >=2 is looking
- * at /proc/self/status to figure out correct number.
- * If buffer is not large enough get_mempolicy will fail with EINVAL.
- */
- if (max_node < 1024)
- max_node = 1024;
-#else
+#if HAVE_NUMA_H && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
max_node = numa_max_possible_node() + 1;
#endif
-#endif /* HAVE_NUMA_H */
return max_node;
}
@@ -209,7 +198,7 @@ int get_allowed_nodes_arr(int flag, int *num_nodes, int **nodes)
}
} while (0);
free(nodemask);
-#endif
+#endif /* HAVE_NUMA_H */
return ret;
}
diff --git a/testcases/kernel/mem/vma/vma02.c b/testcases/kernel/mem/vma/vma02.c
index ae35b2a07..1492e1385 100644
--- a/testcases/kernel/mem/vma/vma02.c
+++ b/testcases/kernel/mem/vma/vma02.c
@@ -49,9 +49,9 @@
char *TCID = "vma02";
int TST_TOTAL = 1;
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
-#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
+#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
+ defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+
static unsigned long pagesize;
static int opt_node;
static char *opt_nodestr;
@@ -163,12 +163,7 @@ void usage(void)
{
printf(" -n Number of NUMA nodes\n");
}
-#else /* libnuma v1 */
-int main(void)
-{
- tst_brkm(TCONF, NULL, "XXX: test is only supported on libnuma v2.");
-}
-#endif
+
#else /* no NUMA */
int main(void)
{
diff --git a/testcases/kernel/mem/vma/vma04.c b/testcases/kernel/mem/vma/vma04.c
index 5e2cc91b7..905fbd3ad 100644
--- a/testcases/kernel/mem/vma/vma04.c
+++ b/testcases/kernel/mem/vma/vma04.c
@@ -53,9 +53,9 @@
char *TCID = "vma04";
int TST_TOTAL = 5;
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
-#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
+#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
+ defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+
static unsigned long pagesize;
static int opt_node;
static char *opt_nodestr;
@@ -325,12 +325,6 @@ static void usage(void)
printf(" -n Number of NUMA nodes\n");
}
-#else /* libnuma v1 */
-int main(void)
-{
- tst_brkm(TCONF, NULL, "XXX: test is only supported on libnuma v2.");
-}
-#endif
#else /* no NUMA */
int main(void)
{
diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
index cca50288f..daa5f5dcc 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
@@ -66,7 +66,8 @@
char *TCID = "get_mempolicy01";
int TST_TOTAL = 1;
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS
+#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
+ defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#define MEM_LENGTH (4 * 1024 * 1024)
@@ -221,13 +222,8 @@ static int do_test(struct test_case *tc)
{
int ret, err, result, cmp_ok;
int policy, flags;
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- nodemask_t *nodemask, *getnodemask;
- unsigned long maxnode = NUMA_NUM_NODES;
-#else
struct bitmask *nodemask = numa_allocate_nodemask();
struct bitmask *getnodemask = numa_allocate_nodemask();
-#endif
char *p = NULL;
unsigned long len = MEM_LENGTH;
int test_node = -1;
@@ -235,15 +231,7 @@ static int do_test(struct test_case *tc)
ret = get_allowed_nodes(NH_MEMS, 1, &test_node);
if (ret < 0)
tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- nodemask = malloc(sizeof(nodemask_t));
- nodemask_zero(nodemask);
- nodemask_set(nodemask, test_node);
- getnodemask = malloc(sizeof(nodemask_t));
- nodemask_zero(getnodemask);
-#else
numa_bitmask_setbit(nodemask, test_node);
-#endif
switch (tc->ttype) {
case DEFAULT:
flags = 0;
@@ -252,13 +240,8 @@ static int do_test(struct test_case *tc)
TEST(ltp_syscall(__NR_set_mempolicy, tc->policy,
NULL, 0));
else
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- TEST(ltp_syscall(__NR_set_mempolicy, tc->policy,
- nodemask, maxnode));
-#else
TEST(ltp_syscall(__NR_set_mempolicy, tc->policy,
nodemask->maskp, nodemask->size));
-#endif
if (TEST_RETURN < 0) {
tst_resm(TBROK | TERRNO, "set_mempolicy");
return -1;
@@ -275,13 +258,8 @@ static int do_test(struct test_case *tc)
TEST(ltp_syscall(__NR_mbind, p, len, tc->policy,
NULL, 0, 0));
else
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- TEST(ltp_syscall(__NR_mbind, p, len, tc->policy,
- nodemask, maxnode, 0));
-#else
TEST(ltp_syscall(__NR_mbind, p, len, tc->policy,
nodemask->maskp, nodemask->size, 0));
-#endif
if (TEST_RETURN < 0) {
tst_resm(TBROK | TERRNO, "mbind");
return -1;
@@ -299,30 +277,18 @@ static int do_test(struct test_case *tc)
}
errno = 0;
cmp_ok = 1;
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- TEST(ret = ltp_syscall(__NR_get_mempolicy, &policy, getnodemask,
- maxnode, p, flags));
-#else
TEST(ret = ltp_syscall(__NR_get_mempolicy, &policy, getnodemask->maskp,
getnodemask->size, p, flags));
-#endif
err = TEST_ERRNO;
if (ret < 0)
goto TEST_END;
/* if policy == MPOL_DEFAULT, get_mempolicy doesn't return nodemask */
if (tc->policy == MPOL_DEFAULT)
-#if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
- nodemask_zero(nodemask);
- cmp_ok = (tc->policy == policy && (tc->from_node == NONE ||
- nodemask_equal(nodemask,
- getnodemask)));
-#else
numa_bitmask_clearall(nodemask);
cmp_ok = (tc->policy == policy && (tc->from_node == NONE ||
numa_bitmask_equal(nodemask,
getnodemask)));
-#endif
TEST_END:
result = (err != tc->err) || !cmp_ok;
PRINT_RESULT_CMP(0, tc->ret, tc->err, ret, err, cmp_ok);
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 14/18] numa: Drop NUMA_CPPFLAGS
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (12 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 13/18] numa: Drop NUMA API v1 support Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 15/18] hotplug/memory_hotplug: Update TODO Petr Vorel
` (3 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
and remove most -DNUMA_VERSION1_COMPATIBILITY flags.
The place which requires it (e.g. using legacy code) is
testcases/kernel/lib/commands.c.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/mk/config.mk.default | 1 -
include/mk/config.mk.in | 1 -
m4/ltp-numa.m4 | 9 ++-------
testcases/kernel/controllers/cpuset/cpuset_syscall_test/Makefile | 1 -
testcases/kernel/include/lib.mk | 2 +-
testcases/kernel/lib/Makefile | 3 ++-
testcases/kernel/numa/Makefile | 2 +-
7 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/include/mk/config.mk.default b/include/mk/config.mk.default
index dff3479db..0934d9453 100644
--- a/include/mk/config.mk.default
+++ b/include/mk/config.mk.default
@@ -39,7 +39,6 @@ YACC := bison -y
#ACL_LIBS := -lacl
#CRYPTO_LIBS := -lcrypto
#LEXLIB := -lfl
-#NUMA_CPPFLAGS := -DNUMA_VERSION1_COMPATIBILITY
#NUMA_LIBS := -lnuma
#SELINUX_LIBS := -lselinux
#TIRPC_CPPFLAGS := -I/usr/include/tirpc
diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index dde2a9e55..8c4f9da82 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -41,7 +41,6 @@ CAP_LIBS := @CAP_LIBS@
ACL_LIBS := @ACL_LIBS@
CRYPTO_LIBS := @CRYPTO_LIBS@
LEXLIB := @LEXLIB@
-NUMA_CPPFLAGS := @NUMA_CPPFLAGS@
NUMA_LIBS := @NUMA_LIBS@
SELINUX_LIBS := @SELINUX_LIBS@
TIRPC_CPPFLAGS := @TIRPC_CPPFLAGS@
diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
index 30650cd00..b9e9069b6 100644
--- a/m4/ltp-numa.m4
+++ b/m4/ltp-numa.m4
@@ -22,8 +22,7 @@ dnl
dnl LTP_CHECK_SYSCALL_NUMA
dnl ----------------------------
dnl
-AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
-[dnl
+AC_DEFUN([LTP_CHECK_SYSCALL_NUMA], [
AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
LTP_SYSCALL_NUMA_HEADERS=yes
AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
@@ -35,14 +34,10 @@ AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
AC_DEFINE(HAVE_NUMA_MOVE_PAGES,1,[define to 1 if you have 'numa_move_pages' function])
fi
]
- AC_CHECK_LIB(numa,numa_available,[
-NUMA_CPPFLAGS="-DNUMA_VERSION1_COMPATIBILITY"
-NUMA_LIBS="-lnuma"
- ])
+ AC_CHECK_LIB(numa,numa_available,[NUMA_LIBS="-lnuma"])
dnl For testcases/kernel/controllers/cpuset, testcases/kernel/syscalls/get_mempolicy,
dnl testcases/kernel/syscalls/mbind
AC_CHECK_DECLS([MPOL_BIND, MPOL_DEFAULT, MPOL_F_ADDR, MPOL_F_MEMS_ALLOWED, MPOL_F_NODE, MPOL_INTERLEAVE, MPOL_PREFERRED],[have_mpol_constants="yes"],,[#include <numaif.h>])
-AC_SUBST(NUMA_CPPFLAGS)
AC_SUBST(NUMA_LIBS)
if test "x$have_mpol_constants" = "xyes"; then
AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/Makefile b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/Makefile
index 6de1f8901..3f5e591f9 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/Makefile
+++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/Makefile
@@ -26,7 +26,6 @@ include $(top_srcdir)/include/mk/testcases.mk
include $(abs_srcdir)/../Makefile.inc
LDLIBS += $(NUMA_LIBS)
-CPPFLAGS += $(NUMA_CPPFLAGS)
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/include/lib.mk b/testcases/kernel/include/lib.mk
index 5c97ae2c9..40a09b77e 100644
--- a/testcases/kernel/include/lib.mk
+++ b/testcases/kernel/include/lib.mk
@@ -22,7 +22,7 @@ LIBKERNTEST_SRCDIR := $(KERNEL_SRCDIR)/lib
KERNEL_DIR := $(abs_top_builddir)/testcases/kernel
LIBKERNTEST_DIR := $(KERNEL_DIR)/lib
LIBKERNTEST := $(LIBKERNTEST_DIR)/libkerntest.a
-CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_SRCDIR)/include
+CPPFLAGS += -I$(KERNEL_SRCDIR)/include
LDLIBS += -lkerntest -lltp $(NUMA_LIBS)
LDFLAGS += -L$(LIBKERNTEST_DIR)
diff --git a/testcases/kernel/lib/Makefile b/testcases/kernel/lib/Makefile
index 8e19eed9e..fabf2f06e 100644
--- a/testcases/kernel/lib/Makefile
+++ b/testcases/kernel/lib/Makefile
@@ -22,7 +22,8 @@ top_srcdir ?= ../../..
include $(top_srcdir)/include/mk/env_pre.mk
-CPPFLAGS += $(NUMA_CPPFLAGS) -I$(abs_srcdir)/../include \
+CPPFLAGS += -DNUMA_VERSION1_COMPATIBILITY \
+ -I$(abs_srcdir)/../include \
-I$(abs_builddir)/../include
INTERNAL_LIB := libkerntest.a
diff --git a/testcases/kernel/numa/Makefile b/testcases/kernel/numa/Makefile
index f5e1881fd..48494e456 100644
--- a/testcases/kernel/numa/Makefile
+++ b/testcases/kernel/numa/Makefile
@@ -20,7 +20,7 @@ top_srcdir := ../../..
include $(top_srcdir)/include/mk/testcases.mk
-CPPFLAGS += -D_GNU_SOURCE -DNUMA_VERSION1_COMPATIBILITY
+CPPFLAGS += -D_GNU_SOURCE
LDLIBS += $(NUMA_LIBS)
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 15/18] hotplug/memory_hotplug: Update TODO
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (13 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 14/18] numa: Drop NUMA_CPPFLAGS Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 16/18] hotplug/memory_hotplug: Remove unused header Petr Vorel
` (2 subsequent siblings)
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
_NEED_MIGRATE_PAGES definition was removed in commit 5ed9ed059
("Address the issue reported in the following email by installing all .c files.")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/hotplug/memory_hotplug/TODO | 5 -----
1 file changed, 5 deletions(-)
diff --git a/testcases/kernel/hotplug/memory_hotplug/TODO b/testcases/kernel/hotplug/memory_hotplug/TODO
index 35c18aa57..1460eb6a2 100644
--- a/testcases/kernel/hotplug/memory_hotplug/TODO
+++ b/testcases/kernel/hotplug/memory_hotplug/TODO
@@ -1,12 +1,7 @@
memtoy:
-if migrate_pages(2) system call ever becomes standard, will need to change
-Makefile not to build and link against migrate_pages.o and not to define
-_NEED_MIGRATE_PAGES.
-
More documentation?
-
Desired features?
+ verify contents after migration?
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 16/18] hotplug/memory_hotplug: Remove unused header
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (14 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 15/18] hotplug/memory_hotplug: Update TODO Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 17/18] hotplug/memory_hotplug: Exit with TCONF when NUMA headers not available Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 18/18] m4, kernel/lib: Detect libnuma presence in kernel libs Petr Vorel
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/hotplug/memory_hotplug/commands.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index 7f271c341..2264346c7 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -30,7 +30,6 @@
#include "config.h"
#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H
-#include <linux/mempolicy.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 17/18] hotplug/memory_hotplug: Exit with TCONF when NUMA headers not available
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (15 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 16/18] hotplug/memory_hotplug: Remove unused header Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 18/18] m4, kernel/lib: Detect libnuma presence in kernel libs Petr Vorel
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/hotplug/memory_hotplug/memtoy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/hotplug/memory_hotplug/memtoy.c b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
index 1a96d914a..296788e30 100644
--- a/testcases/kernel/hotplug/memory_hotplug/memtoy.c
+++ b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
@@ -24,6 +24,8 @@
#include <stdio.h>
#include "config.h"
+#include "tst_res_flags.h"
+
/* Shortcut because the test requires numa and mempolicy support. */
#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_LINUX_MEMPOLICY_H
#include <sys/types.h>
@@ -495,6 +497,6 @@ int main(int argc, char *argv[])
int main(void)
{
printf("System doesn't have required numa support.\n");
- return 0;
+ return TCONF;
}
#endif /* HAVE_NUMA_H && HAVE_NUMAIF_H */
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 18/18] m4, kernel/lib: Detect libnuma presence in kernel libs
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
` (16 preceding siblings ...)
2017-10-12 18:33 ` [LTP] [PATCH v3 17/18] hotplug/memory_hotplug: Exit with TCONF when NUMA headers not available Petr Vorel
@ 2017-10-12 18:33 ` Petr Vorel
17 siblings, 0 replies; 26+ messages in thread
From: Petr Vorel @ 2017-10-12 18:33 UTC (permalink / raw)
To: ltp
This fixes link problems when NUMA headers are available
but libnuma not (e.g. on 32-bit cross build).
Dropped HAVE_MPOL_CONSTANTS definition as with dropping NUMA API v1 are
these constans allways available.
TODO:
* HAVE_LIBNUMA && HAVE_NUMA_H into one in m4
* remove HAVE_MPOL_CONSTANTS
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
m4/ltp-numa.m4 | 40 +++++++++++-----------
.../controllers/cpuset/cpuset_lib/libcpuset.c | 1 +
.../cpuset_syscall_test/cpuset_syscall_test.c | 5 ++-
testcases/kernel/hotplug/memory_hotplug/commands.c | 6 +++-
testcases/kernel/hotplug/memory_hotplug/memtoy.c | 13 ++++---
testcases/kernel/hotplug/memory_hotplug/segment.c | 6 +++-
testcases/kernel/include/numa_helper.h | 2 +-
testcases/kernel/lib/numa_helper.c | 14 ++++----
testcases/kernel/mem/cpuset/cpuset01.c | 8 +++--
testcases/kernel/mem/ksm/ksm02.c | 9 +++--
testcases/kernel/mem/ksm/ksm04.c | 9 +++--
testcases/kernel/mem/ksm/ksm06.c | 12 ++++---
testcases/kernel/mem/lib/mem.c | 13 ++++---
testcases/kernel/mem/oom/oom02.c | 9 +++--
testcases/kernel/mem/oom/oom03.c | 10 ++++--
testcases/kernel/mem/oom/oom04.c | 9 +++--
testcases/kernel/mem/oom/oom05.c | 9 +++--
testcases/kernel/mem/vma/vma02.c | 5 ++-
testcases/kernel/mem/vma/vma04.c | 5 ++-
.../syscalls/get_mempolicy/get_mempolicy01.c | 7 ++--
testcases/kernel/syscalls/mbind/mbind01.c | 9 +++--
.../syscalls/migrate_pages/migrate_pages01.c | 8 +++--
.../syscalls/migrate_pages/migrate_pages02.c | 9 +++--
.../syscalls/move_pages/move_pages_support.c | 14 ++++----
24 files changed, 137 insertions(+), 95 deletions(-)
diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
index b9e9069b6..750c807b0 100644
--- a/m4/ltp-numa.m4
+++ b/m4/ltp-numa.m4
@@ -23,23 +23,23 @@ dnl LTP_CHECK_SYSCALL_NUMA
dnl ----------------------------
dnl
AC_DEFUN([LTP_CHECK_SYSCALL_NUMA], [
-AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
- LTP_SYSCALL_NUMA_HEADERS=yes
- AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
- if test "x$have_numa_alloc_onnode" = "xyes"; then
- AC_DEFINE(HAVE_NUMA_ALLOC_ONNODE,1,[define to 1 if you have 'numa_alloc_onnode' function])
- fi
- AC_CHECK_LIB(numa,numa_move_pages,[have_numa_move_pages="yes"])
- if test "x$have_numa_move_pages" = "xyes"; then
- AC_DEFINE(HAVE_NUMA_MOVE_PAGES,1,[define to 1 if you have 'numa_move_pages' function])
- fi
-]
- AC_CHECK_LIB(numa,numa_available,[NUMA_LIBS="-lnuma"])
-dnl For testcases/kernel/controllers/cpuset, testcases/kernel/syscalls/get_mempolicy,
-dnl testcases/kernel/syscalls/mbind
-AC_CHECK_DECLS([MPOL_BIND, MPOL_DEFAULT, MPOL_F_ADDR, MPOL_F_MEMS_ALLOWED, MPOL_F_NODE, MPOL_INTERLEAVE, MPOL_PREFERRED],[have_mpol_constants="yes"],,[#include <numaif.h>])
-AC_SUBST(NUMA_LIBS)
-if test "x$have_mpol_constants" = "xyes"; then
- AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
-fi
-)])
+ AC_CHECK_LIB(numa, numa_available, [
+ AC_SUBST(NUMA_LIBS, "-lnuma")
+ AC_CHECK_HEADERS([numa.h numaif.h], [
+ AC_DEFINE(HAVE_LIBNUMA, 1, [Define to 1 if you have libnuma and it's headers installed])
+ ])
+ AC_CHECK_HEADERS([numa.h numaif.h linux/mempolicy.h], [
+ AC_CHECK_LIB(numa, numa_alloc_onnode, [
+ AC_DEFINE(HAVE_NUMA_ALLOC_ONNODE, 1, [Define to 1 if you have 'numa_alloc_onnode' function])
+ ])
+
+ AC_CHECK_LIB(numa, numa_move_pages, [
+ AC_DEFINE(HAVE_NUMA_MOVE_PAGES, 1, [Define to 1 if you have 'numa_move_pages' function])
+ ])
+ ])
+ ])
+
+ AC_CHECK_DECLS([MPOL_BIND, MPOL_DEFAULT, MPOL_F_ADDR, MPOL_F_MEMS_ALLOWED, MPOL_F_NODE, MPOL_INTERLEAVE, MPOL_PREFERRED], [
+ AC_DEFINE(HAVE_MPOL_CONSTANTS, 1, [Define to 1 if you have all constants required to use mbind tests])
+ ], , [#include <numaif.h>])
+])
diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c b/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c
index b38289679..9b67e37c9 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c
@@ -50,6 +50,7 @@
#include "test.h"
#include "lapi/syscalls.h"
#include "config.h"
+
#if HAVE_LINUX_MEMPOLICY_H
#include <linux/mempolicy.h>
diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
index c3ed1a502..0a13dd49f 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
@@ -51,8 +51,7 @@
char *TCID = "cpuset_syscall_test";
int TST_TOTAL = 1;
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS \
- && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#include "../cpuset_lib/cpuset.h"
#include "../cpuset_lib/bitmask.h"
@@ -243,6 +242,6 @@ int main(int argc, char *argv[])
#else
int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't have required mempolicy support");
+ tst_brkm(TCONF, NULL, "test requires libnuma >= 2 and it's development packages");
}
#endif
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index 2264346c7..54a79224d 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -29,7 +29,11 @@
*/
#include "config.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
diff --git a/testcases/kernel/hotplug/memory_hotplug/memtoy.c b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
index 296788e30..40d08ef63 100644
--- a/testcases/kernel/hotplug/memory_hotplug/memtoy.c
+++ b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
@@ -23,11 +23,14 @@
*/
#include <stdio.h>
+
#include "config.h"
#include "tst_res_flags.h"
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
-/* Shortcut because the test requires numa and mempolicy support. */
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_LINUX_MEMPOLICY_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
@@ -493,10 +496,10 @@ int main(int argc, char *argv[])
return 0;
}
-#else /* ! (HAVE_NUMA_H && HAVE_NUMAIF_H) */
+#else
int main(void)
{
- printf("System doesn't have required numa support.\n");
+ fprintf(stderr, "test requires libnuma >= 2 and it's development packages\n");
return TCONF;
}
-#endif /* HAVE_NUMA_H && HAVE_NUMAIF_H */
+#endif
diff --git a/testcases/kernel/hotplug/memory_hotplug/segment.c b/testcases/kernel/hotplug/memory_hotplug/segment.c
index 62ccd81f9..a087eb2e1 100644
--- a/testcases/kernel/hotplug/memory_hotplug/segment.c
+++ b/testcases/kernel/hotplug/memory_hotplug/segment.c
@@ -28,7 +28,11 @@
*/
#include "config.h"
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_LINUX_MEMPOLICY_H
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/mman.h>
diff --git a/testcases/kernel/include/numa_helper.h b/testcases/kernel/include/numa_helper.h
index b9d55f04d..39cf7aa23 100644
--- a/testcases/kernel/include/numa_helper.h
+++ b/testcases/kernel/include/numa_helper.h
@@ -36,4 +36,4 @@ int get_allowed_nodes(int flag, int count, ...);
void nh_dump_nodes(void);
int is_numa(void (*cleanup_fn)(void), int flag, int min_nodes);
-#endif
+#endif /* NUMA_HELPER_H */
diff --git a/testcases/kernel/lib/numa_helper.c b/testcases/kernel/lib/numa_helper.c
index 8dc9d23a8..2717bf59d 100644
--- a/testcases/kernel/lib/numa_helper.c
+++ b/testcases/kernel/lib/numa_helper.c
@@ -39,13 +39,13 @@
unsigned long get_max_node(void)
{
unsigned long max_node = 0;
-#if HAVE_NUMA_H && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
max_node = numa_max_possible_node() + 1;
#endif
return max_node;
}
-#if HAVE_NUMA_H
+#ifdef HAVE_LIBNUMA
static void get_nodemask_allnodes(nodemask_t * nodemask, unsigned long max_node)
{
unsigned long nodemask_size = max_node / 8;
@@ -63,7 +63,7 @@ static void get_nodemask_allnodes(nodemask_t * nodemask, unsigned long max_node)
static int filter_nodemask_mem(nodemask_t * nodemask, unsigned long max_node)
{
-#if MPOL_F_MEMS_ALLOWED
+#ifdef MPOL_F_MEMS_ALLOWED
unsigned long nodemask_size = max_node / 8;
memset(nodemask, 0, nodemask_size);
/*
@@ -134,7 +134,7 @@ static void filter_nodemask_cpu(nodemask_t * nodemask, unsigned long max_node)
}
free(cpumask);
}
-#endif /* HAVE_NUMA_H */
+#endif /* HAVE_LIBNUMA */
/*
* get_allowed_nodes_arr - get number and array of available nodes
@@ -152,7 +152,7 @@ static void filter_nodemask_cpu(nodemask_t * nodemask, unsigned long max_node)
int get_allowed_nodes_arr(int flag, int *num_nodes, int **nodes)
{
int ret = 0;
-#if HAVE_NUMA_H
+#if HAVE_LIBNUMA
int i;
nodemask_t *nodemask = NULL;
#endif
@@ -160,7 +160,7 @@ int get_allowed_nodes_arr(int flag, int *num_nodes, int **nodes)
if (nodes)
*nodes = NULL;
-#if HAVE_NUMA_H
+#if HAVE_LIBNUMA
unsigned long max_node, nodemask_size;
if (numa_available() == -1)
@@ -198,7 +198,7 @@ int get_allowed_nodes_arr(int flag, int *num_nodes, int **nodes)
}
} while (0);
free(nodemask);
-#endif /* HAVE_NUMA_H */
+#endif /* HAVE_LIBNUMA */
return ret;
}
diff --git a/testcases/kernel/mem/cpuset/cpuset01.c b/testcases/kernel/mem/cpuset/cpuset01.c
index 3d68cc07a..d82188437 100644
--- a/testcases/kernel/mem/cpuset/cpuset01.c
+++ b/testcases/kernel/mem/cpuset/cpuset01.c
@@ -23,6 +23,9 @@
#include "config.h"
#include <stdio.h>
#include <sys/wait.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
#if HAVE_NUMAIF_H
#include <numaif.h>
#endif
@@ -30,8 +33,7 @@
#include "mem.h"
#include "numa_helper.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
volatile int end;
static int *nodes;
static int nnodes;
@@ -187,5 +189,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c
index 6fe75d380..9b39f50d4 100644
--- a/testcases/kernel/mem/ksm/ksm02.c
+++ b/testcases/kernel/mem/ksm/ksm02.c
@@ -50,6 +50,9 @@
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
#if HAVE_NUMAIF_H
#include <numaif.h>
#endif
@@ -59,8 +62,8 @@
#include "mem.h"
#include "ksm_common.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2 \
+ && HAVE_LINUX_MEMPOLICY_H
static void verify_ksm(void)
{
@@ -122,5 +125,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c
index 1c8bf20c2..5a3e32da7 100644
--- a/testcases/kernel/mem/ksm/ksm04.c
+++ b/testcases/kernel/mem/ksm/ksm04.c
@@ -50,6 +50,9 @@
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
#if HAVE_NUMAIF_H
#include <numaif.h>
#endif
@@ -59,8 +62,8 @@
#include "mem.h"
#include "ksm_common.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2 \
+ && HAVE_LINUX_MEMPOLICY_H
static void verify_ksm(void)
{
@@ -126,5 +129,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/ksm/ksm06.c b/testcases/kernel/mem/ksm/ksm06.c
index 334a04834..eccbc994f 100644
--- a/testcases/kernel/mem/ksm/ksm06.c
+++ b/testcases/kernel/mem/ksm/ksm06.c
@@ -28,6 +28,9 @@
#include <limits.h>
#include <errno.h>
#include <fcntl.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
#if HAVE_NUMAIF_H
#include <numaif.h>
#endif
@@ -35,11 +38,12 @@
#include <stdio.h>
#include <unistd.h>
#include <limits.h>
-#include "numa_helper.h"
+
#include "mem.h"
+#include "numa_helper.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2 \
+ && HAVE_LINUX_MEMPOLICY_H
static int run = -1;
static int sleep_millisecs = -1;
@@ -106,5 +110,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
index dd82b08d2..c046c77c5 100644
--- a/testcases/kernel/mem/lib/mem.c
+++ b/testcases/kernel/mem/lib/mem.c
@@ -162,10 +162,9 @@ void oom(int testcase, int lite, int retcode, int allow_sigkill)
}
}
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static void set_global_mempolicy(int mempolicy)
{
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
unsigned long nmask[MAXNODES / BITS_PER_LONG] = { 0 };
int num_nodes, *nodes;
int ret;
@@ -203,8 +202,10 @@ static void set_global_mempolicy(int mempolicy)
if (set_mempolicy(mempolicy, nmask, MAXNODES) == -1)
tst_brk(TBROK|TERRNO, "set_mempolicy");
}
-#endif
}
+#else
+static void set_global_mempolicy(int mempolicy LTP_ATTRIBUTE_UNUSED) { }
+#endif
void testoom(int mempolicy, int lite, int retcode, int allow_sigkill)
{
@@ -562,8 +563,7 @@ void test_ksm_merge_across_nodes(unsigned long nr_pages)
unsigned long length;
unsigned long pagesize;
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
unsigned long nmask[MAXNODES / BITS_PER_LONG] = { 0 };
#endif
@@ -588,8 +588,7 @@ void test_ksm_merge_across_nodes(unsigned long nr_pages)
tst_brk(TBROK|TERRNO, "madvise");
#endif
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
clean_node(nmask);
set_node(nmask, nodes[i]);
/*
diff --git a/testcases/kernel/mem/oom/oom02.c b/testcases/kernel/mem/oom/oom02.c
index 3434a34ba..13ff50273 100644
--- a/testcases/kernel/mem/oom/oom02.c
+++ b/testcases/kernel/mem/oom/oom02.c
@@ -26,11 +26,14 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+
#include "numa_helper.h"
#include "mem.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static void verify_oom(void)
{
@@ -72,5 +75,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/oom/oom03.c b/testcases/kernel/mem/oom/oom03.c
index f883bc054..29159d629 100644
--- a/testcases/kernel/mem/oom/oom03.c
+++ b/testcases/kernel/mem/oom/oom03.c
@@ -20,16 +20,20 @@
* the GNU General Public License for more details.
*/
+#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+
#include "numa_helper.h"
#include "mem.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static void verify_oom(void)
{
@@ -85,5 +89,5 @@ static struct tst_test test = {
};
#else
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/oom/oom04.c b/testcases/kernel/mem/oom/oom04.c
index e4e70e26f..6b8275c7b 100644
--- a/testcases/kernel/mem/oom/oom04.c
+++ b/testcases/kernel/mem/oom/oom04.c
@@ -26,11 +26,14 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+
#include "numa_helper.h"
#include "mem.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static void verify_oom(void)
{
@@ -94,5 +97,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/oom/oom05.c b/testcases/kernel/mem/oom/oom05.c
index bdf5d1923..34a865d2b 100644
--- a/testcases/kernel/mem/oom/oom05.c
+++ b/testcases/kernel/mem/oom/oom05.c
@@ -26,11 +26,14 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+
#include "numa_helper.h"
#include "mem.h"
-#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
- && HAVE_MPOL_CONSTANTS
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static void verify_oom(void)
{
@@ -120,5 +123,5 @@ static struct tst_test test = {
};
#else /* no NUMA */
- TST_TEST_TCONF("no NUMA development packages installed.");
+ TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/mem/vma/vma02.c b/testcases/kernel/mem/vma/vma02.c
index 1492e1385..4a677addc 100644
--- a/testcases/kernel/mem/vma/vma02.c
+++ b/testcases/kernel/mem/vma/vma02.c
@@ -49,8 +49,7 @@
char *TCID = "vma02";
int TST_TOTAL = 1;
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
- defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static unsigned long pagesize;
static int opt_node;
@@ -167,6 +166,6 @@ void usage(void)
#else /* no NUMA */
int main(void)
{
- tst_brkm(TCONF, NULL, "no NUMA development packages installed.");
+ tst_brkm(TCONF, NULL, "test requires libnuma >= 2 and it's development packages");
}
#endif
diff --git a/testcases/kernel/mem/vma/vma04.c b/testcases/kernel/mem/vma/vma04.c
index 905fbd3ad..16eecc33f 100644
--- a/testcases/kernel/mem/vma/vma04.c
+++ b/testcases/kernel/mem/vma/vma04.c
@@ -53,8 +53,7 @@
char *TCID = "vma04";
int TST_TOTAL = 5;
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
- defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
static unsigned long pagesize;
static int opt_node;
@@ -328,6 +327,6 @@ static void usage(void)
#else /* no NUMA */
int main(void)
{
- tst_brkm(TCONF, NULL, "no NUMA development packages installed.");
+ tst_brkm(TCONF, NULL, "test requires libnuma >= 2 and it's development packages");
}
#endif
diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
index daa5f5dcc..90c4f9662 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
@@ -57,6 +57,7 @@
#if HAVE_NUMAIF_H
#include <numaif.h>
#endif
+
#include "test.h"
#include "lapi/syscalls.h"
#include "include_j_h.h"
@@ -66,8 +67,7 @@
char *TCID = "get_mempolicy01";
int TST_TOTAL = 1;
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
- defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#define MEM_LENGTH (4 * 1024 * 1024)
@@ -311,9 +311,10 @@ static void setup(void)
TEST_PAUSE;
tst_tmpdir();
}
+
#else
int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't have required numa support");
+ tst_brkm(TCONF, NULL, "test requires libnuma >= 2 and it's development packages");
}
#endif
diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c
index be5470691..82302a817 100644
--- a/testcases/kernel/syscalls/mbind/mbind01.c
+++ b/testcases/kernel/syscalls/mbind/mbind01.c
@@ -22,12 +22,15 @@
*/
#include <errno.h>
+#if HAVE_NUMA_H
+#include <numa.h>
+#endif
+#include "config.h"
#include "numa_helper.h"
#include "tst_test.h"
-#if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS && \
- defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
#define MEM_LENGTH (4 * 1024 * 1024)
@@ -234,5 +237,5 @@ static struct tst_test test = {
};
#else /* libnuma >= 2 */
-TST_TEST_TCONF("test requires libnuma >= 2.");
+TST_TEST_TCONF("test requires libnuma >= 2 and it's development packages");
#endif
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c
index 32c78b29a..64d0215af 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c
@@ -55,7 +55,9 @@ option_t options[] = {
{NULL, NULL, NULL}
};
-#if defined(__NR_migrate_pages) && HAVE_NUMA_H && HAVE_NUMAIF_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2 \
+ && defined(__NR_migrate_pages)
+
static unsigned long *sane_old_nodes;
static unsigned long *sane_new_nodes;
static int sane_nodemask_size;
@@ -252,7 +254,7 @@ static void cleanup(void)
#else /* __NR_migrate_pages */
int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't support __NR_migrate_pages"
- " or libnuma is not available");
+ tst_brkm(TCONF, NULL, "System doesn't support __NR_migrate_pages or "
+ "libnuma or libnuma development packages are not available");
}
#endif
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
index 6755a384d..55b121eb0 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
@@ -45,6 +45,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <pwd.h>
+
#include "config.h"
#include "test.h"
#include "safe_macros.h"
@@ -65,7 +66,9 @@
char *TCID = "migrate_pages02";
int TST_TOTAL = 1;
-#if defined(__NR_migrate_pages) && HAVE_NUMA_H && HAVE_NUMAIF_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2 \
+ && defined(__NR_migrate_pages)
+
static const char nobody_uid[] = "nobody";
static struct passwd *ltpuser;
static int *nodes, nodeA, nodeB;
@@ -400,7 +403,7 @@ static void cleanup(void)
#else /* __NR_migrate_pages */
int main(void)
{
- tst_brkm(TCONF, NULL, "System doesn't support __NR_migrate_pages"
- " or libnuma is not available");
+ tst_brkm(TCONF, NULL, "System doesn't support __NR_migrate_pages or "
+ "libnuma or libnuma development packages are not available");
}
#endif
diff --git a/testcases/kernel/syscalls/move_pages/move_pages_support.c b/testcases/kernel/syscalls/move_pages/move_pages_support.c
index a488c88f0..3fce8b77f 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages_support.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages_support.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
#include <sys/mman.h>
#include <sys/syscall.h>
#include <unistd.h>
@@ -35,8 +36,7 @@ long get_page_size(void)
*/
void free_pages(void **pages, unsigned int num)
{
-
-#if HAVE_NUMA_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
int i;
size_t onepage = get_page_size();
@@ -111,7 +111,7 @@ int alloc_pages_linear(void **pages, unsigned int num)
{
int nodes[num];
-#if HAVE_NUMA_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
unsigned int i;
unsigned int n = 0;
int num_allowed_nodes;
@@ -168,7 +168,7 @@ int alloc_pages_on_node(void **pages, unsigned int num, int node)
void
verify_pages_on_nodes(void **pages, int *status, unsigned int num, int *nodes)
{
-#if HAVE_NUMA_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
unsigned int i;
int which_node;
int ret;
@@ -214,7 +214,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 HAVE_NUMA_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
unsigned int i;
unsigned int n = 0;
int nodes[num];
@@ -269,7 +269,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 HAVE_NUMA_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
char *shared;
unsigned int i;
int nodes[num];
@@ -392,7 +392,7 @@ void free_sem(sem_t * sem, int num)
*/
void check_config(unsigned int min_nodes)
{
-#if HAVE_NUMA_H && HAVE_NUMAIF_H
+#if HAVE_LIBNUMA && defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION >= 2
int num_allowed_nodes;
int ret;
--
2.14.2
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically
2017-10-12 18:33 ` [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically Petr Vorel
@ 2017-10-13 11:24 ` Cyril Hrubis
0 siblings, 0 replies; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 11:24 UTC (permalink / raw)
To: ltp
Hi!
I've pushed first three patches as these are obviously fine.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 07/18] nfsv4/acl1: Exit with TCONF when libacl not available
2017-10-12 18:33 ` [LTP] [PATCH v3 07/18] nfsv4/acl1: Exit with TCONF when libacl not available Petr Vorel
@ 2017-10-13 12:13 ` Cyril Hrubis
0 siblings, 0 replies; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 12:13 UTC (permalink / raw)
To: ltp
Hi!
Applied, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 08/18] m4: Fix libacl detection on 32-bit cross build
2017-10-12 18:33 ` [LTP] [PATCH v3 08/18] m4: Fix libacl detection on 32-bit cross build Petr Vorel
@ 2017-10-13 12:25 ` Cyril Hrubis
0 siblings, 0 replies; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 12:25 UTC (permalink / raw)
To: ltp
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 09/18] m4: Fix libcrypto detection on 32-bit cross build
2017-10-12 18:33 ` [LTP] [PATCH v3 09/18] m4: Fix libcrypto " Petr Vorel
@ 2017-10-13 12:27 ` Cyril Hrubis
2017-10-13 12:32 ` Cyril Hrubis
0 siblings, 1 reply; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 12:27 UTC (permalink / raw)
To: ltp
Hi!
> +#else
> +int main(void)
> +{
> + tst_resm(TCONF, "test requires libcrypto and openssl development packages");
^
I've changed these to tst_brkm() otherwise the return value
from main() would be undefined because these are oldlib tests
that has to either call tst_exit() or tst_brkm() to actually
exit the test.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 09/18] m4: Fix libcrypto detection on 32-bit cross build
2017-10-13 12:27 ` Cyril Hrubis
@ 2017-10-13 12:32 ` Cyril Hrubis
0 siblings, 0 replies; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 12:32 UTC (permalink / raw)
To: ltp
Hi!
> > +#else
> > +int main(void)
> > +{
> > + tst_resm(TCONF, "test requires libcrypto and openssl development packages");
> ^
> I've changed these to tst_brkm() otherwise the return value
> from main() would be undefined because these are oldlib tests
> that has to either call tst_exit() or tst_brkm() to actually
> exit the test.
And pushed.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 11/18] m4: Fix libaio detection on 32-bit cross build
2017-10-12 18:33 ` [LTP] [PATCH v3 11/18] m4: Fix libaio detection on 32-bit cross build Petr Vorel
@ 2017-10-13 14:46 ` Cyril Hrubis
0 siblings, 0 replies; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 14:46 UTC (permalink / raw)
To: ltp
Hi!
> diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> index 923b9bde3..c62ff87ba 100644
> --- a/m4/ltp-eventfd.m4
> +++ b/m4/ltp-eventfd.m4
> @@ -22,13 +22,12 @@ dnl
> dnl LTP_CHECK_SYSCALL_EVENTFD
> dnl ----------------------------
> dnl
> -AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD],
> -[dnl
> +AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
> AH_TEMPLATE(HAVE_IO_SET_EVENTFD,
> [Define to 1 if you have the `io_set_eventfd' function.])
> -AC_CHECK_HEADERS(libaio.h,[
> - AC_CHECK_LIB(aio,io_setup,[
> - AIO_LIBS="-laio"
> +AC_CHECK_HEADERS(libaio.h, [
> + AC_CHECK_LIB(aio,io_setup, [
> + have_aio=yes
> AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> AC_TRY_LINK([#include <stdio.h>
> #include <libaio.h>
> @@ -38,6 +37,10 @@ AC_CHECK_HEADERS(libaio.h,[
> [AC_DEFINE(HAVE_IO_SET_EVENTFD)
> AC_MSG_RESULT(yes)],
> [AC_MSG_RESULT(no)])],
> - AIO_LIBS="")])
> -AC_SUBST(AIO_LIBS)
> + have_aio=no)])
I guess that it would be a bit easier to read if there was less nested
blocks in there.
What about we do the detection for AIO headers and numa libs
separately, then if these two are tro set the AIO_LIBS and try the
detection fro eventfd as well?
Something as:
if test "x$have_libaio" = "xyes" -a "x$have_aio" = "xyes"; then
AC_DEFINE(HAVE_LIBAIO, ...)
AC_SUBSTS(AIO_LIBS, ...)
AC_TRY_LINK(... AC_DEFINE(HAVE_IO_SET_EVENTFD) ...)
fi
> +
> +if test "x$have_aio" = "xyes"; then
> + AC_SUBST(AIO_LIBS, "-laio")
> + AC_DEFINE(HAVE_LIBAIO, 1, [Define whether libaio and it's headers are installed])
> +fi
> ])
> diff --git a/testcases/kernel/io/aio/aio01/aio01.c b/testcases/kernel/io/aio/aio01/aio01.c
> index 2829b2485..ba23e226c 100644
> --- a/testcases/kernel/io/aio/aio01/aio01.c
> +++ b/testcases/kernel/io/aio/aio01/aio01.c
> @@ -47,26 +47,26 @@
>
> #define _XOPEN_SOURCE 600
>
> -#include "test.h"
> -#include "config.h"
> -
> -char *TCID = "aio01";
> -int TST_TOTAL = 6;
> -
> -#ifdef HAVE_LIBAIO_H
> -
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <fcntl.h>
> #include <time.h>
> #include <errno.h>
> -#include <libaio.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <sys/time.h>
> #include <sys/resource.h>
>
> +#include "test.h"
> +#include "config.h"
> +
> +char *TCID = "aio01";
> +int TST_TOTAL = 6;
> +
> +#ifdef HAVE_LIBAIO
> +#include <libaio.h>
> +
> static void help(void);
> static void setup(void);
> static void cleanup(void);
> @@ -413,14 +413,11 @@ static void cleanup(void)
> close(fd);
> io_queue_release(io_ctx);
> tst_rmdir();
> -
> }
>
> #else
> -
> int main(void)
> {
> - tst_brkm(TCONF, NULL, "libaio missing");
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> }
> -
> #endif
> diff --git a/testcases/kernel/io/aio/aio02/aio_tio.c b/testcases/kernel/io/aio/aio02/aio_tio.c
> index 34fa9ed51..08fb04162 100644
> --- a/testcases/kernel/io/aio/aio02/aio_tio.c
> +++ b/testcases/kernel/io/aio/aio02/aio_tio.c
> @@ -37,7 +37,7 @@
> #include <string.h>
> #include <errno.h>
>
> -#if HAVE_LIBAIO_H
> +#ifdef HAVE_LIBAIO
>
> #define AIO_MAXIO 32
> #define AIO_BLKSIZE (64*1024)
> @@ -237,5 +237,4 @@ int test_main(void)
>
> return status;
> }
> -
> #endif
> diff --git a/testcases/kernel/io/aio/aio02/main.c b/testcases/kernel/io/aio/aio02/main.c
> index 24ec17181..7b157f31b 100644
> --- a/testcases/kernel/io/aio/aio02/main.c
> +++ b/testcases/kernel/io/aio/aio02/main.c
> @@ -6,16 +6,16 @@
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <unistd.h>
> -#include "test.h"
> +
> #include "config.h"
> +#include "test.h"
>
> #define TEST_NAME "aio_tio"
>
> char *TCID = "aio02/" TEST_NAME;
> int TST_TOTAL = 0;
>
> -#if HAVE_LIBAIO_H
> -
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
>
> int test_main(void);
> @@ -32,6 +32,6 @@ int main(void)
> #else
> int main(void)
> {
> - tst_brkm(TCONF, NULL, "libaio missing");
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> }
> #endif
> diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c b/testcases/kernel/io/ltp-aiodio/aio-stress.c
> index d6d7b0880..348f398db 100644
> --- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
> +++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
> @@ -50,19 +50,23 @@
> #include <errno.h>
> #include <assert.h>
> #include <stdlib.h>
> -
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <unistd.h>
> #include <sys/time.h>
> -#include <libaio.h>
> #include <sys/ipc.h>
> #include <sys/shm.h>
> #include <sys/mman.h>
> #include <string.h>
> #include <pthread.h>
>
> +#include "config.h"
> +#include "tst_res_flags.h"
> +
> +#ifdef HAVE_LIBAIO
> +#include <libaio.h>
> +
> #define IO_FREE 0
> #define IO_PENDING 1
> #define RUN_FOREVER -1
> @@ -1557,3 +1561,10 @@ int main(int ac, char **av)
> }
> return status;
> }
> +#else
> +int main(void)
> +{
> + fprintf(stderr, "test requires libaio and it's development packages\n");
> + return TCONF;
> +}
> +#endif
> diff --git a/testcases/kernel/io/ltp-aiodio/aiocp.c b/testcases/kernel/io/ltp-aiodio/aiocp.c
> index 93984bf28..d315353d0 100644
> --- a/testcases/kernel/io/ltp-aiodio/aiocp.c
> +++ b/testcases/kernel/io/ltp-aiodio/aiocp.c
> @@ -38,8 +38,7 @@
> #include "config.h"
> #include "tst_res_flags.h"
>
> -#if HAVE_LIBAIO_H
> -
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
>
> #define AIO_BLKSIZE (64*1024)
> @@ -600,11 +599,9 @@ int main(int argc, char *const *argv)
> */
>
> #else
> -
> int main(void)
> {
> - fprintf(stderr, "System doesn't have libaio support.\n");
> + fprintf(stderr, "test requires libaio and it's development packages\n");
> return TCONF;
> }
> -
> #endif
> diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_append.c b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
> index 39a529fa3..5d97ed941 100644
> --- a/testcases/kernel/io/ltp-aiodio/aiodio_append.c
> +++ b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
> @@ -32,10 +32,14 @@
> #include <fcntl.h>
> #include <unistd.h>
>
> -#include <libaio.h>
> -
> +#include "config.h"
> #include "test.h"
>
> +char *TCID = "aiodio_append";
> +
> +#ifdef HAVE_LIBAIO
> +#include <libaio.h>
> +
> #define NUM_CHILDREN 8
>
> #include "common_checkzero.h"
> @@ -174,3 +178,9 @@ int main(int argc, char **argv)
>
> return 0;
> }
> +#else
> +int main(void)
> +{
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> +}
> +#endif
> diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
> index d40e45b1b..4767f49d2 100644
> --- a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
> +++ b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
> @@ -35,11 +35,17 @@
> #include <limits.h>
> #include <getopt.h>
>
> -#include <libaio.h>
>
> +#include "config.h"
> #include "test.h"
> #include "safe_macros.h"
>
> +char *TCID = "aiodio_sparse";
> +int TST_TOTAL = 1;
> +
> +#ifdef HAVE_LIBAIO
> +#include <libaio.h>
> +
> #define NUM_CHILDREN 1000
>
> int debug;
> @@ -49,9 +55,6 @@ static void setup(void);
> static void cleanup(void);
> static void usage(void);
>
> -char *TCID = "aiodio_sparse";
> -int TST_TOTAL = 1;
> -
> #include "common_sparse.h"
>
> /*
> @@ -325,3 +328,10 @@ static void cleanup(void)
>
> tst_rmdir();
> }
> +
> +#else
> +int main(void)
> +{
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> +}
> +#endif
> diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
> index 37cca7d53..e4f9c804a 100644
> --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
> +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
> @@ -61,15 +61,14 @@
> #define CLEANUP cleanup
> #include "lapi/syscalls.h"
>
> -#ifdef HAVE_LIBAIO_H
> +TCID_DEFINE(eventfd01);
> +int TST_TOTAL = 15;
> +
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
> -#endif
>
> static void setup(void);
>
> -TCID_DEFINE(eventfd01);
> -int TST_TOTAL = 15;
> -
> static int myeventfd(unsigned int initval, int flags)
> {
> /* eventfd2 uses FLAGS but eventfd doesn't take FLAGS. */
> @@ -727,3 +726,10 @@ static void cleanup(void)
> {
> tst_rmdir();
> }
> +
> +#else
> +int main(void)
> +{
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> +}
> +#endif
> diff --git a/testcases/kernel/syscalls/io_cancel/io_cancel01.c b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
> index 8d7ca2607..ed6af050b 100644
> --- a/testcases/kernel/syscalls/io_cancel/io_cancel01.c
> +++ b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
> @@ -21,6 +21,9 @@
> /* Porting from Crackerjack to LTP is done
> by Masatake YAMATO <yamato@redhat.com> */
>
> +#include <errno.h>
> +#include <string.h>
> +
> #include "config.h"
> #include "test.h"
>
> @@ -28,10 +31,8 @@ char *TCID = "io_cancel01";
>
> int TST_TOTAL = 1;
>
> -#ifdef HAVE_LIBAIO_H
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
> -#include <errno.h>
> -#include <string.h>
>
> static void cleanup(void)
> {
> @@ -105,9 +106,10 @@ int main(int argc, char *argv[])
> cleanup();
> tst_exit();
> }
> +
> #else
> -int main(int argc, char *argv[])
> +int main(void)
> {
> - tst_brkm(TCONF, NULL, "System doesn't have libaio support");
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> }
> #endif
> diff --git a/testcases/kernel/syscalls/io_destroy/io_destroy01.c b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
> index 9de4987f4..88bef7ecf 100644
> --- a/testcases/kernel/syscalls/io_destroy/io_destroy01.c
> +++ b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
> @@ -21,6 +21,9 @@
> /* Porting from Crackerjack to LTP is done
> by Masatake YAMATO <yamato@redhat.com> */
>
> +#include <errno.h>
> +#include <string.h>
> +
> #include "config.h"
> #include "test.h"
>
> @@ -28,10 +31,8 @@ char *TCID = "io_destroy01";
>
> int TST_TOTAL = 1;
>
> -#ifdef HAVE_LIBAIO_H
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
> -#include <errno.h>
> -#include <string.h>
>
> static void cleanup(void)
> {
> @@ -99,9 +100,10 @@ int main(int argc, char *argv[])
> cleanup();
> tst_exit();
> }
> +
> #else
> -int main(int argc, char *argv[])
> +int main(void)
> {
> - tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> }
> #endif
> diff --git a/testcases/kernel/syscalls/io_getevents/io_getevents01.c b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
> index 0f31ece32..b34f17907 100644
> --- a/testcases/kernel/syscalls/io_getevents/io_getevents01.c
> +++ b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
> @@ -21,17 +21,17 @@
> /* Porting from Crackerjack to LTP is done
> by Masatake YAMATO <yamato@redhat.com> */
>
> +#include <errno.h>
> +#include <string.h>
> +
> #include "config.h"
> #include "test.h"
>
> char *TCID = "io_getevents01";
> -
> int TST_TOTAL = 1;
>
> -#ifdef HAVE_LIBAIO_H
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
> -#include <errno.h>
> -#include <string.h>
>
> static void cleanup(void)
> {
> @@ -104,9 +104,10 @@ int main(int argc, char *argv[])
> cleanup();
> tst_exit();
> }
> +
> #else
> -int main(int argc, char *argv[])
> +int main(void)
> {
> - tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> }
> #endif
> diff --git a/testcases/kernel/syscalls/io_setup/io_setup01.c b/testcases/kernel/syscalls/io_setup/io_setup01.c
> index 829cef516..22b91bc17 100644
> --- a/testcases/kernel/syscalls/io_setup/io_setup01.c
> +++ b/testcases/kernel/syscalls/io_setup/io_setup01.c
> @@ -21,6 +21,9 @@
> /* Porting from Crackerjack to LTP is done
> by Masatake YAMATO <yamato@redhat.com> */
>
> +#include <errno.h>
> +#include <string.h>
> +
> #include "config.h"
> #include "test.h"
>
> @@ -28,10 +31,8 @@ char *TCID = "io_setup01";
>
> int TST_TOTAL = 4;
>
> -#ifdef HAVE_LIBAIO_H
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
> -#include <errno.h>
> -#include <string.h>
>
> static void cleanup(void)
> {
> @@ -131,9 +132,10 @@ int main(int argc, char *argv[])
>
> tst_exit();
> }
> +
> #else
> -int main(int argc, char *argv[])
> +int main(void)
> {
> - tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
> + tst_brkm(TCONF, NULL, "test requires libaio and it's development packages");
> }
> #endif
> diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
> index 9baf520b8..f4f9933f6 100644
> --- a/testcases/kernel/syscalls/io_submit/io_submit01.c
> +++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
> @@ -20,14 +20,15 @@
> /* Porting from Crackerjack to LTP is done
> by Masatake YAMATO <yamato@redhat.com> */
>
> +#include <errno.h>
> +#include <string.h>
> +#include <fcntl.h>
> +
> #include "config.h"
> #include "tst_test.h"
>
> -#ifdef HAVE_LIBAIO_H
> +#ifdef HAVE_LIBAIO
> #include <libaio.h>
> -#include <errno.h>
> -#include <string.h>
> -#include <fcntl.h>
>
> static io_context_t ctx;
> static io_context_t invalid_ctx;
> @@ -139,5 +140,5 @@ static struct tst_test test = {
> };
>
> #else
> - TST_TEST_TCONF("libaio.h was mission upon compilation");
> + TST_TEST_TCONF("test requires libaio and it's development packages");
> #endif
> --
> 2.14.2
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v3 10/18] io/aiocp: Exit with TCONF when libaio is not available
2017-10-12 18:33 ` [LTP] [PATCH v3 10/18] io/aiocp: Exit with TCONF when libaio is not available Petr Vorel
@ 2017-10-13 14:47 ` Cyril Hrubis
0 siblings, 0 replies; 26+ messages in thread
From: Cyril Hrubis @ 2017-10-13 14:47 UTC (permalink / raw)
To: ltp
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2017-10-13 14:47 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 18:33 [LTP] [PATCH v3 00/18] Fix 32-bit cross compilation Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 01/18] configure.ac: Sort headers alphabetically Petr Vorel
2017-10-13 11:24 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 02/18] m4: Simplify check for linux/can.h header Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 03/18] m4: Simplify check for linux/keyctl.h header Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 04/18] lapi/keyctl.h: Add doc and reorder definitions Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 05/18] syscalls/request_key: Port to use lapi/keyctl.h header Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 06/18] m4: Fix libkeyutils detection on 32-bit cross build Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 07/18] nfsv4/acl1: Exit with TCONF when libacl not available Petr Vorel
2017-10-13 12:13 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 08/18] m4: Fix libacl detection on 32-bit cross build Petr Vorel
2017-10-13 12:25 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 09/18] m4: Fix libcrypto " Petr Vorel
2017-10-13 12:27 ` Cyril Hrubis
2017-10-13 12:32 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 10/18] io/aiocp: Exit with TCONF when libaio is not available Petr Vorel
2017-10-13 14:47 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 11/18] m4: Fix libaio detection on 32-bit cross build Petr Vorel
2017-10-13 14:46 ` Cyril Hrubis
2017-10-12 18:33 ` [LTP] [PATCH v3 12/18] make: Remove workarounds for build without libnuma Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 13/18] numa: Drop NUMA API v1 support Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 14/18] numa: Drop NUMA_CPPFLAGS Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 15/18] hotplug/memory_hotplug: Update TODO Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 16/18] hotplug/memory_hotplug: Remove unused header Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 17/18] hotplug/memory_hotplug: Exit with TCONF when NUMA headers not available Petr Vorel
2017-10-12 18:33 ` [LTP] [PATCH v3 18/18] m4, kernel/lib: Detect libnuma presence in kernel libs Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox