[LTP] [RFC PATCH v2 2/7] m4: Remove check for io_set_eventfd

Petr Vorel pvorel@suse.cz
Wed Jan 26 13:35:42 CET 2022


It was added in Jan 2008 in libaio-0.3.108, even Centos 6 has 0.3.109,
SLES11-SP4 and Debian stretch (oldoldstable) have 0.3.110.

At least CentOS 6 and SLES11-SP4 don't event compiles LTP at least 2
releases back.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2

 m4/ltp-eventfd.m4                             | 11 +----------
 testcases/kernel/syscalls/eventfd/eventfd01.c | 18 +-----------------
 2 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
index 5d729a33df..ecd7e951dc 100644
--- a/m4/ltp-eventfd.m4
+++ b/m4/ltp-eventfd.m4
@@ -1,6 +1,6 @@
 dnl SPDX-License-Identifier: GPL-2.0-or-later
 dnl Copyright (c) Red Hat Inc., 2008
-dnl Copyright (c) 2017 Petr Vorel <pvorel@suse.cz>
+dnl Copyright (c) 2017-2022 Petr Vorel <pvorel@suse.cz>
 dnl Author: Masatake YAMATO <yamato@redhat.com>
 
 AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
@@ -10,14 +10,5 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
 	if test "x$have_libaio" = "xyes" -a "x$have_aio" = "xyes"; then
 		AC_DEFINE(HAVE_LIBAIO, 1, [Define to 1 if you have libaio and it's headers installed.])
 		AC_SUBST(AIO_LIBS, "-laio")
-
-		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
-		AC_TRY_LINK([#include <stdio.h>
-                             #include <libaio.h>
-		            ],
-		            [io_set_eventfd(NULL, 0); return 0;],
-		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
-						AC_MSG_RESULT(yes)],
-		            [AC_MSG_RESULT(no)])
 	fi
 ])
diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
index 242e170e27..3180ea1593 100644
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -1,5 +1,6 @@
 /*
  *   Copyright (c) 2008 Vijay Kumar B. <vijaykumar@bravegnu.org>
+ *   Copyright (c) Linux Test Project, 2008-2022
  *
  *   Based on testcases/kernel/syscalls/waitpid/waitpid01.c
  *   Original copyright message:
@@ -472,7 +473,6 @@ static void child_inherit_test(int fd)
 	}
 }
 
-#ifdef HAVE_IO_SET_EVENTFD
 /*
  * Test whether counter overflow is detected and handled correctly.
  *
@@ -648,22 +648,6 @@ static void overflow_read_test(int evfd)
 	}
 	cleanup_overflow(fd, ctx);
 }
-#else
-static void overflow_select_test(int evfd)
-{
-	tst_resm(TCONF, "eventfd support is not available in AIO subsystem");
-}
-
-static void overflow_poll_test(int evfd)
-{
-	tst_resm(TCONF, "eventfd support is not available in AIO subsystem");
-}
-
-static void overflow_read_test(int evfd)
-{
-	tst_resm(TCONF, "eventfd support is not available in AIO subsystem");
-}
-#endif
 
 int main(int argc, char **argv)
 {
-- 
2.34.1



More information about the ltp mailing list