On Thu, Aug 07, 2025 at 08:00:42PM +0800, Wake Liu wrote:
> The futex tests `futex_wait.c` and `futex_waitv.c` rely on the `shmget()`
> syscall, which may not be available if the kernel is built without
> System V IPC support (CONFIG_SYSVIPC=n). This can lead to test
> failures on such systems.
>
clock_nanosleep() returns a positive error value. Unlike other libc
functions it *does not* return -1 nor set errno.
Fix the return value and also adapt nanosleep().
Fixes: 7c02bc4088af ("tools/nolibc: add support for clock_nanosleep() and
nanosleep()")
Signed-off-by: Thomas
The generic vDSO provides a lot common functionality shared between
different architectures. SPARC is the last architecture not using it,
preventing some necessary code cleanup.
Make use of the generic infrastructure.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/Kconfig
To be y2038-safe, 32-bit userspace needs to explicitly call the 64-bit safe
time APIs.
Implement clock_gettime64() in the 32-bit vDSO.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/vdso/vclock_gettime.c| 8
arch/sparc/vdso/vdso32/vdso32.lds.S | 2 ++
2 files changed, 10
There are no handled symbols left.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/vdso/vdso2c.c | 10 --
arch/sparc/vdso/vdso2c.h | 41 +
2 files changed, 1 insertion(+), 50 deletions(-)
diff --git a/arch/sparc/vdso/vdso2c.c b/arch/sparc/vdso
Add a vDSO fastpath for clock_getres().
Signed-off-by: Thomas Weißschuh
---
arch/sparc/include/asm/vdso/gettimeofday.h | 42 +-
arch/sparc/vdso/vclock_gettime.c | 16
arch/sparc/vdso/vdso.lds.S | 2 ++
arch/sparc/vdso/vdso32
After the adoption of the generic vDSO library this symbol does not exist.
The alignment invariant is now guaranteed by the generic code.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/include/asm/vdso.h | 2 --
arch/sparc/vdso/vdso2c.c | 6 --
arch/sparc/vdso/vdso2c.h | 4
The generic vDSO library expects a vdso/processor.h with an definition of
cpu_relax().
Split out cpu_relax() into this dedicated header.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/include/asm/processor.h | 3 +++
arch/sparc/include/asm/processor_32.h | 2 --
arch/sparc/include/asm
The generic vDSO libraries expected the syscall fallbacks
asm/vdso/gettimeofday.h. To prepare the adoption of the generic library,
move the existing functions there.
While at it, rename them so they match what the generic library expects.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/include
The patching logic is unnecessarily complicated and stands in the way of
the adoption of the generic vDSO framework.
Replace it by a simple runtime switch, similar to other architectures.
Suggested-by: Thomas Gleixner
Link: https://lore.kernel.org/lkml/87ecu9tfhw.ffs@tglx/
Signed-off-by: Thomas
', as the functions are __always_inline anyways
* Use the same parameter types
* Use the same function names
Signed-off-by: Thomas Weißschuh
---
arch/sparc/include/asm/vdso/gettimeofday.h | 78 ++
arch/sparc/vdso/vclock_gettime.c | 70 ++--
eservation was only cleaned up in commit 24b7c77bbb24
("x86/vdso: Remove obsolete "fake section table" reservation").
Remove the reservation for SPARC, too.
Fixes: 9a08862a5d2e ("vDSO for sparc")
Signed-off-by: Thomas Weißschuh
---
arch/sparc/vdso/vdso-layout.lds.
From: Arnd Bergmann
After sparc64, there are no remaining users of ARCH_CLOCKSOURCE_DATA
and it can just be removed.
Signed-off-by: Arnd Bergmann
Acked-by: John Stultz
[Thomas: drop sparc64 bits from the patch]
Signed-off-by: Thomas Weißschuh
---
include/linux/clocksource.h | 6
org/
Fixes: 9a08862a5d2e ("vDSO for sparc")
Signed-off-by: Thomas Weißschuh
---
arch/sparc/vdso/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index
fdc4a8f5a49c5b27fbae
There is a dedicated field in 'struct clocksource' for the vDSO clock mode.
Use that field and get rid of 'select ARCH_CLOCKSOURCE_DATA'.
Signed-off-by: Thomas Weißschuh
---
arch/sparc/Kconfig | 1 -
arch/sparc/include/asm/clocksource.h | 4
arch/sp
https://lore.kernel.org/lkml/20250707144726.4008707-1-a...@kernel.org/
Only tested on QEMU.
Based von v6.16-rc1.
Marked as RFC for testing and review only.
Will be properly resubmitted after v6.17-rc1.
Signed-off-by: Thomas Weißschuh
---
Arnd Bergmann (1):
clocksource: remove ARCH_CLOCKSOURCE
The prototype of __vdso_gettimeofday() uses this struct.
However gettime.h's own includes do not provide a definition for it.
Add a forward declaration, similar to other used structs.
Fixes: 42874e4eb35b ("arch: vdso: consolidate gettime prototypes")
Signed-off-by: Thomas Weißschu
Currently the test setup does not support running nolibc-test built with
LLVM in qemu-system. Enable this.
FYI, sparc32 on LLVM seems to be broken at the moment. To me this looks
like a LLVM regression, emitting invalid object code.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3
testsuite the
kernel does not need to be built with LLVM.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile.nolibc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc
b/tools/testing/selftests/nolibc/Makefile.nolibc
The toplevel Makefile is capable of calculating CC from CROSS_COMPILE
and/or ARCH.
Stop passing the unnecessary variable.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile.nolibc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing
Various targets of the testsuite call back into the toplevel kernel
Makefile. These calls use various parameters and are quite long.
Introduce a common variable to make future changes smaller and the lines
shorter.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc
Hi Mark,
On Wed, Jul 16, 2025 at 03:35:09PM +0100, Mark Brown wrote:
> On Wed, Jul 16, 2025 at 03:23:24PM +0200, Thomas Weißschuh wrote:
>
> > Can you try the following?
> > I missed this despite the double-checking after the last reported issue.
>
> I needed to f
On Wed, Jul 16, 2025 at 01:50:22PM +0100, Mark Brown wrote:
> On Wed, Jul 16, 2025 at 02:34:52PM +0200, Thomas Weißschuh wrote:
> > On Wed, Jul 16, 2025 at 01:25:06PM +0100, Mark Brown wrote:
>
> > > This issue has been present in -next for a week and is causing a bunch
&
On Wed, Jul 16, 2025 at 01:25:06PM +0100, Mark Brown wrote:
> On Wed, Jul 09, 2025 at 10:04:21AM +0200, Marek Szyprowski wrote:
> > On 09.07.2025 09:34, Thomas Weißschuh wrote:
> > > On Tue, Jul 08, 2025 at 05:49:18PM +0200, Marek Szyprowski wrote:
>
> > >
being the same type. While timespec::tv_sec comes from the
kernel and is of type __kernel_old_time_t, time_t is defined within nolibc.
Switch to the __kernel_old_time_t to always get the correct type.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/std.h | 4 +++-
1 file changed, 3 insert
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (2):
tools/nolibc: define time_t in terms of __kernel_old_time_t
selftests/nolibc: add x32 test configuration
tools/include/nolibc/std.h | 4 +++-
tools/testing/selftests/nolibc/Makefile.nolibc | 12
Nolibc supports the x32 ABI on x86.
Add a testcase to make sure the support stays functional.
QEMU user does not have support for x32, so skip the test there.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile.nolibc | 12
tools/testing/selftests/nolibc
On Fri, Jul 11, 2025 at 03:39:04PM +0200, Daniel Gomez wrote:
>
> On Fri, 11 Jul 2025 15:31:35 +0200, Thomas Weißschuh wrote:
> > Code using IS_ENABLED(CONFIG_MODULES) as a C expression may need access
> > to the module structure definitions to compile.
> > Make sure the
The function stubs exposed by module.h allow the code to compile properly
without the ifdeffery. The generated object code stays the same, as the
compiler can optimize away all the dead code.
As the code is still typechecked developer errors can be detected faster.
Signed-off-by: Thomas Weißschuh
The struct was moved to the public header file in commit c8e21ced08b3
("module: fix kdb's illicit use of struct module_use.").
Back then the structure was used outside of the module core.
Nowadays this is not true anymore, so the structure can be made internal.
Signed-off-by: T
need to be visible, too.
Many structure members are still gated by specific configuration settings.
The assumption for those is that the code using them will be gated behind
the same configuration setting anyways.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Daniel Gomez
---
include/linux/mod
o the module subsys") from the sysctl
tree, but the resolution is trivial.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Pick up tags from v1
- Keep MODULE_ARCH_INIT and 'struct module' definitions together
- Link to v1:
https://lore.kernel.org/r/20250612-kunit-ifdef-mo
CH depends on CONFIG_MODULES in kconfig then
IS_ENABLED(CONFIG_LIVEPATCH) will depend on CONFIG_MODULES automatically.
There is no need for another explicit IS_ENABLED(CONFIG_MODULES).
> >
> > Signed-off-by: Thomas Weißschuh
> > ---
> > include/linux/module.h | 23 +++
Hi Marek,
On Thu, Jul 10, 2025 at 08:22:49AM +0200, Marek Szyprowski wrote:
> Commit fcc8e46f768f ("vdso/gettimeofday: Return bool from clock_gettime()
> helpers") changed the return value from clock_gettime() helpers, but it
> missed updating the one call to the do_hres() function, what breaks VD
Hi Marek,
On Tue, Jul 08, 2025 at 05:49:18PM +0200, Marek Szyprowski wrote:
> On 08.07.2025 17:17, Marek Szyprowski wrote:
> > On 01.07.2025 10:58, Thomas Weißschuh wrote:
> >> The internal helpers are effectively using boolean results,
> >> while pretending to use erro
vdso_test_abi provides the exact same functionality, properly uses
kselftest.h and explicitly calls into the vDSO without relying on the libc.
Drop the pointless testcase.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/Makefile | 2 -
.../selftests/vDSO
The existing logic is just an open-coded ksft_finished().
Replace it with the real thing.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/vdso_test_abi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vDSO/vdso_test_abi.c
b/tools
Some cleanups for the vDSO selftests.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (5):
selftests: vDSO: vdso_test_abi: Use ksft_finished()
selftests: vDSO: vdso_test_abi: Drop clock availability tests
selftests: vDSO: vdso_test_abi: Use explicit indices for name array
As the framework is already there anyways also test the CPUTIME clocks.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/vdso_test_abi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vDSO/vdso_test_abi.c
b/tools/testing/selftests
pointless checks.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/vdso_test_abi.c | 24
1 file changed, 24 deletions(-)
diff --git a/tools/testing/selftests/vDSO/vdso_test_abi.c
b/tools/testing/selftests/vDSO/vdso_test_abi.c
index
The array relies on the numeric values of the clock IDs.
When reading the code it is not obvious that the order is correct.
Make the code easier to read by using explicit indices.
While at it make the array static.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO
Hi Anshuman,
On Wed, Jun 25, 2025 at 03:01:38AM +0100, Anshuman Khandual wrote:
> Arguments passed into WEXITSTATUS() should have been initialized earlier.
> Otherwise following warning show up while building platform selftests on
> arm64. Hence just zero out all the relevant local variables to av
On Sun, Jul 06, 2025 at 10:26:31PM +0200, Thomas Gleixner wrote:
> On Tue, Jul 01 2025 at 10:58, Thomas Weißschuh wrote:
>
> > Extend the auxclock test to also cover the vDSO.
>
> I'm not really convinved, that this is the right thing to do. Why can't
> this just e
On Sun, Jul 06, 2025 at 10:43:47PM +0200, Thomas Gleixner wrote:
> On Tue, Jul 01 2025 at 10:58, Thomas Weißschuh wrote:
> > This reverts commit c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI
> > headers instead of libc headers")
> >
> > The kernel h
On 2025-07-06 08:26:33+0200, Willy Tarreau wrote:
> On Fri, Jul 04, 2025 at 04:19:48PM +0200, Thomas Weißschuh wrote:
> > +static __attribute__((unused))
> > +int sys_clock_nanosleep(clockid_t clockid, int flags, const struct
> > timespec *rqtp,
> > +
Also add some tests.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/time.h | 34
tools/testing/selftests/nolibc/nolibc-test.c | 1 +
2 files changed, 35 insertions(+)
diff --git a/tools/include/nolibc/time.h b/tools/include/nolibc/time.h
An upcoming testcase will use /dev/full.
Make sure it is always present.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing
When an error is encountered by printf() it needs to be reported.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (2):
selftests/nolibc: create /dev/full when running as PID 1
selftests/nolibc: correctly report errors from printf() and friends
tools/include/nolibc/stdio.h
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdio.h | 4 ++--
tools/testing/selftests/nolibc/nolibc-test.c | 23 +++
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/std
On 2025-07-03 17:00:14+0100, Mark Brown wrote:
> I had cause to look at the vfork() support for GCS and realised that we
> don't have any direct test coverage, this series does so by adding
> vfork() to nolibc and then using that in basic-gcs to provide some
> simple vfork() coverage.
Thanks. I ap
The internal helpers are effectively using boolean results,
while pretending to use error numbers.
Switch the return type to bool for more clarity.
Signed-off-by: Thomas Weißschuh
---
lib/vdso/gettimeofday.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff
re not possible build parse_vdso.c as part of the
same compilation unit as its caller as sys/auxv.h is needed for getauxval().
In the meantime nolibc gained its own elf.h, providing compatibility with the
documented libc interfaces.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/M
Expose the auxiliary clocks through the vDSO.
Architectures not using the generic vDSO time framework,
namely SPARC64, are not supported.
Signed-off-by: Thomas Weißschuh
---
include/vdso/datapage.h | 2 ++
lib/vdso/gettimeofday.c | 49 -
2 files
Extend the auxclock test to also cover the vDSO.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/timers/auxclock.c | 95 +--
1 file changed, 91 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/timers/auxclock.c
b/tools/testing
This code is duplicated and with the introduction of auxiliary clocks will
be duplicated even more.
Introduce a helper.
Signed-off-by: Thomas Weißschuh
---
lib/vdso/gettimeofday.c | 43 ---
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a
Expose the auxiliary clock data so it can be read from the vDSO.
Architectures not using the generic vDSO time framework,
namely SPARC64, are not supported.
Signed-off-by: Thomas Weißschuh
---
include/linux/timekeeper_internal.h | 13
include/vdso/datapage.h | 3
Move the constant resolution to a shared header,
so the vDSO can use it and return it without going through a syscall.
Signed-off-by: Thomas Weißschuh
---
include/vdso/auxclock.h | 13 +
kernel/time/timekeeping.c | 6 --
2 files changed, 17 insertions(+), 2 deletions(-)
diff
This code is duplicated and with the introduction of auxiliary clocks will
be duplicated even more.
Introduce a helper.
Signed-off-by: Thomas Weißschuh
---
lib/vdso/gettimeofday.c | 32 ++--
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/lib/vdso
With the upcoming addition of auxiliary clocks the clockid validation will
become more complicated. Split it into a dedicated function to keep the
code readable.
Signed-off-by: Thomas Weißschuh
---
lib/vdso/gettimeofday.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff
The internal helpers are effectively using boolean results,
while pretending to use error numbers.
Switch the return type to bool for more clarity.
Signed-off-by: Thomas Weißschuh
---
lib/vdso/gettimeofday.c | 58 +
1 file changed, 30 insertions
The upcoming auxiliary clocks need this hook, too.
To separate the architecture hooks from the timekeeper internals, refactor
the hook to only operate on a single vDSO clock.
While at it, use a more robust #define for the hook override.
Signed-off-by: Thomas Weißschuh
---
arch/arm64/include
Auxiliary clocks behave differently from regular ones.
Add a testcase to validate their functionality.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/timers/.gitignore | 1 +
tools/testing/selftests/timers/Makefile | 2 +-
tools/testing/selftests/timers/auxclock.c | 319
t;tools headers: Synchronize linux/bits.h with the kernel
sources").
Another fix for this is pending [0] and should make it into v6.16.
[0]
https://lore.kernel.org/lkml/20250630-uapi-genmask-v1-1-eb0ad956a...@linutronix.de/
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (14):
selftests/
The logic to configure a 'struct vdso_clock' from a
'struct tk_read_base' is copied two times.
Split it into a shared function to reduce the duplication,
especially as another user will be added for auxiliary clocks.
Signed-off-by: Thomas Weißschuh
---
kernel/
Auxiliary clocks will have their vDSO data in a dedicated 'struct vdso_clock',
which needs to be synchronized independently.
Add a helper to synchronize a single vDSO clock.
Signed-off-by: Thomas Weißschuh
---
include/vdso/helpers.h | 40 +++-
1 fi
IG_UML_PCI which itself is not directly configurable.
Instead of going through CONFIG_UML_PCI_OVER_VIRTIO, introduce a custom
configuration option which enables CONFIG_UML_PCI without triggering
warnings or building dead code.
Signed-off-by: Thomas Weißschuh
---
lib/kunit/Kconfig
Hi Rob,
On 2025-06-24 21:41:14-0500, Rob Landley wrote:
> On 6/9/25 04:28, Thomas Weißschuh wrote:
> > Add support for SuperH/"sh" to nolibc.
> > Only sh4 is tested for now.
> >
> > This is only tested on QEMU so far.
> > Additional testing would be v
On 2025-06-21 10:47:39+0200, Willy Tarreau wrote:
> On Sat, Jun 21, 2025 at 10:34:38AM +0200, Thomas Weißschuh wrote:
> > On 2025-06-21 06:14:21+0200, Willy Tarreau wrote:
> > > Hi Thomas,
> > >
> > > On Fri, Jun 20, 2025 at 11:39:32PM +0200, Thomas Weißschuh
rrupts "sp".
__builtin_unreachable() is necessary for __attribute__((noreturn)).
Also depending on compiler flags (for example -fPIC) even more prologue
is generated.
Work around this by defining a nested function in asm.
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70216
Signed-off-by: Thomas
.org/lkml/alpine.deb.2.21.2502172208570.65...@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh
Tested-by: Sebastian Andrzej Siewior
---
tools/include/nolibc/arch-mips.h | 4
1 file changed, 4 deletions(-)
diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/noli
rs.
Fixes: 1063649cf531 ("selftests/nolibc: Add tests for strlcat() and strlcpy()")
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing/sel
The variable block got disordered at some point.
Use the correct ordering.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile.nolibc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc
.2.21.2502161523290.65...@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh
Tested-by: Sebastian Andrzej Siewior
---
tools/include/nolibc/arch-mips.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-mips.h
index
t;.
Remove the unnecessary $gp setup, simplifying the code and opening the
road for some other cleanups.
Suggested-by: Maciej W. Rozycki
Link:
https://lore.kernel.org/lkml/alpine.deb.2.21.2502172208570.65...@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh
Tested-by: Sebastian Andrzej
Add support for the MIPS 64bit N64 and ILP32 N32 ABIs.
In addition to different byte orders and ABIs there are also different
releases of the MIPS architecture. To avoid blowing up the test matrix,
only add a subset of all possible test combinations.
Signed-off-by: Thomas Weißschuh
Tested-by
Introduce support for the N32 and N64 ABIs. As preparation, the
entrypoint is first simplified significantly. Thanks to Maciej for all
the valuable information.
Signed-off-by: Thomas Weißschuh
---
Changes in v3:
- Rebase onto latest nolibc-next
- Link to v2:
https://lore.kernel.org/r/20250225
s
sufficient for the nolibc-test usecase.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile.nolibc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc
b/tools/testing/selftests/no
olibc-test
nolibc-test: ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV),
statically linked, not stripped
$ ./nolibc-test
Running test 'startup'
0 argc = 1[OK]
...
Total number of errors: 0
Exiting with status 0
Signed-off-
On 2025-06-21 06:14:21+0200, Willy Tarreau wrote:
> Hi Thomas,
>
> On Fri, Jun 20, 2025 at 11:39:32PM +0200, Thomas Weißschuh wrote:
> > The nolibc tests are not real kselftests, they work differently and
> > provide a different interface. Users trying to use them like real
Hook up nolibc-test with the kselftests framework.
This enables CI systems and developers to easily execute the tests.
While nolibc-test does not emit KTAP output itself that is not a problem,
as the kselftest executor will wrap the output in KTAP.
Signed-off-by: Thomas Weißschuh
---
tools
the way.
The custom tests are still useful to keep as they provide functionality
not provided by kselftests.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/{Makefile => Makefile.nolibc} | 0
tools/testing/selftests/nolibc/run-tests.sh | 2 +-
2 files chan
Some upcoming changes will reuse the CFLAGS.
Split the computation into a reusable Makefile.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 12
tools/testing/selftests/nolibc/Makefile.include | 10 ++
2 files changed, 14 insertions
Hook up nolibc-test with the kselftests framework.
This enables CI systems and developers to easily execute the tests.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (4):
selftests/nolibc: drop implicit defconfig executions
selftests/nolibc: split out CFLAGS logic
d-by: Mark Brown
Closes:
https://lore.kernel.org/all/3d5128b9-b4b6-4a8e-94ce-ea5ff4ea6...@sirena.org.uk/
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/too
ot
Closes:
https://lore.kernel.org/oe-kbuild-all/202506180223.book5jdk-...@intel.com/
Fixes: 6eda706a535c ("selftests: vDSO: fix the way vDSO functions are called
for powerpc")
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/vdso_call.h | 7 +++
1 file changed, 3
On Tue, Jun 17, 2025 at 09:44:49AM +0200, Petr Pavlu wrote:
> On 6/12/25 4:53 PM, Thomas Weißschuh wrote:
> > The function stubs exposed by module.h allow the code to compile properly
> > without the ifdeffery. The generated object code stays the same, as the
> > compiler can
On Thu, Jun 12, 2025 at 11:58:01AM -0300, Jason Gunthorpe wrote:
> On Thu, Jun 12, 2025 at 04:27:41PM +0200, Thomas Weißschuh wrote:
>
> > If the assumption is that this is most likely a kernel bug,
> > shouldn't it be fixed properly rather than worked around?
> > Af
The function stubs exposed by module.h allow the code to compile properly
without the ifdeffery. The generated object code stays the same, as the
compiler can optimize away all the dead code.
As the code is still typechecked developer errors can be detected faster.
Signed-off-by: Thomas Weißschuh
The struct was moved to the public header file in
commit c8e21ced08b3 ("module: fix kdb's illicit use of struct module_use.").
Back then the structure was used outside of the module core.
Nowadays this is not true anymore, so the structure can be made internal.
Signed-off-by: T
need to be visible, too.
Many structure members are still gated by specific configuration settings.
The assumption for those is that the code using them will be gated behind
the same configuration setting anyways.
Signed-off-by: Thomas Weißschuh
---
include/linux/module.h | 23 -
Code using IS_ENABLED(CONFIG_MODULES) as a C expression may need access
to the module structure definitions to compile.
Make sure these structure definitions are always visible.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
module: move 'struct module_use' to
On Thu, Jun 12, 2025 at 10:58:02AM -0300, Jason Gunthorpe wrote:
> On Wed, Jun 11, 2025 at 11:59:00PM -0700, Nicolin Chen wrote:
>
> > We can see the 64MB was rounded up to 512MB by ksys_mmap_pgoff()
> > when being passed in to hugetlb_file_setup() at:
> > https://git.kernel.org/pub/scm/linux/kern
implemented on architecture
The SKIP line should start with "ok 1" as the plan only contains one test.
Fixes: 3b5992eaf730 ("selftests: vDSO: unconditionally build chacha test")
Reviewed-by: Muhammad Usama Anjum
Signed-off-by: Thomas Weißschuh
---
I'm not sure if thi
point if it is set.
The GIC page is also included as it is specific to the vDSO.
Also move the randomization adjustment into the same conditional.
Signed-off-by: Thomas Weißschuh
Reviewed-by: David Gow
---
arch/mips/kernel/process.c | 16 +---
1 file changed, 9 insertions(+), 7
Add basic support to run various MIPS variants via kunit_tool using the
virtualized malta platform.
Signed-off-by: Thomas Weißschuh
Reviewed-by: David Gow
---
tools/testing/kunit/qemu_configs/mips.py | 18 ++
tools/testing/kunit/qemu_configs/mips64.py | 19
Add basic support to run various MIPS variants via kunit_tool using the
virtualized malta platform.
Signed-off-by: Thomas Weißschuh
---
Changes in v4:
- Rebase on v6.16-rc1
- Pick up reviews from David
- Clarify that GIC page is linked to vDSO
- Link to v3:
https://lore.kernel.org/r/20250415
use an empty argument list.
Now that all selftests a free of this warning, enable it in the Makefile.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/Makefile| 2 +-
tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +-
2 files changed, 2 insertions(+), 2
The header is unused. Furthermore this is not a real UAPI header,
but only exists in tools/include/.
This prevents building the selftest against real UAPI headers.
Drop the include.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 -
1 file changed, 1
ned-off-by: Thomas Weißschuh
---
If symlinks are problematic an #include shim would also work.
These are not handled really well by the kselftests build system though,
as #include dependencies are not tracked by it.
---
.../selftests/vDSO/vdso_standalone_test_x86.c | 59 +---
The TAP specification requires that the output begins with a header line.
If vgetrandom_init() fails and skips the test, that header line is missing.
Call vgetrandom_init() after ksft_print_header().
Signed-off-by: Thomas Weißschuh
Reviewed-by: Muhammad Usama Anjum
---
tools/testing/selftests
1 - 100 of 559 matches
Mail list logo