From: Ricardo Branco <rbranco@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 3/3] userfaultfd: Reset wp_fault_seen on each run()
Date: Thu, 7 May 2026 14:28:55 +0200 [thread overview]
Message-ID: <20260507122858.19670-3-rbranco@suse.de> (raw)
In-Reply-To: <20260507122858.19670-1-rbranco@suse.de>
wp_fault_seen was never reset to 0 at the top of run(); so on multiple
runs (-i N) the second iteration could falsely pass.
Signed-off-by: Ricardo Branco <rbranco@suse.de>
---
testcases/kernel/syscalls/userfaultfd/userfaultfd05.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c b/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c
index a42ac09bd..e36f9c321 100644
--- a/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c
+++ b/testcases/kernel/syscalls/userfaultfd/userfaultfd05.c
@@ -97,6 +97,7 @@ static void run(void)
struct uffdio_writeprotect uffdio_writeprotect;
set_pages();
+ wp_fault_seen = 0;
uffd = SAFE_USERFAULTFD(O_CLOEXEC | O_NONBLOCK, false);
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-05-07 12:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 12:28 [LTP] [PATCH v4 1/3] userfaultfd: Add helper for checking UFFD feature support Ricardo Branco
2026-05-07 12:28 ` [LTP] [PATCH v4 2/3] userfaultfd: Use two-step handshake to probe features Ricardo Branco
2026-05-07 12:36 ` Andrea Cervesato via ltp
2026-05-07 12:28 ` Ricardo Branco [this message]
2026-05-07 12:36 ` [LTP] [PATCH v4 3/3] userfaultfd: Reset wp_fault_seen on each run() Andrea Cervesato via ltp
2026-05-07 12:40 ` [LTP] [PATCH v4 1/3] userfaultfd: Add helper for checking UFFD feature support Andrea Cervesato via ltp
2026-05-07 14:20 ` Cyril Hrubis
2026-05-07 14:22 ` [LTP] " linuxtestproject.agent
2026-05-07 14:40 ` Andrea Cervesato via ltp
2026-05-07 14:43 ` Cyril Hrubis
2026-05-07 16:57 ` Andrea Cervesato via ltp
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=20260507122858.19670-3-rbranco@suse.de \
--to=rbranco@suse.de \
--cc=ltp@lists.linux.it \
/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