Linux Test Project
 help / color / mirror / Atom feed
From: Wake Liu via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: Wake Liu <wakel@google.com>, camann@suse.com, rbranco@suse.com
Subject: [LTP] [PATCH] syscalls/userfaultfd04: Require CONFIG_USERFAULTFD=y
Date: Wed, 29 Apr 2026 18:12:44 +0800	[thread overview]
Message-ID: <20260429101244.3309913-1-wakel@google.com> (raw)
In-Reply-To: <69f1d73a.050a0220.3c19ab.a437@mx.google.com>

The test fails with TBROK on systems where CONFIG_USERFAULTFD is not
enabled because SAFE_USERFAULTFD calls tst_syscall(__NR_userfaultfd)
which fails (e.g., returning ENOSYS or EOPNOTSUPP), and SAFE_USERFAULTFD
calls tst_brk(TBROK) for errors other than EPERM.

Fix this by adding CONFIG_USERFAULTFD=y to .needs_kconfigs, so that
the test is skipped with TCONF on kernels without userfaultfd support.

Signed-off-by: Wake Liu <wakel@google.com>
---
 testcases/kernel/syscalls/userfaultfd/userfaultfd04.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd04.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd04.c
index 4eb811e45..a84117964 100644
--- a/testcases/kernel/syscalls/userfaultfd/userfaultfd04.c
+++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd04.c
@@ -98,4 +98,8 @@ static void run(void)
 
 static struct tst_test test = {
 	.test_all = run,
+	.needs_kconfigs = (const char *[]) {
+		"CONFIG_USERFAULTFD=y",
+		NULL
+	}
 };
-- 
2.54.0.545.g6539524ca2-goog


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

  reply	other threads:[~2026-04-29 10:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29  6:40 [LTP] [PATCH] lapi/userfaultfd: Handle ENOSYS in SAFE_USERFAULTFD Wake Liu via ltp
2026-04-29  6:52 ` Andrea Cervesato via ltp
2026-04-29  8:51   ` Wake Liu via ltp
2026-04-29  9:22     ` Andrea Cervesato via ltp
2026-04-29  9:48       ` Wake Liu via ltp
2026-04-29 10:02         ` Andrea Cervesato via ltp
2026-04-29 10:12           ` Wake Liu via ltp [this message]
2026-04-29 12:22             ` [LTP] syscalls/userfaultfd04: Require CONFIG_USERFAULTFD=y linuxtestproject.agent
2026-05-06 15:52             ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-05-06 15:57             ` Andrea Cervesato via ltp
2026-04-29  7:31 ` [LTP] lapi/userfaultfd: Handle ENOSYS in SAFE_USERFAULTFD linuxtestproject.agent
2026-04-29  7:36   ` Andrea Cervesato via ltp
2026-04-29 11:07 ` [LTP] [PATCH] " Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260429101244.3309913-1-wakel@google.com \
    --to=ltp@lists.linux.it \
    --cc=camann@suse.com \
    --cc=rbranco@suse.com \
    --cc=wakel@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox