* [PATCH] selftests/mm: fix gup_longterm EINVAL error message
@ 2026-07-24 6:59 zhaozhengzhuo
2026-07-24 7:26 ` Sarthak Sharma
2026-07-24 7:46 ` [PATCH v2] " zhaozhengzhuo
0 siblings, 2 replies; 5+ messages in thread
From: zhaozhengzhuo @ 2026-07-24 6:59 UTC (permalink / raw)
To: David Hildenbrand, Shuah Khan
Cc: Andrew Morton, Jason Gunthorpe, John Hubbard, Peter Xu, linux-mm,
linux-kselftest, linux-kernel, zhaozhengzhuo
The gup_longterm test prints a literal "n" when
PIN_LONGTERM_TEST_START fails with EINVAL because the string is missing the
newline escape sequence.
Print a newline instead.
Signed-off-by: zhaozhengzhuo <zhaozhengzhuo@uniontech.com>
---
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 eb8963e9d..c03b4f891 100644
--- a/tools/testing/selftests/mm/gup_longterm.c
+++ b/tools/testing/selftests/mm/gup_longterm.c
@@ -196,7 +196,7 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared)
args.flags |= rw ? PIN_LONGTERM_TEST_FLAG_USE_WRITE : 0;
ret = ioctl(gup_fd, PIN_LONGTERM_TEST_START, &args);
if (ret && errno == EINVAL) {
- ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)n");
+ ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)\n");
result = KSFT_SKIP;
break;
} else if (ret && errno == EFAULT) {
base-commit: c04df384b55dd9dcf72c36b661becb5aaba371a9
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests/mm: fix gup_longterm EINVAL error message
2026-07-24 6:59 [PATCH] selftests/mm: fix gup_longterm EINVAL error message zhaozhengzhuo
@ 2026-07-24 7:26 ` Sarthak Sharma
2026-07-24 7:46 ` [PATCH v2] " zhaozhengzhuo
1 sibling, 0 replies; 5+ messages in thread
From: Sarthak Sharma @ 2026-07-24 7:26 UTC (permalink / raw)
To: zhaozhengzhuo, David Hildenbrand, Shuah Khan
Cc: Andrew Morton, Jason Gunthorpe, John Hubbard, Peter Xu, linux-mm,
linux-kselftest, linux-kernel
Hi!
On 7/24/26 12:29 PM, zhaozhengzhuo wrote:
> The gup_longterm test prints a literal "n" when
> PIN_LONGTERM_TEST_START fails with EINVAL because the string is missing the
> newline escape sequence.
>
> Print a newline instead.
>
> Signed-off-by: zhaozhengzhuo <zhaozhengzhuo@uniontech.com>
Can you add a Fixes: tag here? For this patch, it would be
Fixes: 800ddf3cd74b ("selftests/mm: report errno when things fail in
gup_longterm")
Rest looks good to me.
Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com>
> ---
> 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 eb8963e9d..c03b4f891 100644
> --- a/tools/testing/selftests/mm/gup_longterm.c
> +++ b/tools/testing/selftests/mm/gup_longterm.c
> @@ -196,7 +196,7 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared)
> args.flags |= rw ? PIN_LONGTERM_TEST_FLAG_USE_WRITE : 0;
> ret = ioctl(gup_fd, PIN_LONGTERM_TEST_START, &args);
> if (ret && errno == EINVAL) {
> - ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)n");
> + ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)\n");
> result = KSFT_SKIP;
> break;
> } else if (ret && errno == EFAULT) {
>
> base-commit: c04df384b55dd9dcf72c36b661becb5aaba371a9
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] selftests/mm: fix gup_longterm EINVAL error message
2026-07-24 6:59 [PATCH] selftests/mm: fix gup_longterm EINVAL error message zhaozhengzhuo
2026-07-24 7:26 ` Sarthak Sharma
@ 2026-07-24 7:46 ` zhaozhengzhuo
2026-07-24 8:22 ` Dev Jain
2026-07-24 19:02 ` David Hildenbrand (Arm)
1 sibling, 2 replies; 5+ messages in thread
From: zhaozhengzhuo @ 2026-07-24 7:46 UTC (permalink / raw)
To: David Hildenbrand, Shuah Khan
Cc: Andrew Morton, Jason Gunthorpe, John Hubbard, Peter Xu,
Sarthak Sharma, linux-mm, linux-kselftest, linux-kernel,
zhaozhengzhuo
The gup_longterm test prints a literal "n" when
PIN_LONGTERM_TEST_START fails with EINVAL because the string is missing the
newline escape sequence.
Print a newline instead.
Fixes: 800ddf3cd74b ("selftests/mm: report errno when things fail in gup_longterm")
Signed-off-by: zhaozhengzhuo <zhaozhengzhuo@uniontech.com>
Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com>
---
Changes in v2:
- Add Fixes tag as suggested by Sarthak.
- Add Reviewed-by tag from Sarthak.
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 eb8963e9d..c03b4f891 100644
--- a/tools/testing/selftests/mm/gup_longterm.c
+++ b/tools/testing/selftests/mm/gup_longterm.c
@@ -196,7 +196,7 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared)
args.flags |= rw ? PIN_LONGTERM_TEST_FLAG_USE_WRITE : 0;
ret = ioctl(gup_fd, PIN_LONGTERM_TEST_START, &args);
if (ret && errno == EINVAL) {
- ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)n");
+ ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)\n");
result = KSFT_SKIP;
break;
} else if (ret && errno == EFAULT) {
base-commit: c04df384b55dd9dcf72c36b661becb5aaba371a9
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] selftests/mm: fix gup_longterm EINVAL error message
2026-07-24 7:46 ` [PATCH v2] " zhaozhengzhuo
@ 2026-07-24 8:22 ` Dev Jain
2026-07-24 19:02 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 5+ messages in thread
From: Dev Jain @ 2026-07-24 8:22 UTC (permalink / raw)
To: zhaozhengzhuo, David Hildenbrand, Shuah Khan
Cc: Andrew Morton, Jason Gunthorpe, John Hubbard, Peter Xu,
Sarthak Sharma, linux-mm, linux-kselftest, linux-kernel
On 24/07/26 1:16 pm, zhaozhengzhuo wrote:
> The gup_longterm test prints a literal "n" when
> PIN_LONGTERM_TEST_START fails with EINVAL because the string is missing the
> newline escape sequence.
>
> Print a newline instead.
>
> Fixes: 800ddf3cd74b ("selftests/mm: report errno when things fail in gup_longterm")
> Signed-off-by: zhaozhengzhuo <zhaozhengzhuo@uniontech.com>
> Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com>
> ---
Thanks.
For future, please send the next version of the patch in a separate thread, not as a
reply to the previous.
Reviewed-by: Dev Jain <dev.jain@arm.com>
> Changes in v2:
> - Add Fixes tag as suggested by Sarthak.
> - Add Reviewed-by tag from Sarthak.
>
> 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 eb8963e9d..c03b4f891 100644
> --- a/tools/testing/selftests/mm/gup_longterm.c
> +++ b/tools/testing/selftests/mm/gup_longterm.c
> @@ -196,7 +196,7 @@ static void do_test(int fd, size_t size, enum test_type type, bool shared)
> args.flags |= rw ? PIN_LONGTERM_TEST_FLAG_USE_WRITE : 0;
> ret = ioctl(gup_fd, PIN_LONGTERM_TEST_START, &args);
> if (ret && errno == EINVAL) {
> - ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)n");
> + ksft_print_msg("PIN_LONGTERM_TEST_START failed (EINVAL)\n");
> result = KSFT_SKIP;
> break;
> } else if (ret && errno == EFAULT) {
>
> base-commit: c04df384b55dd9dcf72c36b661becb5aaba371a9
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] selftests/mm: fix gup_longterm EINVAL error message
2026-07-24 7:46 ` [PATCH v2] " zhaozhengzhuo
2026-07-24 8:22 ` Dev Jain
@ 2026-07-24 19:02 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 5+ messages in thread
From: David Hildenbrand (Arm) @ 2026-07-24 19:02 UTC (permalink / raw)
To: zhaozhengzhuo, Shuah Khan
Cc: Andrew Morton, Jason Gunthorpe, John Hubbard, Peter Xu,
Sarthak Sharma, linux-mm, linux-kselftest, linux-kernel
On 7/24/26 09:46, zhaozhengzhuo wrote:
> The gup_longterm test prints a literal "n" when
> PIN_LONGTERM_TEST_START fails with EINVAL because the string is missing the
> newline escape sequence.
>
> Print a newline instead.
>
> Fixes: 800ddf3cd74b ("selftests/mm: report errno when things fail in gup_longterm")
Drop this: it confuses people that care about backporting actual fixes into
downstream kernels.
Acked-by: David Hildenbrand (arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-24 19:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 6:59 [PATCH] selftests/mm: fix gup_longterm EINVAL error message zhaozhengzhuo
2026-07-24 7:26 ` Sarthak Sharma
2026-07-24 7:46 ` [PATCH v2] " zhaozhengzhuo
2026-07-24 8:22 ` Dev Jain
2026-07-24 19:02 ` David Hildenbrand (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox