From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Sarthak Sharma <sarthak.sharma@arm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
John Hubbard <jhubbard@nvidia.com>,
Kalesh Singh <kaleshsingh@google.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Park Tae-sun <ts930@dgu.ac.kr>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 2/9] selftests/mm: mremap_test: skip test when userfaultfd is unavailable
Date: Tue, 29 Sep 2026 10:00:30 +0200 [thread overview]
Message-ID: <49b0b8c5-4605-41af-9a83-26ec6a07bb96@kernel.org> (raw)
In-Reply-To: <20260924050009.19974-3-sarthak.sharma@arm.com>
On 9/24/26 07:00, Sarthak Sharma wrote:
> The userfaultfd syscall can return ENOSYS even when __NR_userfaultfd is
> defined by the architecture headers, for example when the kernel is
> built without CONFIG_USERFAULTFD. The test currently skips for EPERM
> when the caller lacks permission to use userfaultfd but treats
> ENOSYS as a failure.
>
> Handle ENOSYS like EPERM and skip the mremap_move_multi_invalid_vmas()
> test when userfaultfd syscall is not implemented.
>
> Fixes: 742d3663a577 ("selftests/mm: add test for invalid multi VMA operations")
> Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
> ---
> tools/testing/selftests/mm/mremap_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
> index 5532d3151ed0..a5813a5e8f5b 100644
> --- a/tools/testing/selftests/mm/mremap_test.c
> +++ b/tools/testing/selftests/mm/mremap_test.c
> @@ -721,7 +721,7 @@ static void mremap_move_multi_invalid_vmas(FILE *maps_fp,
> if (uffd == -1) {
> err = errno;
> ksft_perror("userfaultfd");
Should we rather move that below the if? Doesn't quite make sense to print the
error if we are skipping and printing a proper message.
Maybe that should go into the previous patch?
> - if (err == EPERM) {
> + if (err == EPERM || err == ENOSYS) {
> ksft_test_result_skip("%s - missing uffd\n", test_name);
> return;
> }
Apart from that LGTM.
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
next prev parent reply other threads:[~2026-09-29 8:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 5:00 [PATCH RESEND 0/9] selftests/mm: improve mremap_test Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 1/9] selftests/mm: mremap_test: use kselftest helpers Sarthak Sharma
2026-09-29 7:58 ` David Hildenbrand (Arm)
2026-09-29 9:12 ` Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 2/9] selftests/mm: mremap_test: skip test when userfaultfd is unavailable Sarthak Sharma
2026-09-29 8:00 ` David Hildenbrand (Arm) [this message]
2026-09-29 9:17 ` Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 3/9] selftests/mm: mremap_test: fail unexpected mremap successes Sarthak Sharma
2026-09-29 8:17 ` David Hildenbrand (Arm)
2026-09-24 5:00 ` [PATCH RESEND 4/9] selftests/mm: mremap_test: correct multiple VMA range size Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 5/9] selftests/mm: mremap_test: fail on data corruption Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 6/9] selftests/mm: mremap_test: replace random data with deterministic pattern Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 7/9] selftests/mm: mremap_test: remove perf tests and timing Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 8/9] selftests/mm: mremap_test: remove validation threshold Sarthak Sharma
2026-09-24 5:00 ` [PATCH RESEND 9/9] selftests/mm: mremap_test: strengthen multi VMA validation Sarthak Sharma
2026-09-29 5:54 ` [PATCH RESEND 0/9] selftests/mm: improve mremap_test Sarthak Sharma
2026-09-29 7:32 ` Kalesh Singh
2026-09-29 7:47 ` David Hildenbrand (Arm)
2026-09-29 9:05 ` Sarthak Sharma
2026-09-29 8:36 ` Lorenzo Stoakes (ARM)
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=49b0b8c5-4605-41af-9a83-26ec6a07bb96@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=jhubbard@nvidia.com \
--cc=kaleshsingh@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=sarthak.sharma@arm.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=ts930@dgu.ac.kr \
--cc=vbabka@kernel.org \
/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
all inboxes | Powered by JetHome®