[LTP] [RFC PATCH v2 5/7] m4: Remove check for MREMAP_FIXED
Petr Vorel
pvorel@suse.cz
Wed Jan 26 13:35:45 CET 2022
glibc and uclibc added it in 2005, musl at 2011.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2
configure.ac | 1 -
m4/ltp-mremap_fixed.m4 | 12 ------------
testcases/kernel/mem/thp/thp02.c | 5 -----
testcases/kernel/syscalls/mremap/mremap05.c | 11 -----------
4 files changed, 29 deletions(-)
delete mode 100644 m4/ltp-mremap_fixed.m4
diff --git a/configure.ac b/configure.ac
index 6ff761837a..41c385edcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -360,7 +360,6 @@ LTP_CHECK_KEYUTILS_SUPPORT
LTP_CHECK_LIBMNL
LTP_CHECK_LINUX_PTRACE
LTP_CHECK_LINUXRANDOM
-LTP_CHECK_MREMAP_FIXED
LTP_CHECK_NOMMU_LINUX
LTP_CHECK_SELINUX
LTP_CHECK_SYNC_ADD_AND_FETCH
diff --git a/m4/ltp-mremap_fixed.m4 b/m4/ltp-mremap_fixed.m4
deleted file mode 100644
index 66548b82b3..0000000000
--- a/m4/ltp-mremap_fixed.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl SPDX-License-Identifier: GPL-2.0-or-later
-dnl Copyright (c) Linux Test Project, 2012
-dnl Author: Cyril Hrubis <chrubis@suse.cz>
-
-AC_DEFUN([LTP_CHECK_MREMAP_FIXED],[
-AH_TEMPLATE(HAVE_MREMAP_FIXED,
-[Define to 1 if you have MREMAP_FIXED in <sys/mman.h>.])
-AC_MSG_CHECKING([for MREMAP_FIXED in <sys/mman.h>])
-AC_TRY_COMPILE([#define _GNU_SOURCE
- #include <sys/mman.h>], [int flags = MREMAP_FIXED;],
- AC_DEFINE(HAVE_MREMAP_FIXED) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
-])
diff --git a/testcases/kernel/mem/thp/thp02.c b/testcases/kernel/mem/thp/thp02.c
index a1b0ee0ab1..56568d1d18 100644
--- a/testcases/kernel/mem/thp/thp02.c
+++ b/testcases/kernel/mem/thp/thp02.c
@@ -40,7 +40,6 @@
#include <unistd.h>
#include "mem.h"
-#ifdef HAVE_MREMAP_FIXED
static int ps;
static long hps, size;
@@ -119,7 +118,3 @@ static struct tst_test test = {
.test_all = do_mremap,
.forks_child = 1,
};
-
-#else
- TST_TEST_TCONF("MREMAP_FIXED not present in <sys/mman.h>");
-#endif /* HAVE_MREMAP_FIXED */
diff --git a/testcases/kernel/syscalls/mremap/mremap05.c b/testcases/kernel/syscalls/mremap/mremap05.c
index 5e8cda5d78..d85ebb068d 100644
--- a/testcases/kernel/syscalls/mremap/mremap05.c
+++ b/testcases/kernel/syscalls/mremap/mremap05.c
@@ -45,8 +45,6 @@
char *TCID = "mremap05";
-#ifdef HAVE_MREMAP_FIXED
-
struct test_case_t {
char *old_address;
char *new_address;
@@ -239,12 +237,3 @@ static void setup(void)
static void cleanup(void)
{
}
-
-#else
-
-int main(void)
-{
- tst_brkm(TCONF, NULL, "MREMAP_FIXED not present in <sys/mman.h>");
-}
-
-#endif /* HAVE_MREMAP_FIXED */
--
2.34.1
More information about the ltp
mailing list