[LTP] [PATCH v1 3/3] syscalls/userfaultfd01: Remove compile-time TCONF handling

David Hildenbrand david@redhat.com
Mon Nov 28 12:18:33 CET 2022


Let's remove the conditional compile-time TCONF handling by including
include/lapi/userfaultfd.h .

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 testcases/kernel/syscalls/userfaultfd/userfaultfd01.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c
index 2dae2ec78..c2c684d2b 100644
--- a/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c
+++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd01.c
@@ -12,13 +12,11 @@
 #include "config.h"
 #include "tst_test.h"
 
-#ifdef HAVE_LINUX_USERFAULTFD_H
-#include <linux/userfaultfd.h>
 #include <poll.h>
 
 #include "tst_safe_macros.h"
 #include "tst_safe_pthread.h"
-#include "lapi/syscalls.h"
+#include "lapi/userfaultfd.h"
 
 static int page_size;
 static char *page;
@@ -122,7 +120,3 @@ static struct tst_test test = {
 	.test_all = run,
 	.min_kver = "4.3",
 };
-
-#else
-	TST_TEST_TCONF("This system does not provide userfaultfd support");
-#endif
-- 
2.38.1



More information about the ltp mailing list