* [GIT PULL] nolibc changes for v6.13
[not found] <ba23217d-5eaf-4146-8ed7-27289cece364@t-8ch.de>
@ 2024-11-01 14:22 ` Thomas Weißschuh
2024-11-01 20:22 ` Paul E. McKenney
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Weißschuh @ 2024-11-01 14:22 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: Shuah Khan, Willy Tarreau, linux-kernel
(resend to add missing Cc: LKML)
Hi Paul,
The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
----------------------------------------------------------------
nolibc changes for 6.13
Changes
-------
* Fix potential error due to missing #include on s390
* Compatibility with -Wmissing-fallthrough
* Run qemu with more memory during tests
----------------------------------------------------------------
Thomas Weißschuh (3):
tools/nolibc: s390: include std.h
tools/nolibc: compiler: add macro __nolibc_fallthrough
selftests/nolibc: start qemu with 1 GiB of memory
tools/include/nolibc/arch-s390.h | 1 +
tools/include/nolibc/compiler.h | 6 ++++++
tools/include/nolibc/stdio.h | 3 ++-
tools/testing/selftests/nolibc/Makefile | 4 ++--
4 files changed, 11 insertions(+), 3 deletions(-)
Test report:
$ ./run-tests.sh
i386: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
x86_64: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
arm64: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
arm: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
mips32le: 195 test(s): 194 passed, 1 skipped, 0 failed => status: warning
mips32be: 195 test(s): 194 passed, 1 skipped, 0 failed => status: warning
ppc: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
ppc64: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
ppc64le: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
riscv: 195 test(s): 195 passed, 0 skipped, 0 failed => status: success
s390: 195 test(s): 194 passed, 1 skipped, 0 failed => status: warning
loongarch: 195 test(s): 194 passed, 1 skipped, 0 failed => status: warning
$ ./run-tests.sh -m user
i386: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
x86_64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
arm64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
arm: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
mips32le: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
mips32be: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
ppc64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
ppc64le: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
riscv: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
s390: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
loongarch: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
$ ./run-tests.sh -m user -l
i386: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
x86_64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
arm64: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
arm: 195 test(s): 193 passed, 2 skipped, 0 failed => status: warning
mips32le: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
mips32be: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc64: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
ppc64le: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
riscv: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
s390: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
loongarch: 195 test(s): 192 passed, 3 skipped, 0 failed => status: warning
Thanks,
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-01 14:22 ` [GIT PULL] nolibc changes for v6.13 Thomas Weißschuh
@ 2024-11-01 20:22 ` Paul E. McKenney
2024-11-01 21:23 ` Thomas Weißschuh
0 siblings, 1 reply; 9+ messages in thread
From: Paul E. McKenney @ 2024-11-01 20:22 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: Shuah Khan, Willy Tarreau, linux-kernel
On Fri, Nov 01, 2024 at 02:22:13PM +0000, Thomas Weißschuh wrote:
> (resend to add missing Cc: LKML)
>
>
> Hi Paul,
>
> The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
>
> Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
>
> are available in the Git repository at:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
>
> for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
>
> selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
Thank you! I have pulled this into -rcu at signed tag nolibc.2024.11.01a,
which copies from your signed tag.
The usual "make run" and "make user" worked fine, but "make libc-test"
gave me the build errors shown below. Is there some setup step that
I omitted? Or is this not really a necessary test?
Thanx, Paul
------------------------------------------------------------------------
CC libc-test
nolibc-test.c: In function ‘run_syscall’:
nolibc-test.c:1083:63: warning: argument 1 null where non-null expected [-Wnonnull]
1083 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
| ^~~~
nolibc-test.c:358:77: note: in definition of macro ‘EXPECT_SYSER2’
358 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
| ^~~~
nolibc-test.c:1083:47: note: in expansion of macro ‘EXPECT_SYSER’
1083 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
| ^~~~~~~~~~~~
In file included from nolibc-test.c:26:
/usr/include/x86_64-linux-gnu/sys/stat.h:205:12: note: in a call to function ‘stat’ declared ‘nonnull’
205 | extern int stat (const char *__restrict __file,
| ^~~~
nolibc-test.c: In function ‘run_stdlib’:
nolibc-test.c:1137:75: warning: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Wimplicit-function-declaration]
1137 | CASE_TEST(strlcat_0); EXPECT_STRBUFEQ(is_nolibc, strlcat(buf, "bar", 0), buf, 3, "test"); break;
| ^~~~~~~
nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
613 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
| ^~~~
nolibc-test.c:1143:75: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
1143 | CASE_TEST(strlcpy_0); EXPECT_STRBUFEQ(is_nolibc, strlcpy(buf, "bar", 0), buf, 3, "test"); break;
| ^~~~~~~
nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
613 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
| ^~~~
nolibc-test.c: In function ‘run_syscall’:
nolibc-test.c:358:62: warning: argument 1 is null but the corresponding size argument 2 value is 1 [-Wnonnull]
358 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nolibc-test.c:361:9: note: in expansion of macro ‘EXPECT_SYSER2’
361 | EXPECT_SYSER2(cond, expr, expret, experr, 0)
| ^~~~~~~~~~~~~
nolibc-test.c:1073:47: note: in expansion of macro ‘EXPECT_SYSER’
1073 | CASE_TEST(poll_fault); EXPECT_SYSER(1, poll(NULL, 1, 0), -1, EFAULT); break;
| ^~~~~~~~~~~~
In file included from /usr/include/poll.h:1,
from nolibc-test.c:35:
/usr/include/x86_64-linux-gnu/sys/poll.h:54:12: note: in a call to function ‘poll’ declared with attribute ‘access (write_only, 1, 2)’
54 | extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
| ^~~~
/usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
nolibc-test.c:(.text+0x44f9): undefined reference to `strlcat'
/usr/bin/ld: nolibc-test.c:(.text+0x4580): undefined reference to `strlcat'
/usr/bin/ld: nolibc-test.c:(.text+0x4607): undefined reference to `strlcat'
/usr/bin/ld: nolibc-test.c:(.text+0x468e): undefined reference to `strlcat'
/usr/bin/ld: nolibc-test.c:(.text+0x4715): undefined reference to `strlcat'
/usr/bin/ld: /tmp/ccvUtmw4.o:nolibc-test.c:(.text+0x479c): more undefined references to `strlcat' follow
/usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
nolibc-test.c:(.text+0x4823): undefined reference to `strlcpy'
/usr/bin/ld: nolibc-test.c:(.text+0x48aa): undefined reference to `strlcpy'
/usr/bin/ld: nolibc-test.c:(.text+0x4931): undefined reference to `strlcpy'
/usr/bin/ld: nolibc-test.c:(.text+0x49b8): undefined reference to `strlcpy'
/usr/bin/ld: nolibc-test.c:(.text+0x4a3f): undefined reference to `strlcpy'
collect2: error: ld returned 1 exit status
make: *** [Makefile:230: libc-test] Error 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-01 20:22 ` Paul E. McKenney
@ 2024-11-01 21:23 ` Thomas Weißschuh
2024-11-01 21:33 ` Willy Tarreau
2024-11-01 22:04 ` Paul E. McKenney
0 siblings, 2 replies; 9+ messages in thread
From: Thomas Weißschuh @ 2024-11-01 21:23 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: Shuah Khan, Willy Tarreau, linux-kernel
Hi Paul,
On 2024-11-01 13:22:17-0700, Paul E. McKenney wrote:
> On Fri, Nov 01, 2024 at 02:22:13PM +0000, Thomas Weißschuh wrote:
> > (resend to add missing Cc: LKML)
> >
> >
> > Hi Paul,
> >
> > The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
> >
> > Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
> >
> > are available in the Git repository at:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
> >
> > for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
> >
> > selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
>
> Thank you! I have pulled this into -rcu at signed tag nolibc.2024.11.01a,
> which copies from your signed tag.
Thanks!
> The usual "make run" and "make user" worked fine, but "make libc-test"
> gave me the build errors shown below. Is there some setup step that
> I omitted? Or is this not really a necessary test?
That test does not actually test nolibc but the nolibc test suite.
It uses your system libc and makes sure that the nolibc test
expectations match the behaviour of a "real" libc.
The missing strlcat() function was added to glibc only in 2.38, so I
guess you have an older version.
On my glibc 2.40 "make libc-test" works and the test itself succeeds.
I'll see if there is a reasonable to make libc-test work on older glibc.
But it shouldn't impact this cycle.
For better architecture coverage I would recommend ./run-tests.sh over
"make run/user". Speaking about this I remember the discussion from the
6.12 PR where Willy proposed an improved run-tests.sh error message.
It seems he didn't push it as a commit, so let's add keep it in mind for
next cycle.
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> CC libc-test
> nolibc-test.c: In function ‘run_syscall’:
> nolibc-test.c:1083:63: warning: argument 1 null where non-null expected [-Wnonnull]
> 1083 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
> | ^~~~
> nolibc-test.c:358:77: note: in definition of macro ‘EXPECT_SYSER2’
> 358 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
> | ^~~~
> nolibc-test.c:1083:47: note: in expansion of macro ‘EXPECT_SYSER’
> 1083 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
> | ^~~~~~~~~~~~
> In file included from nolibc-test.c:26:
> /usr/include/x86_64-linux-gnu/sys/stat.h:205:12: note: in a call to function ‘stat’ declared ‘nonnull’
> 205 | extern int stat (const char *__restrict __file,
> | ^~~~
> nolibc-test.c: In function ‘run_stdlib’:
> nolibc-test.c:1137:75: warning: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Wimplicit-function-declaration]
> 1137 | CASE_TEST(strlcat_0); EXPECT_STRBUFEQ(is_nolibc, strlcat(buf, "bar", 0), buf, 3, "test"); break;
> | ^~~~~~~
> nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
> 613 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
> | ^~~~
> nolibc-test.c:1143:75: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
> 1143 | CASE_TEST(strlcpy_0); EXPECT_STRBUFEQ(is_nolibc, strlcpy(buf, "bar", 0), buf, 3, "test"); break;
> | ^~~~~~~
> nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
> 613 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
> | ^~~~
> nolibc-test.c: In function ‘run_syscall’:
> nolibc-test.c:358:62: warning: argument 1 is null but the corresponding size argument 2 value is 1 [-Wnonnull]
> 358 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> nolibc-test.c:361:9: note: in expansion of macro ‘EXPECT_SYSER2’
> 361 | EXPECT_SYSER2(cond, expr, expret, experr, 0)
> | ^~~~~~~~~~~~~
> nolibc-test.c:1073:47: note: in expansion of macro ‘EXPECT_SYSER’
> 1073 | CASE_TEST(poll_fault); EXPECT_SYSER(1, poll(NULL, 1, 0), -1, EFAULT); break;
> | ^~~~~~~~~~~~
> In file included from /usr/include/poll.h:1,
> from nolibc-test.c:35:
> /usr/include/x86_64-linux-gnu/sys/poll.h:54:12: note: in a call to function ‘poll’ declared with attribute ‘access (write_only, 1, 2)’
> 54 | extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
> | ^~~~
> /usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
> nolibc-test.c:(.text+0x44f9): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x4580): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x4607): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x468e): undefined reference to `strlcat'
> /usr/bin/ld: nolibc-test.c:(.text+0x4715): undefined reference to `strlcat'
> /usr/bin/ld: /tmp/ccvUtmw4.o:nolibc-test.c:(.text+0x479c): more undefined references to `strlcat' follow
> /usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
> nolibc-test.c:(.text+0x4823): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x48aa): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x4931): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x49b8): undefined reference to `strlcpy'
> /usr/bin/ld: nolibc-test.c:(.text+0x4a3f): undefined reference to `strlcpy'
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:230: libc-test] Error 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-01 21:23 ` Thomas Weißschuh
@ 2024-11-01 21:33 ` Willy Tarreau
2024-11-01 21:40 ` Thomas Weißschuh
2024-11-01 22:04 ` Paul E. McKenney
1 sibling, 1 reply; 9+ messages in thread
From: Willy Tarreau @ 2024-11-01 21:33 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: Paul E. McKenney, Shuah Khan, linux-kernel
Hi Thomas, hi Paul,
On Fri, Nov 01, 2024 at 09:23:48PM +0000, Thomas Weißschuh wrote:
> Hi Paul,
>
> On 2024-11-01 13:22:17-0700, Paul E. McKenney wrote:
> > On Fri, Nov 01, 2024 at 02:22:13PM +0000, Thomas Weißschuh wrote:
> > > (resend to add missing Cc: LKML)
> > >
> > >
> > > Hi Paul,
> > >
> > > The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
> > >
> > > Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
> > >
> > > are available in the Git repository at:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
> > >
> > > for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
> > >
> > > selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
> >
> > Thank you! I have pulled this into -rcu at signed tag nolibc.2024.11.01a,
> > which copies from your signed tag.
>
> Thanks!
>
> > The usual "make run" and "make user" worked fine, but "make libc-test"
> > gave me the build errors shown below. Is there some setup step that
> > I omitted? Or is this not really a necessary test?
>
> That test does not actually test nolibc but the nolibc test suite.
> It uses your system libc and makes sure that the nolibc test
> expectations match the behaviour of a "real" libc.
> The missing strlcat() function was added to glibc only in 2.38, so I
> guess you have an older version.
> On my glibc 2.40 "make libc-test" works and the test itself succeeds.
>
> I'll see if there is a reasonable to make libc-test work on older glibc.
> But it shouldn't impact this cycle.
Maybe we could just enclose the test with:
#if !defined(__GLIBC__) || __GLIBC__ > 2 || __GLIBC_MINOR__ >= 40
...
#endif
The real libc test is indeed not critical but it's important that we try
to keep it working reasonably well over the long term as it reminds us
not to diverge too much.
> For better architecture coverage I would recommend ./run-tests.sh over
> "make run/user". Speaking about this I remember the discussion from the
> 6.12 PR where Willy proposed an improved run-tests.sh error message.
> It seems he didn't push it as a commit, so let's add keep it in mind for
> next cycle.
Oups, I vaguely remember proposing a trivial patch in an e-mail a while
ago but I don't even remember what it was about. My mind is totally taken
by the upcoming haproxy release these days :-/
Cheers,
Willy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-01 21:33 ` Willy Tarreau
@ 2024-11-01 21:40 ` Thomas Weißschuh
2024-11-01 22:01 ` Willy Tarreau
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Weißschuh @ 2024-11-01 21:40 UTC (permalink / raw)
To: Willy Tarreau; +Cc: Paul E. McKenney, Shuah Khan, linux-kernel
Hi Willy,
On 2024-11-01 22:33:14+0100, Willy Tarreau wrote:
> On Fri, Nov 01, 2024 at 09:23:48PM +0000, Thomas Weißschuh wrote:
> > Hi Paul,
> >
> > On 2024-11-01 13:22:17-0700, Paul E. McKenney wrote:
> > > On Fri, Nov 01, 2024 at 02:22:13PM +0000, Thomas Weißschuh wrote:
> > > > (resend to add missing Cc: LKML)
> > > >
> > > >
> > > > Hi Paul,
> > > >
> > > > The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
> > > >
> > > > Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
> > > >
> > > > for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
> > > >
> > > > selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
> > >
> > > Thank you! I have pulled this into -rcu at signed tag nolibc.2024.11.01a,
> > > which copies from your signed tag.
> >
> > Thanks!
> >
> > > The usual "make run" and "make user" worked fine, but "make libc-test"
> > > gave me the build errors shown below. Is there some setup step that
> > > I omitted? Or is this not really a necessary test?
> >
> > That test does not actually test nolibc but the nolibc test suite.
> > It uses your system libc and makes sure that the nolibc test
> > expectations match the behaviour of a "real" libc.
> > The missing strlcat() function was added to glibc only in 2.38, so I
> > guess you have an older version.
> > On my glibc 2.40 "make libc-test" works and the test itself succeeds.
> >
> > I'll see if there is a reasonable to make libc-test work on older glibc.
> > But it shouldn't impact this cycle.
>
> Maybe we could just enclose the test with:
>
> #if !defined(__GLIBC__) || __GLIBC__ > 2 || __GLIBC_MINOR__ >= 40
> ...
> #endif
This will mess up the test case numbers.
The test is actually only running on nolibc anyways, so we could also
stub out strlcat() with a dummy inline function.
> The real libc test is indeed not critical but it's important that we try
> to keep it working reasonably well over the long term as it reminds us
> not to diverge too much.
Agreed.
> > For better architecture coverage I would recommend ./run-tests.sh over
> > "make run/user". Speaking about this I remember the discussion from the
> > 6.12 PR where Willy proposed an improved run-tests.sh error message.
> > It seems he didn't push it as a commit, so let's add keep it in mind for
> > next cycle.
>
> Oups, I vaguely remember proposing a trivial patch in an e-mail a while
> ago but I don't even remember what it was about. My mind is totally taken
> by the upcoming haproxy release these days :-/
It's at https://lore.kernel.org/lkml/ZtlQbpgpn9OQOPyI@1wt.eu/
No worries, I'll pick it up after 6.13-rc1.
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-01 21:40 ` Thomas Weißschuh
@ 2024-11-01 22:01 ` Willy Tarreau
0 siblings, 0 replies; 9+ messages in thread
From: Willy Tarreau @ 2024-11-01 22:01 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: Paul E. McKenney, Shuah Khan, linux-kernel
On Fri, Nov 01, 2024 at 09:40:34PM +0000, Thomas Weißschuh wrote:
> > Maybe we could just enclose the test with:
> >
> > #if !defined(__GLIBC__) || __GLIBC__ > 2 || __GLIBC_MINOR__ >= 40
> > ...
> > #endif
>
> This will mess up the test case numbers.
> The test is actually only running on nolibc anyways, so we could also
> stub out strlcat() with a dummy inline function.
OK.
> > > For better architecture coverage I would recommend ./run-tests.sh over
> > > "make run/user". Speaking about this I remember the discussion from the
> > > 6.12 PR where Willy proposed an improved run-tests.sh error message.
> > > It seems he didn't push it as a commit, so let's add keep it in mind for
> > > next cycle.
> >
> > Oups, I vaguely remember proposing a trivial patch in an e-mail a while
> > ago but I don't even remember what it was about. My mind is totally taken
> > by the upcoming haproxy release these days :-/
>
> It's at https://lore.kernel.org/lkml/ZtlQbpgpn9OQOPyI@1wt.eu/
> No worries, I'll pick it up after 6.13-rc1.
Ah, I found it, it reminded me something, because usually I forget about
patches once I commit them! I had pushed it to the next branch by then:
commit 6fc1d365c7394790cf7073a4acfcbf7fe4e8eff9 (HEAD -> 20240908-nolibc-next, korg-nolibc-git/next)
Author: Willy Tarreau <w@1wt.eu>
Date: Sun Sep 8 12:00:12 2024 +0200
selftests/nolibc: run-tests.sh: detect missing toolchain
The script tries to resolve the path to the current toolchain using
realpath, which fails in case it's not installed, and since it's run
under -e, it doesn't have the opportunity to display a help message.
Let's detect the absence of the required toolchain before running that
command and provide a friendlier message when this happens.
Link: https://lore.kernel.org/all/ZtlQbpgpn9OQOPyI@1wt.eu/
Signed-off-by: Willy Tarreau <w@1wt.eu>
Seems like we messed up with a forced push to next at some point :-)
I rebased it on the current next and pushed it again:
648da1b274cf85fff5fe60914ae6a402013f456c
Cheers,
Willy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-01 21:23 ` Thomas Weißschuh
2024-11-01 21:33 ` Willy Tarreau
@ 2024-11-01 22:04 ` Paul E. McKenney
1 sibling, 0 replies; 9+ messages in thread
From: Paul E. McKenney @ 2024-11-01 22:04 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: Shuah Khan, Willy Tarreau, linux-kernel
On Fri, Nov 01, 2024 at 09:23:48PM +0000, Thomas Weißschuh wrote:
> Hi Paul,
>
> On 2024-11-01 13:22:17-0700, Paul E. McKenney wrote:
> > On Fri, Nov 01, 2024 at 02:22:13PM +0000, Thomas Weißschuh wrote:
> > > (resend to add missing Cc: LKML)
> > >
> > >
> > > Hi Paul,
> > >
> > > The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
> > >
> > > Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
> > >
> > > are available in the Git repository at:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git tags/nolibc-20241101-for-6.13-1
> > >
> > > for you to fetch changes up to ad0558f3883130954ca724697f2d19aef93967b3:
> > >
> > > selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
> >
> > Thank you! I have pulled this into -rcu at signed tag nolibc.2024.11.01a,
> > which copies from your signed tag.
>
> Thanks!
>
> > The usual "make run" and "make user" worked fine, but "make libc-test"
> > gave me the build errors shown below. Is there some setup step that
> > I omitted? Or is this not really a necessary test?
>
> That test does not actually test nolibc but the nolibc test suite.
> It uses your system libc and makes sure that the nolibc test
> expectations match the behaviour of a "real" libc.
> The missing strlcat() function was added to glibc only in 2.38, so I
> guess you have an older version.
> On my glibc 2.40 "make libc-test" works and the test itself succeeds.
>
> I'll see if there is a reasonable to make libc-test work on older glibc.
> But it shouldn't impact this cycle.
I expect I will be upgrading at some point, so this might not be worth
worrying about unless others are also running into it.
> For better architecture coverage I would recommend ./run-tests.sh over
> "make run/user". Speaking about this I remember the discussion from the
> 6.12 PR where Willy proposed an improved run-tests.sh error message.
> It seems he didn't push it as a commit, so let's add keep it in mind for
> next cycle.
Makes sense to me!
Thanx, Paul
> > ------------------------------------------------------------------------
> >
> > CC libc-test
> > nolibc-test.c: In function ‘run_syscall’:
> > nolibc-test.c:1083:63: warning: argument 1 null where non-null expected [-Wnonnull]
> > 1083 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
> > | ^~~~
> > nolibc-test.c:358:77: note: in definition of macro ‘EXPECT_SYSER2’
> > 358 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
> > | ^~~~
> > nolibc-test.c:1083:47: note: in expansion of macro ‘EXPECT_SYSER’
> > 1083 | CASE_TEST(stat_fault); EXPECT_SYSER(1, stat(NULL, &stat_buf), -1, EFAULT); break;
> > | ^~~~~~~~~~~~
> > In file included from nolibc-test.c:26:
> > /usr/include/x86_64-linux-gnu/sys/stat.h:205:12: note: in a call to function ‘stat’ declared ‘nonnull’
> > 205 | extern int stat (const char *__restrict __file,
> > | ^~~~
> > nolibc-test.c: In function ‘run_stdlib’:
> > nolibc-test.c:1137:75: warning: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Wimplicit-function-declaration]
> > 1137 | CASE_TEST(strlcat_0); EXPECT_STRBUFEQ(is_nolibc, strlcat(buf, "bar", 0), buf, 3, "test"); break;
> > | ^~~~~~~
> > nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
> > 613 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
> > | ^~~~
> > nolibc-test.c:1143:75: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
> > 1143 | CASE_TEST(strlcpy_0); EXPECT_STRBUFEQ(is_nolibc, strlcpy(buf, "bar", 0), buf, 3, "test"); break;
> > | ^~~~~~~
> > nolibc-test.c:613:80: note: in definition of macro ‘EXPECT_STRBUFEQ’
> > 613 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_str_buf_eq(expr, buf, val, llen, cmp); } while (0)
> > | ^~~~
> > nolibc-test.c: In function ‘run_syscall’:
> > nolibc-test.c:358:62: warning: argument 1 is null but the corresponding size argument 2 value is 1 [-Wnonnull]
> > 358 | do { if (!(cond)) result(llen, SKIPPED); else ret += expect_syserr2(expr, expret, experr1, experr2, llen); } while (0)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > nolibc-test.c:361:9: note: in expansion of macro ‘EXPECT_SYSER2’
> > 361 | EXPECT_SYSER2(cond, expr, expret, experr, 0)
> > | ^~~~~~~~~~~~~
> > nolibc-test.c:1073:47: note: in expansion of macro ‘EXPECT_SYSER’
> > 1073 | CASE_TEST(poll_fault); EXPECT_SYSER(1, poll(NULL, 1, 0), -1, EFAULT); break;
> > | ^~~~~~~~~~~~
> > In file included from /usr/include/poll.h:1,
> > from nolibc-test.c:35:
> > /usr/include/x86_64-linux-gnu/sys/poll.h:54:12: note: in a call to function ‘poll’ declared with attribute ‘access (write_only, 1, 2)’
> > 54 | extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
> > | ^~~~
> > /usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
> > nolibc-test.c:(.text+0x44f9): undefined reference to `strlcat'
> > /usr/bin/ld: nolibc-test.c:(.text+0x4580): undefined reference to `strlcat'
> > /usr/bin/ld: nolibc-test.c:(.text+0x4607): undefined reference to `strlcat'
> > /usr/bin/ld: nolibc-test.c:(.text+0x468e): undefined reference to `strlcat'
> > /usr/bin/ld: nolibc-test.c:(.text+0x4715): undefined reference to `strlcat'
> > /usr/bin/ld: /tmp/ccvUtmw4.o:nolibc-test.c:(.text+0x479c): more undefined references to `strlcat' follow
> > /usr/bin/ld: /tmp/ccvUtmw4.o: in function `run_stdlib':
> > nolibc-test.c:(.text+0x4823): undefined reference to `strlcpy'
> > /usr/bin/ld: nolibc-test.c:(.text+0x48aa): undefined reference to `strlcpy'
> > /usr/bin/ld: nolibc-test.c:(.text+0x4931): undefined reference to `strlcpy'
> > /usr/bin/ld: nolibc-test.c:(.text+0x49b8): undefined reference to `strlcpy'
> > /usr/bin/ld: nolibc-test.c:(.text+0x4a3f): undefined reference to `strlcpy'
> > collect2: error: ld returned 1 exit status
> > make: *** [Makefile:230: libc-test] Error 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [GIT PULL] nolibc changes for v6.13
@ 2024-11-17 18:40 Paul E. McKenney
2024-11-19 19:06 ` pr-tracker-bot
0 siblings, 1 reply; 9+ messages in thread
From: Paul E. McKenney @ 2024-11-17 18:40 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, kernel-team, w, linux, skhan
Hello, Linus,
Once the v6.13 merge window opens, please pull the latest nolibc
changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/nolibc.2024.11.01a
# HEAD: ad0558f3883130954ca724697f2d19aef93967b3: selftests/nolibc: start qemu with 1 GiB of memory (2024-10-07 21:57:45 +0200)
----------------------------------------------------------------
nolibc changes for 6.13
Changes
-------
* Fix potential error due to missing #include on s390
* Compatibility with -Wmissing-fallthrough
* Run qemu with more memory during tests
----------------------------------------------------------------
Thomas Weißschuh (3):
tools/nolibc: s390: include std.h
tools/nolibc: compiler: add macro __nolibc_fallthrough
selftests/nolibc: start qemu with 1 GiB of memory
tools/include/nolibc/arch-s390.h | 1 +
tools/include/nolibc/compiler.h | 6 ++++++
tools/include/nolibc/stdio.h | 3 ++-
tools/testing/selftests/nolibc/Makefile | 4 ++--
4 files changed, 11 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GIT PULL] nolibc changes for v6.13
2024-11-17 18:40 Paul E. McKenney
@ 2024-11-19 19:06 ` pr-tracker-bot
0 siblings, 0 replies; 9+ messages in thread
From: pr-tracker-bot @ 2024-11-19 19:06 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: torvalds, linux-kernel, kernel-team, w, linux, skhan
The pull request you sent on Sun, 17 Nov 2024 10:40:50 -0800:
> git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/nolibc.2024.11.01a
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/26c9fdd6f3a4ab6c49500b6bb0fdd0a87c63932d
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-11-19 19:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ba23217d-5eaf-4146-8ed7-27289cece364@t-8ch.de>
2024-11-01 14:22 ` [GIT PULL] nolibc changes for v6.13 Thomas Weißschuh
2024-11-01 20:22 ` Paul E. McKenney
2024-11-01 21:23 ` Thomas Weißschuh
2024-11-01 21:33 ` Willy Tarreau
2024-11-01 21:40 ` Thomas Weißschuh
2024-11-01 22:01 ` Willy Tarreau
2024-11-01 22:04 ` Paul E. McKenney
2024-11-17 18:40 Paul E. McKenney
2024-11-19 19:06 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox