* [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ)
@ 2023-10-07 10:18 Thomas Weißschuh
2023-10-07 10:36 ` Willy Tarreau
2023-10-07 13:42 ` [PATCH] " Zhangjin Wu
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Weißschuh @ 2023-10-07 10:18 UTC (permalink / raw)
To: Willy Tarreau, Shuah Khan, Zhangjin Wu
Cc: linux-kselftest, linux-kernel, stable, Thomas Weißschuh
The test will not work for systems with pagesize != 4096 like aarch64
and some others.
Other testcases are already testing the same functionality:
* auxv_AT_UID tests getauxval() in general.
* test_getpagesize() tests pagesize() which directly calls
getauxval(AT_PAGESZ).
Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Note:
This should probably also make it into 6.6.
---
tools/testing/selftests/nolibc/nolibc-test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index a3ee4496bf0a..7e3936c182dc 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -630,7 +630,6 @@ int run_startup(int min, int max)
CASE_TEST(environ_HOME); EXPECT_PTRNZ(1, getenv("HOME")); break;
CASE_TEST(auxv_addr); EXPECT_PTRGT(test_auxv != (void *)-1, test_auxv, brk); break;
CASE_TEST(auxv_AT_UID); EXPECT_EQ(1, getauxval(AT_UID), getuid()); break;
- CASE_TEST(auxv_AT_PAGESZ); EXPECT_GE(1, getauxval(AT_PAGESZ), 4096); break;
case __LINE__:
return ret; /* must be last */
/* note: do not set any defaults so as to permit holes above */
---
base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8
change-id: 20231007-nolibc-auxval-pagesz-05f5ff79c4c4
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ)
2023-10-07 10:18 [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ) Thomas Weißschuh
@ 2023-10-07 10:36 ` Willy Tarreau
2023-10-07 10:45 ` Thomas Weißschuh
2023-10-07 13:42 ` [PATCH] " Zhangjin Wu
1 sibling, 1 reply; 5+ messages in thread
From: Willy Tarreau @ 2023-10-07 10:36 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Shuah Khan, Zhangjin Wu, linux-kselftest, linux-kernel, stable
On Sat, Oct 07, 2023 at 12:18:55PM +0200, Thomas Weißschuh wrote:
> The test will not work for systems with pagesize != 4096 like aarch64
> and some others.
>
> Other testcases are already testing the same functionality:
> * auxv_AT_UID tests getauxval() in general.
> * test_getpagesize() tests pagesize() which directly calls
> getauxval(AT_PAGESZ).
>
> Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
> Cc: stable@vger.kernel.org
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Note:
>
> This should probably also make it into 6.6.
Agreed, you should just push it to the fixes branch.
Thanks!
Willy
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ)
2023-10-07 10:36 ` Willy Tarreau
@ 2023-10-07 10:45 ` Thomas Weißschuh
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Weißschuh @ 2023-10-07 10:45 UTC (permalink / raw)
To: Willy Tarreau
Cc: Shuah Khan, Zhangjin Wu, linux-kselftest, linux-kernel, stable
On 2023-10-07 12:36:20+0200, Willy Tarreau wrote:
> On Sat, Oct 07, 2023 at 12:18:55PM +0200, Thomas Weißschuh wrote:
> > The test will not work for systems with pagesize != 4096 like aarch64
> > and some others.
> >
> > Other testcases are already testing the same functionality:
> > * auxv_AT_UID tests getauxval() in general.
> > * test_getpagesize() tests pagesize() which directly calls
> > getauxval(AT_PAGESZ).
> >
> > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> > Note:
> >
> > This should probably also make it into 6.6.
>
> Agreed, you should just push it to the fixes branch.
Good point.
'fixes' now contains Ammar's alignment fix, the tree location update and
this patch.
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Re: tools/nolibc: drop test for getauxval(AT_PAGESZ)
2023-10-07 10:18 [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ) Thomas Weißschuh
2023-10-07 10:36 ` Willy Tarreau
@ 2023-10-07 13:42 ` Zhangjin Wu
2023-10-07 14:53 ` Thomas Weißschuh
1 sibling, 1 reply; 5+ messages in thread
From: Zhangjin Wu @ 2023-10-07 13:42 UTC (permalink / raw)
To: linux; +Cc: falcon, linux-kernel, linux-kselftest, shuah, stable, w
Hi, Thomas
> The test will not work for systems with pagesize != 4096 like aarch64
> and some others.
>
We have used EXPECT_GE() instead of EXPECT_EQ(), so this should not
fail, do I miss something ?;-)
Thanks,
Zhangjin Wu
> Other testcases are already testing the same functionality:
> * auxv_AT_UID tests getauxval() in general.
> * test_getpagesize() tests pagesize() which directly calls
> getauxval(AT_PAGESZ).
>
> Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
> Cc: stable@vger.kernel.org
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Note:
>
> This should probably also make it into 6.6.
> ---
> tools/testing/selftests/nolibc/nolibc-test.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
> index a3ee4496bf0a..7e3936c182dc 100644
> --- a/tools/testing/selftests/nolibc/nolibc-test.c
> +++ b/tools/testing/selftests/nolibc/nolibc-test.c
> @@ -630,7 +630,6 @@ int run_startup(int min, int max)
> CASE_TEST(environ_HOME); EXPECT_PTRNZ(1, getenv("HOME")); break;
> CASE_TEST(auxv_addr); EXPECT_PTRGT(test_auxv != (void *)-1, test_auxv, brk); break;
> CASE_TEST(auxv_AT_UID); EXPECT_EQ(1, getauxval(AT_UID), getuid()); break;
> - CASE_TEST(auxv_AT_PAGESZ); EXPECT_GE(1, getauxval(AT_PAGESZ), 4096); break;
> case __LINE__:
> return ret; /* must be last */
> /* note: do not set any defaults so as to permit holes above */
>
> ---
> base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8
> change-id: 20231007-nolibc-auxval-pagesz-05f5ff79c4c4
>
> Best regards,
> --
> Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Re: tools/nolibc: drop test for getauxval(AT_PAGESZ)
2023-10-07 13:42 ` [PATCH] " Zhangjin Wu
@ 2023-10-07 14:53 ` Thomas Weißschuh
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Weißschuh @ 2023-10-07 14:53 UTC (permalink / raw)
To: Zhangjin Wu; +Cc: linux-kernel, linux-kselftest, shuah, stable, w
Hi Zhangjin,
On 2023-10-07 21:42:02+0800, Zhangjin Wu wrote:
> > The test will not work for systems with pagesize != 4096 like aarch64
> > and some others.
> >
>
> We have used EXPECT_GE() instead of EXPECT_EQ(), so this should not
> fail, do I miss something ?;-)
Indeed, I missed that, sorry for the noise.
IMO we can still remove the testcase, but drop it from the
fixes branch and adapt the commit message and Fixes tag.
> Thanks,
> Zhangjin Wu
>
> > Other testcases are already testing the same functionality:
> > * auxv_AT_UID tests getauxval() in general.
> > * test_getpagesize() tests pagesize() which directly calls
> > getauxval(AT_PAGESZ).
> >
> > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> [..]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-07 14:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-07 10:18 [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ) Thomas Weißschuh
2023-10-07 10:36 ` Willy Tarreau
2023-10-07 10:45 ` Thomas Weißschuh
2023-10-07 13:42 ` [PATCH] " Zhangjin Wu
2023-10-07 14:53 ` Thomas Weißschuh
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®