* [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs
@ 2026-01-06 15:45 Lorenzo Stoakes
2026-01-06 17:28 ` Andrew Morton
2026-01-06 18:40 ` David Hildenbrand (Red Hat)
0 siblings, 2 replies; 5+ messages in thread
From: Lorenzo Stoakes @ 2026-01-06 15:45 UTC (permalink / raw)
To: Andrew Morton
Cc: Mark Brown, David Hildenbrand, Jason Gunthorpe, John Hubbard,
Peter Xu, Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, linux-mm, linux-kselftest,
linux-kernel
Commit 66bce7afbaca ("selftests/mm: fix test result reporting in
gup_longterm") introduced a small bug causing unknown filesystems to always
result in a test failure.
This is because do_test() was updated to use a common reporting path, but
this case appears to have been missed.
This is problematic for e.g. virtme-ng which uses an overlayfs file system,
causing gup_longterm to appear to fail each time due to a test count
mismatch:
# Planned tests != run tests (50 != 46)
# Totals: pass:24 fail:0 xfail:0 xpass:0 skip:22 error:0
The fix is to simply change the return into a break.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Fixes: 66bce7afbaca ("selftests/mm: fix test result reporting in gup_longterm")
---
tools/testing/selftests/mm/gup_longterm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c
index 6279893a0adc..f61150d28eb2 100644
--- a/tools/testing/selftests/mm/gup_longterm.c
+++ b/tools/testing/selftests/mm/gup_longterm.c
@@ -179,7 +179,7 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared)
if (rw && shared && fs_is_unknown(fs_type)) {
ksft_print_msg("Unknown filesystem\n");
result = KSFT_SKIP;
- return;
+ break;
}
/*
* R/O pinning or pinning in a private mapping is always
--
2.52.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs
2026-01-06 15:45 [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs Lorenzo Stoakes
@ 2026-01-06 17:28 ` Andrew Morton
2026-01-06 17:29 ` Mark Brown
2026-01-06 18:40 ` David Hildenbrand (Red Hat)
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2026-01-06 17:28 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Mark Brown, David Hildenbrand, Jason Gunthorpe, John Hubbard,
Peter Xu, Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, linux-mm, linux-kselftest,
linux-kernel
On Tue, 6 Jan 2026 15:45:47 +0000 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> Commit 66bce7afbaca ("selftests/mm: fix test result reporting in
> gup_longterm") introduced a small bug causing unknown filesystems to always
> result in a test failure.
>
> This is because do_test() was updated to use a common reporting path, but
> this case appears to have been missed.
>
> This is problematic for e.g. virtme-ng which uses an overlayfs file system,
> causing gup_longterm to appear to fail each time due to a test count
> mismatch:
>
> # Planned tests != run tests (50 != 46)
> # Totals: pass:24 fail:0 xfail:0 xpass:0 skip:22 error:0
>
> The fix is to simply change the return into a break.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Fixes: 66bce7afbaca ("selftests/mm: fix test result reporting in gup_longterm")
-stable users might want this?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs
2026-01-06 17:28 ` Andrew Morton
@ 2026-01-06 17:29 ` Mark Brown
2026-01-06 18:37 ` Lorenzo Stoakes
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2026-01-06 17:29 UTC (permalink / raw)
To: Andrew Morton
Cc: Lorenzo Stoakes, David Hildenbrand, Jason Gunthorpe,
John Hubbard, Peter Xu, Liam R . Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, linux-mm,
linux-kselftest, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
On Tue, Jan 06, 2026 at 09:28:36AM -0800, Andrew Morton wrote:
> On Tue, 6 Jan 2026 15:45:47 +0000 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> > Commit 66bce7afbaca ("selftests/mm: fix test result reporting in
> > gup_longterm") introduced a small bug causing unknown filesystems to always
> > result in a test failure.
> > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> > Fixes: 66bce7afbaca ("selftests/mm: fix test result reporting in gup_longterm")
> -stable users might want this?
I think so.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs
2026-01-06 17:29 ` Mark Brown
@ 2026-01-06 18:37 ` Lorenzo Stoakes
0 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Stoakes @ 2026-01-06 18:37 UTC (permalink / raw)
To: Mark Brown
Cc: Andrew Morton, David Hildenbrand, Jason Gunthorpe, John Hubbard,
Peter Xu, Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, linux-mm, linux-kselftest,
linux-kernel
On Tue, Jan 06, 2026 at 05:29:51PM +0000, Mark Brown wrote:
> On Tue, Jan 06, 2026 at 09:28:36AM -0800, Andrew Morton wrote:
> > On Tue, 6 Jan 2026 15:45:47 +0000 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
>
> > > Commit 66bce7afbaca ("selftests/mm: fix test result reporting in
> > > gup_longterm") introduced a small bug causing unknown filesystems to always
> > > result in a test failure.
>
> > > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> > > Fixes: 66bce7afbaca ("selftests/mm: fix test result reporting in gup_longterm")
>
> > -stable users might want this?
>
> I think so.
Yeh I did wonder if we'd want that, and I think you confirmed Mark that people
do potentially run tests on stable kernels? Or I can't remember :)
Anyway if so then sure. I think this should be an easy automagic-backport
anyway!
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs
2026-01-06 15:45 [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs Lorenzo Stoakes
2026-01-06 17:28 ` Andrew Morton
@ 2026-01-06 18:40 ` David Hildenbrand (Red Hat)
1 sibling, 0 replies; 5+ messages in thread
From: David Hildenbrand (Red Hat) @ 2026-01-06 18:40 UTC (permalink / raw)
To: Lorenzo Stoakes, Andrew Morton
Cc: Mark Brown, Jason Gunthorpe, John Hubbard, Peter Xu,
Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, linux-mm, linux-kselftest,
linux-kernel
On 1/6/26 16:45, Lorenzo Stoakes wrote:
> Commit 66bce7afbaca ("selftests/mm: fix test result reporting in
> gup_longterm") introduced a small bug causing unknown filesystems to always
> result in a test failure.
>
> This is because do_test() was updated to use a common reporting path, but
> this case appears to have been missed.
>
> This is problematic for e.g. virtme-ng which uses an overlayfs file system,
> causing gup_longterm to appear to fail each time due to a test count
> mismatch:
>
> # Planned tests != run tests (50 != 46)
> # Totals: pass:24 fail:0 xfail:0 xpass:0 skip:22 error:0
>
> The fix is to simply change the return into a break.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Fixes: 66bce7afbaca ("selftests/mm: fix test result reporting in gup_longterm")
> ---
Reviewed-by: David Hildenbrand (Red Hat) <david@kernel.org>
--
Cheers
David
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-06 18:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06 15:45 [PATCH] tools/testing/selftests: fix gup_longterm for unknown fs Lorenzo Stoakes
2026-01-06 17:28 ` Andrew Morton
2026-01-06 17:29 ` Mark Brown
2026-01-06 18:37 ` Lorenzo Stoakes
2026-01-06 18:40 ` David Hildenbrand (Red Hat)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox