Re: [GIT PULL] nolibc for 6.11-rc1

From: Thomas Weißschuh
Date: Mon Jul 15 2024 - 03:01:15 EST


On 2024-07-14 09:44:55+0000, Paul E. McKenney wrote:
> On Sun, Jul 14, 2024 at 10:09:13AM +0200, Thomas Weißschuh wrote:
> > On 2024-07-12 20:16:13+0000, Paul E. McKenney wrote:
> > > On Sun, Jun 30, 2024 at 09:06:39AM -0700, Paul E. McKenney wrote:
> > > > On Sat, Jun 29, 2024 at 01:04:08PM +0200, Thomas Weißschuh wrote:
> > > > > Hi Paul,
> > > > >
> > > > > The following changes since commit f2661062f16b2de5d7b6a5c42a9a5c96326b8454:
> > > > >
> > > > > Linux 6.10-rc5 (2024-06-23 17:08:54 -0400)
> > > > >
> > > > > are available in the Git repository at:
> > > > >
> > > > > https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20240629-for-6.11-1
> > > > >
> > > > > for you to fetch changes up to 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b:
> > > > >
> > > > > selftests: kselftest: also use strerror() on nolibc (2024-06-29 09:44:58 +0200)
> > > >
> > > > Hearing no objections, I have pulled this in so that it will appear
> > > > in the next -next. Here are the test results:
> > > >
> > > > make run:
> > > > 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
> > > >
> > > > make run-user:
> > > > 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
> > > >
> > > > So looks good to me!
> >
> > For testing you can use "./run-tests.sh -m [user | system]" to run the
> > tests on all supported architectures via QEMU.
> >
> > (On the first run you can use "-p" to download the toolchains)
>
> Thank you for the info!
>
> My near-term plan is that I do a smoke test on x86 (or whatever I am
> running), and let you guys cover the various architectures. Longer
> term, I might get more into cross-architecture work.

I'll try to remember to add the full testreport for future
pullrequests, too.

> > > And please see below for my proposed signed tag. Please let me know of
> > > any needed adjustments.
> > >
> > > Thanx, Paul
> > >
> > > ----------------------------------------------------------------
> > >
> > > tag nolibc.2024.07.12a
> > > Tagger: Paul E. McKenney <paulmck@xxxxxxxxxx>
> > > Date: Fri Jul 12 16:56:21 2024 -0700
> > >
> > > nolibc updates for v6.11
> > >
> > > o Fix selftest printf format mismatch in expect_str_buf_eq()
> >
> > Period at the end.
>
> Good eyes, thank you, fixed.
>
> > > o Stop using brk() and sbrk() when testing against musl, which
> > > implements these two functions with ENOMEM.
> > >
> > > o Make tests us -Werror to force failure on compiler warnings.
> > >
> > > o Add limits for the {u,}intmax_t, ulong and {u,}llong types.
> > >
> > > o Implement strtol() and friends.
> > >
> > > o Add facility to skip nolibc-specific tests when running against
> > > non-nolibc libraries.
> > >
> > > o Implement strerror().
> > >
> > > o Use strerror() unconditionally, instead of only when running
> > > against non-nolibc libraries.
> >
> > Maybe mention that this is about kselftest and not nolibc itself.
> >
> > Otherwise looks good, thanks!
>
> Thank you for looking this over, and does the updated version below
> cover this? If I am still off, please suggest updates.
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> tag nolibc.2024.07.14a
> Tagger: Paul E. McKenney <paulmck@xxxxxxxxxx>
> Date: Sun Jul 14 09:07:29 2024 -0700
>
> nolibc updates for v6.11
>
> o Fix selftest printf format mismatch in expect_str_buf_eq().
>
> o Stop using brk() and sbrk() when testing against musl, which
> implements these two functions with ENOMEM.
>
> o Make tests use -Werror to force failure on compiler warnings.
>
> o Add limits for the {u,}intmax_t, ulong and {u,}llong types.
>
> o Implement strtol() and friends.
>
> o Add facility to skip nolibc-specific tests when running against
> non-nolibc libraries.
>
> o Implement strerror().
>
> o Use strerror() unconditionally, instead of only when running
> kselftest.

"Also use strerror() on nolibc when running kselftests."

> -----BEGIN PGP SIGNATURE-----
>
> iQJHBAABCgAxFiEEbK7UrM+RBIrCoViJnr8S83LZ+4wFAmaT98oTHHBhdWxtY2tA
> a2VybmVsLm9yZwAKCRCevxLzctn7jHc0D/9chhJo+QQ+2V+xQEKT8n1MKiJaf55X
> EUhIlKHoejrF7rZukqv1tcqMNP0wGzwKyttbFkX+72OHrxSuNr0MbvBjQi6cFcFo
> 2QNg/ZEVIZKeMJzRXwUOOrg47hwLoGgFrt5cgSCMeYSm0E25oAx752/WbmQgQBlU
> 2dOTomrxF7pyDQoJwPU3CNAk/fFZHuBX9Hjp0LPaXmKDq9BLWqUWoJZAOAfcxm2Q
> F8A/HnOTEp5F5qwJLr0GStNxR44xH/GU/3KEdryzllEFj6PTLDAeP4oNdMK30q9F
> YGrcpON3hjw1+XKQBTLJ/UIqQ3EeA/bo2yDOLsFZObU7aKrb7ewtxTq/DWUfoj4x
> jfFCOc6JpsmAAlwm2zXn+MLDLxSF3QhTalpl1o4thrNgxhm/Eou+uz/1k2EREp/r
> 4PfHC+i0YjGA9sJ12u1hUoPkxHXY0GKx+gHL9uwB5C2je7HyStzBRvDWEjUJw+uI
> Z9+RkvSQFV82tIvczGzGuLkMM1of+M+VROGeDXyP9tzyjD3GrqDwwdcXFz/dVnhF
> ktFiQeoMlfDcSjbcXztRaD4eRSM/EzK6aNL7eocK+s9EWn10Xvg6c+7IeYxMgy32
> w9Q9WRFN/Gzmeawb0rNNiYdhEq/ufBpfN1+Un4XrpqPukydbv2JpaiG/VZBzldkw
> UMepC/mpRx8HPw==
> =yaww
> -----END PGP SIGNATURE-----
>
> commit 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b
> Author: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> Date: Fri Apr 26 13:08:58 2024 +0200
>
> selftests: kselftest: also use strerror() on nolibc
>
> nolibc gained an implementation of strerror() recently.
> Use it and drop the ifdeffery.
>
> Acked-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
>
> diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
> index 76c2a6945d3e..b8967b6e29d5 100644
> --- a/tools/testing/selftests/kselftest.h
> +++ b/tools/testing/selftests/kselftest.h
> @@ -168,15 +168,7 @@ static inline __printf(1, 2) void ksft_print_msg(const char *msg, ...)
>
> static inline void ksft_perror(const char *msg)
> {
> -#ifndef NOLIBC
> ksft_print_msg("%s: %s (%d)\n", msg, strerror(errno), errno);
> -#else
> - /*
> - * nolibc doesn't provide strerror() and it seems
> - * inappropriate to add one, just print the errno.
> - */
> - ksft_print_msg("%s: %d)\n", msg, errno);
> -#endif
> }
>
> static inline __printf(1, 2) void ksft_test_result_pass(const char *msg, ...)