Hi Shuah,
Could you Ack the patch below to kselftest.h?
Thanks,
Thomas
On 2024-04-26 13:08:58+, Thomas Weißschuh wrote:
> nolibc gained an implementation of strerror() recently.
> Use it and drop the ifdeffery.
>
> Signed-off-by: Thomas Weißschuh
> ---
> tools
Hi Edward,
On 2024-05-10 00:06:54+, Edward Liaw wrote:
> _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
> redefinition warnings.
The nolibc tests do not use lib.mk.
This change breaks "make libc-test", please drop it.
> Signed-off-by: Edward Liaw
> ---
>
Hi Shuah,
On 2024-04-26 13:08:55+, Thomas Weißschuh wrote:
> Adds a simple implementation of strerror() and makes use of it in
> kselftests.
>
> Shuah, could you Ack patch 3?
Friendly ping for an Ack of patch 3 of this series.
After that I'd like to submit an updated nolibc
strerror() is commonly used.
For example in kselftest which currently needs to do an #ifdef NOLIBC to
handle the lack of strerror().
Keep it simple and reuse the output format of perror() for strerror().
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdio.h | 10
Adds a simple implementation of strerror() and makes use of it in
kselftests.
Shuah, could you Ack patch 3?
Willy, this should work *without* your Ack.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
selftests/nolibc: introduce condition to run tests only on nolibc
tools
Some tests only make sense on nolibc. To avoid gaps in the test numbers
do to inline "#ifdef NOLIBC", add a condition to formally skip these
tests.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 32 +---
1 file changed, 19
nolibc gained an implementation of strerror() recently.
Use it and drop the ifdeffery.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest.h | 8
1 file changed, 8 deletions(-)
diff --git a/tools/testing/selftests/kselftest.h
b/tools/testing/selftests/kselftest.h
On 2024-04-25 18:30:39+, Willy Tarreau wrote:
> Hi again Thomas,
>
> On Thu, Apr 25, 2024 at 06:09:25PM +0200, Thomas Weißschuh wrote:
> > I wanted to implement sscanf() for ksft_min_kernel_version() and this is
> > a prerequisite for it.
> >
> > It's also
They are useful for users and necessary for strtol() and friends.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdint.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/include/nolibc/stdint.h b/tools/include/nolibc/stdint.h
index 6665e272e213
The implementation always works on uintmax_t values.
This is inefficient when only 32bit are needed.
However for all functions this only happens for strtol() on 32bit
platforms.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdlib.h| 109
I wanted to implement sscanf() for ksft_min_kernel_version() and this is
a prerequisite for it.
It's also useful on its own so it gets its own submission.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (2):
tools/nolibc: add limits for {u,}intmax_t, ulong and {u,}llong
tools
On musl calls to brk() and sbrk() always fail with ENOMEM.
Detect this and skip the tests on musl.
Tested on glibc 2.39 and musl 1.2.5 in addition to nolibc.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 10 +++---
1 file changed, 7 insertions(+), 3
run-tests.sh hides the output from the compiler unless the compilation
fails. To recognize newly introduced warnings use -Werror by default.
Also add a switch to disable -Werror in case the warnings are expected.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile
Hi Willy!
On 2024-04-14 12:56:46+0200, Willy Tarreau wrote:
> On Sun, Apr 14, 2024 at 09:56:23AM +0200, Thomas Weißschuh wrote:
> > All supported kernels are assumed to use struct new_utsname.
> > This is validated in test_uname().
> >
> > uname
All supported kernels are assumed to use struct new_utsname.
This is validated in test_uname().
uname(2) can for example be used in ksft_min_kernel_version() from the
kernels selftest framework.
Link: https://lore.kernel.org/lkml/20240412123536.ga32...@redhat.com/
Signed-off-by: Thomas Weißschuh
On 2023-11-26 10:28:28+0100, Willy Tarreau wrote:
> Hi Thomas,
>
> > +int test_rlimit(void)
> > +{
> > + struct rlimit rlim = {
> > + .rlim_cur = 1 << 20,
> > + .rlim_max = 1 << 20,
> > + };
> > + int ret;
> > +
> > + ret = setrlimit(RLIMIT_CORE, );
> > + if (ret)
>
The series adds support for setrlimit/getrlimit.
Mainly to avoid spurious coredumps when running the tests under
qemu-user.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
tools/nolibc: drop custom definition of struct rusage
tools/nolibc: add support for getrlimit
A future commit will include linux/resource.h, which will conflict with
the private definition of struct rusage in nolibc.
Avoid the conflict by dropping the private definition and use the one
from the UAPI headers.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/types.h | 21
The implementation uses the prlimit64 systemcall as that is available on
all architectures.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/sys.h | 38
tools/testing/selftests/nolibc/nolibc-test.c | 29 +
2 files
.
Link:
https://lore.kernel.org/qemu-devel/20231115-qemu-user-dumpable-v1-2-edbe7f0fb...@t-8ch.de/
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing
On 2023-11-16 08:48:02+0100, Willy Tarreau wrote:
> On Wed, Nov 15, 2023 at 10:08:21PM +0100, Thomas Weißschuh wrote:
> > Migrate part of nolibc-test.c to the new test harness.
> >
> > Signed-off-by: Thomas Weißschuh
> > ---
> > tools/testing/se
On 2023-11-16 08:33:27+0100, Willy Tarreau wrote:
> On Wed, Nov 15, 2023 at 10:08:20PM +0100, Thomas Weißschuh wrote:
> > Migrate part of nolibc-test.c to the new test harness.
> >
> > Signed-off-by: Thomas Weißschuh
>
> A few points, mostly questions and food for th
On 2023-11-16 08:16:22+0100, Willy Tarreau wrote:
> Hi Thomas,
>
> On Wed, Nov 15, 2023 at 10:08:19PM +0100, Thomas Weißschuh wrote:
> > The harness provides a framework to write unit tests for nolibc itself
> > and kernel selftests using nolibc.
> >
> > Ad
in its support for test suites,
the same as google test.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-harness.h | 269
1 file changed, 269 insertions(+)
diff --git a/tools/testing/selftests/nolibc/nolibc-harness.h
b/tools/testing
Migrate part of nolibc-test.c to the new test harness.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 106 ++-
1 file changed, 56 insertions(+), 50 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools
the test "mmap_munmap_good" fails.
This is a bug in qemu-user and already fixed there on master.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
selftests/nolibc: add custom test harness
selftests/nolibc: migrate startup tests to new harness
selftests/nolib
Migrate part of nolibc-test.c to the new test harness.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 74 +++-
1 file changed, 28 insertions(+), 46 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools
Nov 9, 2023 17:28:45 Konstantin Ryabitsev :
> On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:
>
>
> I'm curious how this happened, especially since this was sent with b4.
My system time was messed up.
I blame systemd-timesyncd.
.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Preserver 8-byte alignment of stack pointer
- Link to v1:
https://lore.kernel.org/r/20231108-nolibc-pic-v1-1-9b7a429d5...@weissschuh.net
---
tools/include/nolibc/arch-mips.h| 7 ++-
tools/testing/selftests/nolibc/Makefile | 2 +-
2
.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-mips.h| 7 ++-
tools/testing/selftests/nolibc/Makefile | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-mips.h
index 3a2c76716b83..e9a01847c2b8
On 2023-11-05 15:27:00+0100, Willy Tarreau wrote:
> On Sun, Nov 05, 2023 at 03:22:30PM +0100, Thomas Weißschuh wrote:
> > Center-align all possible status reports.
> > Before OK and FAIL were center-aligned in relation to each other but
> > SKIPPED and FAILED would be left-ali
[OK]
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing/selftests/nolibc/nolibc-test.c
index 2f10541e6f38..e17
Allow testing MIPS O32 big endian.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 7 +++
tools/testing/selftests/nolibc/run-tests.sh | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests
MIPS has many different configurations prepare the support of additional
ones by moving the build of MIPS to the generic XARCH infrastructure.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 12 +++-
tools/testing/selftests
When an architecture is unsupported arch.h would silently continue.
This leads to a lot of followup errors because my_syscallX() is not
defined and the startup code is missing.
Avoid these confusing errors and fail the build early with a clear
error message and location.
Signed-off-by: Thomas
Two bugfixes and some minor refactorings of the MIPS support.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Use olddefconfig instead of oldconfig
- mipso32{le,be} -> mips32{le,be}
- Link to v1:
https://lore.kernel.org/r/20231105-nolibc-mips-be-v1-0-6c2ad3e50...@weissschuh.net
---
Tho
More ABIs exist, for better clarity specify it explicitly everywhere.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing
Allow some postprocessing of defconfig files.
Suggested-by: Zhangjin Wu
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing
When installing nolibc to a sysroot arch.h is not used so its ABI check
is bypassed. This makes is possible to compile nolibc with a non O32 ABI
which may build but can not run.
Move the check into arch-mips.h so it will always be evaluated.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy
On 2023-11-05 11:32:27+0100, Willy Tarreau wrote:
> On Sun, Nov 05, 2023 at 11:09:57AM +0100, Thomas Weißschuh wrote:
> > MIPS has many different configurations prepare the support of additional
> > ones by moving the build of MIPS to the generic XARCH infrastructure.
>
Allow some postprocessing of defconfig files.
Suggested-by: Zhangjin Wu
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing/selftests/nolibc/Makefile
index
Allow testing MIPS O32 big endian.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 7 +++
tools/testing/selftests/nolibc/run-tests.sh | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools
MIPS has many different configurations prepare the support of additional
ones by moving the build of MIPS to the generic XARCH infrastructure.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 12 +++-
tools/testing/selftests/nolibc/run-tests.sh | 2
When an architecture is unsupported arch.h would silently continue.
This leads to a lot of followup errors because my_syscallX() is not
defined and the startup code is missing.
Avoid these confusing errors and fail the build early with a clear
error message and location.
Signed-off-by: Thomas
Two bugfixes and some minor refactorings of the MIPS support.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (6):
tools/nolibc: error out on unsupported architecture
tools/nolibc: move MIPS ABI validation into arch-mips.h
selftests/nolibc: use XARCH for MIPS
More ABIs exist, for better clarity specify it explicitly everywhere.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing/selftests/nolibc
When installing nolibc to a sysroot arch.h is not used so its ABI check
is bypassed. This makes is possible to compile nolibc with a non O32 ABI
which may build but can not run.
Move the check into arch-mips.h so it will always be evaluated.
Signed-off-by: Thomas Weißschuh
---
tools/include
0 skipped, 0 failed => status:
success
riscv: 162 test(s): 162 passed, 0 skipped, 0 failed => status:
success
s390: 162 test(s): 161 passed, 1 skipped, 0 failed => status:
warning
loongarch: 162 test(s): 161 passed, 1 skipped, 0 failed => status:
warning
On 2023-11-02 09:50:38+0100, Willy Tarreau wrote:
> On Tue, Oct 31, 2023 at 09:36:57PM +0100, Thomas Weißschuh wrote:
> > With the out-of-tree builds it's possible do incremental tests fairly fast:
> >
> > time ./run-tests.sh
> > i386: 162 test(s): 162 pass
n v2:
- Drop already applied qemu-system-ppc64le patch
- Drop config generation patch
- Add Co-developed-by for out-of-tree patch
- Link to v1:
https://lore.kernel.org/lkml/20231010-nolibc-out-of-tree-v1-0-b6a263859...@weissschuh.net/
---
Thomas Weißschuh (3):
selftests/nolibc: use EFI -bios f
'file not found' is better than a hanging
test without output that can never succeed.
Link:
https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e...@t-8ch.de/
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 9 -
1 file changed, 8 insertions
It is easier to recognize paths from their well-known location in the
source tree than having to resolve the relative path in ones head.
Acked-by: Willy Tarreau
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
74.git.fal...@tinylab.org/
Co-developed-by: Zhangjin Wu
Signed-off-by: Zhangjin Wu
Acked-by: Willy Tarreau
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selfte
Oct 22, 2023 11:37:05 Willy Tarreau :
> On Tue, Oct 10, 2023 at 02:34:00PM +0200, Thomas Weißschuh wrote:
>> This new target generates a .config if none exists yet.
>>
>> Also drop the defconfig target with its hidden call to 'mrproper' which
>> is fairly invasive.
&g
Oct 22, 2023 11:31:32 Willy Tarreau :
> On Tue, Oct 10, 2023 at 02:33:59PM +0200, Thomas Weißschuh wrote:
>> Out of tree builds are much more convenient when building for multiple
>> architectures or configurations in parallel.
>>
>> Only absolute O= parameters are su
Oct 22, 2023 11:21:16 Willy Tarreau :
> On Tue, Oct 10, 2023 at 02:33:57PM +0200, Thomas Weißschuh wrote:
>> qemu for LoongArch does not work properly with direct kernel boot.
>> The kernel will panic during initialization and hang without any output.
>>
>> When boo
This new target generates a .config if none exists yet.
Also drop the defconfig target with its hidden call to 'mrproper' which
is fairly invasive.
If users want to overwrite their kernel existing kernel configuration
they can do so easily from the toplevel directory.
Signed-off-by: Thomas
elftests/nolibc: use qemu-system-ppc64 also for ppc64le" was already
submitted standalone but I included it here again for easier testing and
review.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (5):
selftests/nolibc: use qemu-system-ppc64 also for ppc64le
selftes
qemu-system-ppc64 can handle both big and little endian kernels.
While some setups, like Debian, provide a symlink to execute
qemu-system-ppc64 as qemu-system-ppc64le, others, like ArchLinux, do not.
So always use qemu-system-ppc64 directly.
Signed-off-by: Thomas Weißschuh
---
tools/testing
'file not found' is better than a hanging
test without output that can never succeed.
Link:
https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e...@t-8ch.de/
Signed-off-by: Thomas Weißschuh
---
Note: I'm wondering how this worked for anybody else.
---
tools/testing/selftests
It is easier to recognize paths from their well-known location in the
source tree than having to resolve the relative path in ones head.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools
74.git.fal...@tinylab.org/
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing/selftests/nolibc/Makefile
index 598d53c5cb7b..21
qemu-system-ppc64 can handle both big and little endian kernels.
While some setups, like Debian, provide a symlink to execute
qemu-system-ppc64 as qemu-system-ppc64le, others, like ArchLinux, do not.
So always use qemu-system-ppc64 directly.
Signed-off-by: Thomas Weißschuh
---
tools/testing
s getauxval() in general.
> > * test_getpagesize() tests pagesize() which directly calls
> > getauxval(AT_PAGESZ).
> >
> > Fixes: 48967b73f8fe ("selftests/nolibc: add testcases for startup code")
> > Cc: sta...@vger.kernel.org
> > Signed-off-by: Thomas Weißschuh
> [..]
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 tes
("selftests/nolibc: add testcases for startup code")
Cc: sta...@vger.kernel.org
Signed-off-by: Thomas Weißschuh
---
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/selfte
5747 nolibc-test.after
21970 104 88 221625692 nolibc-test.after-only-crt.h-changes
The sections are defined by [0].
[0] https://refspecs.linuxfoundation.org/elf/gabi4+/ch5.dynamic.html
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Drop RFC status.
- Add comment
On 2023-10-07 10:30:35+0200, Willy Tarreau wrote:
> On Sat, Oct 07, 2023 at 09:28:45AM +0200, Thomas Weißschuh wrote:
> > > In the past I learned the hard way that you can never trust the execution
> > > order of constructors, so if you're unlucky above you could very wel
Hi Willy,
On 2023-10-07 08:50:25+0200, Willy Tarreau wrote:
> On Thu, Oct 05, 2023 at 06:45:07PM +0200, Thomas Weißschuh wrote:
> > With the startup code moved to C, implementing support for
> > constructors and deconstructors is fairly easy to implement.
> [..]
> > di
5747 nolibc-test.after
21970 104 88 221625692 nolibc-test.after-only-crt.h-changes
The sections are defined by [0].
[0] https://refspecs.linuxfoundation.org/elf/gabi4+/ch5.dynamic.html
Signed-off-by: Thomas Weißschuh
---
Note:
This is only an RFC as I'm not 100% sure it belong
On 2023-09-18 18:19:15+0200, Willy Tarreau wrote:
> Hi Thomas,
>
> On Sun, Sep 17, 2023 at 05:36:17PM +0200, Thomas Weißschuh wrote:
> > The ENOSYS fallback code does not use its functions parameters.
> > This can lead to compiler warnings about unused parameters.
>
When building with a multiarch-capable compiler, like those provided by
common distributions the -m32 argument is required to build 32bit code.
Wrap it in cc-option in case the compiler is not multiarch-capable.
Acked-by: Willy Tarreau
Signed-off-by: Thomas Weißschuh
---
tools/testing
-by: Thomas Weißschuh
---
tools/include/nolibc/sys.h | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 8389820e1928..f05144e46b67 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -938,11
The ENOSYS fallback code does not use its functions parameters.
This can lead to compiler warnings about unused parameters.
Explicitly avoid these warnings.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/sys.h | 44 +++-
1 file changed, 27
We can automatically detect if pselect6 is needed or not from the kernel
headers. This removes the need to manually specify it.
Acked-by: Willy Tarreau
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-aarch64.h | 3 ---
tools/include/nolibc/arch-loongarch.h | 4 +---
tools
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Replace manual casts to (void) with __nolibc_enosys helpers
- Link to v1:
https://lore.kernel.org/r/20230914-nolibc-syscall-nr-v1-0-e50df410d...@weissschuh.net
---
Thomas Weißschuh (4):
selftests/nolibc: allow building i386
of linking the initramfs into the kernel assemble it manually
and pass it explicitly to qemu.
This avoids all of the kernel relinks.
Signed-off-by: Thomas Weißschuh
---
Currently the nolibc testsuite embeds the test executable into a kernel
image with CONFIG_INITRAMFS_SOURCE.
This forces a full kernel
On 2023-09-17 11:48:27+0200, Willy Tarreau wrote:
> [..]
> > Maybe the macro-equivalent of this?
> >
> > static inline int __nolibc_enosys(...)
> > {
> > return -ENOSYS;
> > }
> >
> > The only-vararg function unfortunately needs C23 so we can't use it.
> >
> > It's clear to the users that
On 2023-09-17 05:22:19+0200, Willy Tarreau wrote:
> On Sat, Sep 16, 2023 at 09:13:26AM +0200, Thomas Weißschuh wrote:
> > Currently the nolibc testsuite embeds the test executable into a kernel
> > image with CONFIG_INITRAMFS_SOURCE.
> > This forces a full kernel reli
On 2023-09-17 04:58:51+0200, Willy Tarreau wrote:
> On Thu, Sep 14, 2023 at 06:01:18PM +0200, Thomas Weißschuh wrote:
> > The ENOSYS fallback code does not use its functions parameters.
> > This can lead to compiler warnings about unused parameters.
> >
> > Expl
The nolibc testsuite wants to generate an initrams without linking it
into the kernel for which it needs access to gen_init_cpio.
Add a new toplevel target for it so it can be built standalone.
Signed-off-by: Thomas Weißschuh
---
Kbuild maintainers:
If there is a way that does not require
Now that the target "run" does not relink the kernel all the time
anymore it is much faster and we don't need "rerun" anymore.
Signed-off-by: Thomas Weißschuh
---
Willy:
This is an optional commit, "rerun" is still a bit faster than "run".
Also maybe
of linking the initramfs into the kernel assemble it manually
and pass it explicitly to qemu.
This avoids all of the kernel relinks.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 47 +
1 file changed, 24 insertions(+), 23 deletions
.
With a bit of Makefile-shuffling the relinking can be avoided.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
kbuild: add toplevel target for usr/gen_init_cpio
selftests/nolibc: don't embed initramfs into kernel image
selftests/nolibc: drop target "rerun"
All symbols created by nolibc are also visible to user code.
Syscall constants are expected to come from the kernel headers and
should not be made up by nolibc.
Refactor the logic to avoid defining syscall numbers.
Also the new code is easier to understand.
Signed-off-by: Thomas Weißschuh
We can automatically detect if pselect6 is needed or not from the kernel
headers. This removes the need to manually specify it.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-aarch64.h | 3 ---
tools/include/nolibc/arch-loongarch.h | 4 +---
tools/include/nolibc/arch-riscv.h
The ENOSYS fallback code does not use its functions parameters.
This can lead to compiler warnings about unused parameters.
Explicitly avoid these warnings.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/sys.h | 31 +++
1 file changed, 31 insertions
When building with a multiarch-capable compiler, like those provided by
common distributions the -m32 argument is required to build 32bit code.
Wrap it in cc-option in case the compiler is not multiarch-capable.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 1
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (4):
selftests/nolibc: allow building i386 with multiarch compiler
tools/nolibc: avoid unused parameter warnings for ENOSYS fallbacks
tools/nolibc: don't define new syscall number
tools/nolibc: automatically detect
Hi Willy!
On 2023-09-11 08:04:49+0200, Willy Tarreau wrote:
> On Sun, Sep 10, 2023 at 09:29:01PM +0200, Thomas Weißschuh wrote:
> > Newer versions of glibc annotate the poll() function with
> > __attribute__(access) which triggers a compiler warning inside the
> > testcase
On 2023-09-11 16:30:25+0200, Willy Tarreau wrote:
> On Mon, Sep 11, 2023 at 04:26:41PM +0200, Thomas Weißschuh wrote:
> > On 2023-09-11 08:04:49+0200, Willy Tarreau wrote:
> > > On Sun, Sep 10, 2023 at 09:29:01PM +0200, Thomas Weißschuh wrote:
> > > > Newer versi
91 matches
Mail list logo