[PATCH v2] selftests/mm: fix gup_longterm EINVAL error message

zhaozhengzhuo posted 1 patch 13 hours ago
tools/testing/selftests/mm/gup_longterm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] selftests/mm: fix gup_longterm EINVAL error message
Posted by zhaozhengzhuo 13 hours ago
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
Re: [PATCH v2] selftests/mm: fix gup_longterm EINVAL error message
Posted by David Hildenbrand (Arm) 2 hours ago
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
Re: [PATCH v2] selftests/mm: fix gup_longterm EINVAL error message
Posted by Dev Jain 13 hours ago

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