public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] userfaultfd03.c: Require kernel 6.1
@ 2026-03-26 12:52 Petr Vorel
  2026-03-26 21:35 ` Ricardo Branco
  2026-03-27  5:41 ` Li Wang via ltp
  0 siblings, 2 replies; 11+ messages in thread
From: Petr Vorel @ 2026-03-26 12:52 UTC (permalink / raw)
  To: ltp

Required kernel functionality was added in kernel 6.1 (not 6.11)
2d5de004e009 ("userfaultfd: add /dev/userfaultfd for fine grained access control")

Because it's a new kernel functionality which has not been backported to
enterprise kernels we can simplify check with just .min_kver.

Fixes: b63ab54aee ("userfaultfd: Do not use min_kver as gate for test")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi all,

@Li I suppose RHEL kernel haven't backport this.

Kind regards,
Petr

 testcases/kernel/syscalls/userfaultfd/userfaultfd03.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd03.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd03.c
index b65f39ecab..dd4354be6f 100644
--- a/testcases/kernel/syscalls/userfaultfd/userfaultfd03.c
+++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd03.c
@@ -24,15 +24,6 @@ static char *page;
 static void *copy_page;
 static int uffd;
 
-static void setup(void)
-{
-	if (access("/dev/userfaultfd", F_OK) != 0) {
-		int res = (tst_kvercmp(6, 1, 0) < 0) ? TCONF : TBROK;
-
-		tst_brk(res, "/dev/userfaultfd not found");
-	}
-}
-
 static int open_userfaultfd(int flags)
 {
 	int fd, fd2;
@@ -127,8 +118,8 @@ static void run(void)
 
 static struct tst_test test = {
 	.needs_root = 1,
-	.setup = setup,
 	.test_all = run,
+	.min_kver = "6.1",
 	.needs_kconfigs = (const char *[]) {
 		"CONFIG_USERFAULTFD=y",
 		NULL
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-03-30 22:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 12:52 [LTP] [PATCH] userfaultfd03.c: Require kernel 6.1 Petr Vorel
2026-03-26 21:35 ` Ricardo Branco
2026-03-27  5:41 ` Li Wang via ltp
2026-03-27  9:05   ` Petr Vorel
2026-03-27 13:17     ` Cyril Hrubis
2026-03-27 13:19       ` Cyril Hrubis
2026-03-27 15:17         ` Petr Vorel
2026-03-27 16:07           ` Cyril Hrubis
2026-03-27 16:44             ` Petr Vorel
2026-03-30 14:58               ` Cyril Hrubis
2026-03-30 22:53                 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox