linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/15] kunit: Introduce UAPI testing framework
@ 2025-06-26  6:10 Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel Thomas Weißschuh
                   ` (15 more replies)
  0 siblings, 16 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh, Kees Cook,
	Alexander Viro, Christian Brauner, Jan Kara, linux-mm,
	linux-fsdevel

Currently testing of userspace and in-kernel API use two different
frameworks. kselftests for the userspace ones and Kunit for the
in-kernel ones. Besides their different scopes, both have different
strengths and limitations:

Kunit:
* Tests are normal kernel code.
* They use the regular kernel toolchain.
* They can be packaged and distributed as modules conveniently.

Kselftests:
* Tests are normal userspace code
* They need a userspace toolchain.
  A kernel cross toolchain is likely not enough.
* A fair amout of userland is required to run the tests,
  which means a full distro or handcrafted rootfs.
* There is no way to conveniently package and run kselftests with a
  given kernel image.
* The kselftests makefiles are not as powerful as regular kbuild.
  For example they are missing proper header dependency tracking or more
  complex compiler option modifications.

Therefore kunit is much easier to run against different kernel
configurations and architectures.
This series aims to combine kselftests and kunit, avoiding both their
limitations. It works by compiling the userspace kselftests as part of
the regular kernel build, embedding them into the kunit kernel or module
and executing them from there. If the kernel toolchain is not fit to
produce userspace because of a missing libc, the kernel's own nolibc can
be used instead.
The structured TAP output from the kselftest is integrated into the
kunit KTAP output transparently, the kunit parser can parse the combined
logs together.

Further room for improvements:
* Call each test in its completely dedicated namespace
* Handle additional test files besides the test executable through
  archives. CPIO, cramfs, etc.
* Compatibility with kselftest_harness.h (in progress)
* Expose the blobs in debugfs
* Provide some convience wrappers around compat userprogs
* Figure out a migration path/coexistence solution for
  kunit UAPI and tools/testing/selftests/

Output from the kunit example testcase, note the output of
"example_uapi_tests".

$ ./tools/testing/kunit/kunit.py run --kunitconfig lib/kunit example
...
Running tests with:
$ .kunit/linux kunit.filter_glob=example kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[11:53:53] ================== example (10 subtests) ===================
[11:53:53] [PASSED] example_simple_test
[11:53:53] [SKIPPED] example_skip_test
[11:53:53] [SKIPPED] example_mark_skipped_test
[11:53:53] [PASSED] example_all_expect_macros_test
[11:53:53] [PASSED] example_static_stub_test
[11:53:53] [PASSED] example_static_stub_using_fn_ptr_test
[11:53:53] [PASSED] example_priv_test
[11:53:53] =================== example_params_test  ===================
[11:53:53] [SKIPPED] example value 3
[11:53:53] [PASSED] example value 2
[11:53:53] [PASSED] example value 1
[11:53:53] [SKIPPED] example value 0
[11:53:53] =============== [PASSED] example_params_test ===============
[11:53:53] [PASSED] example_slow_test
[11:53:53] ======================= (4 subtests) =======================
[11:53:53] [PASSED] procfs
[11:53:53] [PASSED] userspace test 2
[11:53:53] [SKIPPED] userspace test 3: some reason
[11:53:53] [PASSED] userspace test 4
[11:53:53] ================ [PASSED] example_uapi_test ================
[11:53:53] ===================== [PASSED] example =====================
[11:53:53] ============================================================
[11:53:53] Testing complete. Ran 16 tests: passed: 11, skipped: 5
[11:53:53] Elapsed time: 67.543s total, 1.823s configuring, 65.655s building, 0.058s running

Based on v6.16-rc1.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v4:
- Move Kconfig.nolibc from tools/ to init/
- Drop generic userprogs nolibc integration
- Drop generic blob framework
- Pick up review tags from David
- Extend new kunit TAP parser tests
- Add MAINTAINERS entry
- Allow CONFIG_KUNIT_UAPI=m
- Split /proc validation into dedicated UAPI test
- Trim recipient list a bit
- Use KUNIT_FAIL_AND_ABORT() over KUNIT_FAIL()
- Link to v3: https://lore.kernel.org/r/20250611-kunit-kselftests-v3-0-55e3d148cbc6@linutronix.de

Changes in v3:
- Reintroduce CONFIG_CC_CAN_LINK_STATIC
- Enable CONFIG_ARCH_HAS_NOLIBC for m68k and SPARC
- Properly handle 'clean' target for userprogs
- Use ramfs over tmpfs to reduce dependencies
- Inherit userprogs byte order and ABI from kernel
- Drop now unnecessary "#ifndef NOLIBC"
- Pick up review tags
- Drop usage of __private in blob.h,
  sparse complains and it is not really necessary
- Fix execution on loongarch when using clang
- Drop userprogs libgcc handling, it was ugly and is not yet necessary
- Link to v2: https://lore.kernel.org/r/20250407-kunit-kselftests-v2-0-454114e287fd@linutronix.de

Changes in v2:
- Rebase onto v6.15-rc1
- Add documentation and kernel docs
- Resolve invalid kconfig breakages
- Drop already applied patch "kbuild: implement CONFIG_HEADERS_INSTALL for Usermode Linux"
- Drop userprogs CONFIG_WERROR integration, it doesn't need to be part of this series
- Replace patch prefix "kconfig" with "kbuild"
- Rename kunit_uapi_run_executable() to kunit_uapi_run_kselftest()
- Generate private, conflict-free symbols in the blob framework
- Handle kselftest exit codes
- Handle SIGABRT
- Forward output also to kunit debugfs log
- Install a fd=0 stdin filedescriptor
- Link to v1: https://lore.kernel.org/r/20250217-kunit-kselftests-v1-0-42b4524c3b0a@linutronix.de

---
Thomas Weißschuh (15):
      kbuild: userprogs: avoid duplication of flags inherited from kernel
      kbuild: userprogs: also inherit byte order and ABI from kernel
      kbuild: doc: add label for userprogs section
      init: re-add CONFIG_CC_CAN_LINK_STATIC
      init: add nolibc build support
      fs,fork,exit: export symbols necessary for KUnit UAPI support
      kunit: tool: Add test for nested test result reporting
      kunit: tool: Don't overwrite test status based on subtest counts
      kunit: tool: Parse skipped tests from kselftest.h
      kunit: Always descend into kunit directory during build
      kunit: qemu_configs: loongarch: Enable LSX/LSAX
      kunit: Introduce UAPI testing framework
      kunit: uapi: Add example for UAPI tests
      kunit: uapi: Introduce preinit executable
      kunit: uapi: Validate usability of /proc

 Documentation/dev-tools/kunit/api/index.rst        |   5 +
 Documentation/dev-tools/kunit/api/uapi.rst         |  14 +
 Documentation/kbuild/makefiles.rst                 |   2 +
 MAINTAINERS                                        |  11 +
 Makefile                                           |   7 +-
 fs/exec.c                                          |   2 +
 fs/file.c                                          |   1 +
 fs/filesystems.c                                   |   2 +
 fs/fs_struct.c                                     |   1 +
 fs/pipe.c                                          |   2 +
 include/kunit/uapi.h                               |  77 ++++++
 init/Kconfig                                       |   7 +
 init/Kconfig.nolibc                                |  15 +
 init/Makefile.nolibc                               |  13 +
 kernel/exit.c                                      |   3 +
 kernel/fork.c                                      |   2 +
 lib/Makefile                                       |   4 -
 lib/kunit/Kconfig                                  |  14 +
 lib/kunit/Makefile                                 |  27 +-
 lib/kunit/kunit-example-test.c                     |  15 +
 lib/kunit/kunit-example-uapi.c                     |  22 ++
 lib/kunit/kunit-test-uapi.c                        |  51 ++++
 lib/kunit/kunit-test.c                             |  23 +-
 lib/kunit/kunit-uapi.c                             | 305 +++++++++++++++++++++
 lib/kunit/uapi-preinit.c                           |  63 +++++
 tools/testing/kunit/kunit_parser.py                |  13 +-
 tools/testing/kunit/kunit_tool_test.py             |  11 +
 tools/testing/kunit/qemu_configs/loongarch.py      |   2 +
 .../test_is_test_passed-failure-nested.log         |  10 +
 .../test_data/test_is_test_passed-kselftest.log    |   3 +-
 30 files changed, 714 insertions(+), 13 deletions(-)
---
base-commit: 9d5898b413d17510b2a41664a42390a2c79f8bf4
change-id: 20241015-kunit-kselftests-56273bc40442

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-03 13:59   ` Nicolas Schier
  2025-07-04 21:51   ` Masahiro Yamada
  2025-06-26  6:10 ` [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI " Thomas Weißschuh
                   ` (14 subsequent siblings)
  15 siblings, 2 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

The duplication makes maintenance harder. Changes need to be done in two
places and the lines will grow overly long.

Use an intermediary variable instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 35e6e5240c61a8a329011929fcd0352b881dccdc..c4293cf91e968ca8ee64452841fb266e24df63f6 100644
--- a/Makefile
+++ b/Makefile
@@ -1130,8 +1130,9 @@ LDFLAGS_vmlinux	+= --emit-relocs --discard-none
 endif
 
 # Align the bit size of userspace programs with the kernel
-KBUILD_USERCFLAGS  += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
-KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
+USERFLAGS_FROM_KERNEL := -m32 -m64 --target=%
+KBUILD_USERCFLAGS  += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
+KBUILD_USERLDFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
 
 # userspace programs are linked via the compiler, use the correct linker
 ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI from kernel
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-03 14:00   ` Nicolas Schier
  2025-07-04 21:51   ` Masahiro Yamada
  2025-06-26  6:10 ` [PATCH v4 03/15] kbuild: doc: add label for userprogs section Thomas Weißschuh
                   ` (13 subsequent siblings)
  15 siblings, 2 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Make sure the byte order and ABI of the userprogs matches the one of the
kernel, similar to how the bit size is handled.
Otherwise the userprogs may not be executable.
This happens for example on powerpc little endian, or riscv32.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c4293cf91e968ca8ee64452841fb266e24df63f6..b9aa1058321dabd3b3dd5610e45a2807dfa257f4 100644
--- a/Makefile
+++ b/Makefile
@@ -1129,8 +1129,8 @@ ifneq ($(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS),)
 LDFLAGS_vmlinux	+= --emit-relocs --discard-none
 endif
 
-# Align the bit size of userspace programs with the kernel
-USERFLAGS_FROM_KERNEL := -m32 -m64 --target=%
+# Align the bit size, byte order and architecture of userspace programs with the kernel
+USERFLAGS_FROM_KERNEL := -m32 -m64 -mlittle-endian -mbig-endian --target=% -march=% -mabi=%
 KBUILD_USERCFLAGS  += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
 KBUILD_USERLDFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
 

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 03/15] kbuild: doc: add label for userprogs section
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI " Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-03 14:00   ` Nicolas Schier
  2025-07-04 21:55   ` Masahiro Yamada
  2025-06-26  6:10 ` [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC Thomas Weißschuh
                   ` (12 subsequent siblings)
  15 siblings, 2 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Some upcoming new documentation should link directly to the userprogs section.

Add a label to the section so it can be referenced.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 Documentation/kbuild/makefiles.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
index 8aef3650c1f32b6b197e0dc777e26775d371a081..c14c1f632f6069c8751c8388a35bef539e19f9e8 100644
--- a/Documentation/kbuild/makefiles.rst
+++ b/Documentation/kbuild/makefiles.rst
@@ -891,6 +891,8 @@ This is possible in two ways:
     This will tell kbuild to build lxdialog even if not referenced in
     any rule.
 
+.. _kbuild_userprogs:
+
 Userspace Program support
 =========================
 

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (2 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 03/15] kbuild: doc: add label for userprogs section Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-03 14:00   ` Nicolas Schier
  2025-07-04 21:55   ` Masahiro Yamada
  2025-06-26  6:10 ` [PATCH v4 05/15] init: add nolibc build support Thomas Weißschuh
                   ` (11 subsequent siblings)
  15 siblings, 2 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

For the kunit UAPI functionality this feature is needed.

This reverts commit d1b99cdf22e0 ("init: remove unused CONFIG_CC_CAN_LINK_STATIC")

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 init/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index af4c2f0854554bbcdf193852cf5c1d2c2accc64f..26cafbad4f1560fb56b4bef31ae29baf54175661 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -87,6 +87,11 @@ config CC_CAN_LINK
 	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
 	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))
 
+config CC_CAN_LINK_STATIC
+	bool
+	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
+	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
+
 # Fixed in GCC 14, 13.3, 12.4 and 11.5
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
 config GCC_ASM_GOTO_OUTPUT_BROKEN

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 05/15] init: add nolibc build support
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (3 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-03 14:01   ` Nicolas Schier
  2025-06-26  6:10 ` [PATCH v4 06/15] fs,fork,exit: export symbols necessary for KUnit UAPI support Thomas Weißschuh
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Building userspace applications through the kbuild "userprogs" framework
requires a libc. Kernel toolchains often do not contain a libc.
In this case it is useful to use the nolibc library from the kernel tree.
Nolibc does not support all architectures and requires compiler flags.

Add a kconfig option, so users can know where it is available and provide a
variable for common options.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 MAINTAINERS          |  2 ++
 init/Kconfig         |  2 ++
 init/Kconfig.nolibc  | 15 +++++++++++++++
 init/Makefile.nolibc | 13 +++++++++++++
 4 files changed, 32 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a92290fffa163f9fe8fe3f04bf66426f9a894409..e806158cc6798cf97a4aab58c038fb5351d469aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17702,6 +17702,8 @@ M:	Willy Tarreau <w@1wt.eu>
 M:	Thomas Weißschuh <linux@weissschuh.net>
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git
+F:	init/Kconfig.nolibc
+F:	init/Makefile.nolibc
 F:	tools/include/nolibc/
 F:	tools/testing/selftests/nolibc/
 
diff --git a/init/Kconfig b/init/Kconfig
index 26cafbad4f1560fb56b4bef31ae29baf54175661..0af62f135192e0470e16eb6bb2fbb45ac38f4b81 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -92,6 +92,8 @@ config CC_CAN_LINK_STATIC
 	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
 	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
 
+source "init/Kconfig.nolibc"
+
 # Fixed in GCC 14, 13.3, 12.4 and 11.5
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
 config GCC_ASM_GOTO_OUTPUT_BROKEN
diff --git a/init/Kconfig.nolibc b/init/Kconfig.nolibc
new file mode 100644
index 0000000000000000000000000000000000000000..29cbc5437e70cbc5e256f00b74d0ab4801b40de7
--- /dev/null
+++ b/init/Kconfig.nolibc
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config ARCH_HAS_NOLIBC
+	bool
+	default y if ARM
+	default y if ARM64
+	default y if LOONGARCH
+	default y if M68K
+	default y if MIPS
+	default y if PPC
+	default y if RISCV
+	default y if S390
+	default y if SPARC
+	default y if UML_X86
+	default y if X86
diff --git a/init/Makefile.nolibc b/init/Makefile.nolibc
new file mode 100644
index 0000000000000000000000000000000000000000..a8a193f78e34e0c4a6004e871bc206e06925f88a
--- /dev/null
+++ b/init/Makefile.nolibc
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0
+# Compiler flags, which are necessary to build userspace applications with the
+# in-kernel libc "nolibc".
+
+ifeq ($(and $(CONFIG_ARCH_HAS_NOLIBC),$(CONFIG_HEADERS_INSTALL)),y)
+
+NOLIBC_USERCFLAGS := -nostdlib -nostdinc -static -ffreestanding \
+		     -fno-asynchronous-unwind-tables -fno-stack-protector \
+		     -isystem $(objtree)/usr/include -isystem $(srctree)/tools/include/nolibc/
+
+NOLIBC_USERLDFLAGS := -nostdlib -nostdinc -static
+
+endif # CONFIG_ARCH_HAS_NOLIBC && CONFIG_HEADERS_INSTALL

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 06/15] fs,fork,exit: export symbols necessary for KUnit UAPI support
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (4 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 05/15] init: add nolibc build support Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 07/15] kunit: tool: Add test for nested test result reporting Thomas Weißschuh
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh, Kees Cook,
	Alexander Viro, Christian Brauner, Jan Kara, linux-mm,
	linux-fsdevel

The KUnit UAPI infrastructure starts userspace processes.
As it should be able to be built as a module, export the necessary symbols.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

---
To: Kees Cook <kees@kernel.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: Christian Brauner <brauner@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-mm@kvack.org
Cc: linux-fsdevel@vger.kernel.org

./get_maintainer.pl would have also Cc-ed all of the memory management and
scheduler maintainers. I trimmed the list to only BINFMT/EXEC and VFS.
---
 fs/exec.c        | 2 ++
 fs/file.c        | 1 +
 fs/filesystems.c | 2 ++
 fs/fs_struct.c   | 1 +
 fs/pipe.c        | 2 ++
 kernel/exit.c    | 3 +++
 kernel/fork.c    | 2 ++
 7 files changed, 13 insertions(+)

diff --git a/fs/exec.c b/fs/exec.c
index 1f5fdd2e096e392b342f122d35aba4cf035441c7..13f7f27641942eddcb179bdd93d99b799d155813 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -68,6 +68,7 @@
 #include <linux/user_events.h>
 #include <linux/rseq.h>
 #include <linux/ksm.h>
+#include <linux/export.h>
 
 #include <linux/uaccess.h>
 #include <asm/mmu_context.h>
@@ -1919,6 +1920,7 @@ int kernel_execve(const char *kernel_filename,
 	putname(filename);
 	return retval;
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(kernel_execve, "kunit-uapi");
 
 static int do_execve(struct filename *filename,
 	const char __user *const __user *__argv,
diff --git a/fs/file.c b/fs/file.c
index 3a3146664cf37115624e12f7f06826d48827e9d7..89d07feb9c328337451ce40cb0f368b6cb986c2c 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1317,6 +1317,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
 	spin_unlock(&files->file_lock);
 	return err;
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(replace_fd, "kunit-uapi");
 
 /**
  * receive_fd() - Install received file into file descriptor table
diff --git a/fs/filesystems.c b/fs/filesystems.c
index 95e5256821a53494d88f496193305a2e50e04444..a3a588f387bbd8268246d1026389deaadf265d0b 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -17,6 +17,7 @@
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 #include <linux/fs_parser.h>
+#include <linux/export.h>
 
 /*
  * Handling of filesystem drivers list.
@@ -45,6 +46,7 @@ void put_filesystem(struct file_system_type *fs)
 {
 	module_put(fs->owner);
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(put_filesystem, "kunit-uapi");
 
 static struct file_system_type **find_filesystem(const char *name, unsigned len)
 {
diff --git a/fs/fs_struct.c b/fs/fs_struct.c
index 64c2d0814ed6889cc12603410e6e9dc44089586f..26340d225deba3f2ec30252293fdf417235a6a4a 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -46,6 +46,7 @@ void set_fs_pwd(struct fs_struct *fs, const struct path *path)
 	if (old_pwd.dentry)
 		path_put(&old_pwd);
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(set_fs_pwd, "kunit-uapi");
 
 static inline int replace_path(struct path *p, const struct path *old, const struct path *new)
 {
diff --git a/fs/pipe.c b/fs/pipe.c
index 45077c37bad154ef146b047834d35d489fcc4d8d..d6cb743d2cfc041f08b498a5a764e9a96dc34069 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -27,6 +27,7 @@
 #include <linux/watch_queue.h>
 #include <linux/sysctl.h>
 #include <linux/sort.h>
+#include <linux/export.h>
 
 #include <linux/uaccess.h>
 #include <asm/ioctls.h>
@@ -971,6 +972,7 @@ int create_pipe_files(struct file **res, int flags)
 	file_set_fsnotify_mode(res[1], FMODE_NONOTIFY_PERM);
 	return 0;
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(create_pipe_files, "kunit-uapi");
 
 static int __do_pipe_flags(int *fd, struct file **files, int flags)
 {
diff --git a/kernel/exit.c b/kernel/exit.c
index bd743900354ca5fc6c550f80e30393a632eb9a4e..610dffb1276ac60b475708587ca053f315fea9c3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -70,6 +70,7 @@
 #include <linux/user_events.h>
 #include <linux/uaccess.h>
 #include <linux/pidfs.h>
+#include <linux/export.h>
 
 #include <uapi/linux/wait.h>
 
@@ -1005,6 +1006,7 @@ void __noreturn do_exit(long code)
 	lockdep_free_task(tsk);
 	do_task_dead();
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(do_exit, "kunit-uapi");
 
 void __noreturn make_task_dead(int signr)
 {
@@ -1887,6 +1889,7 @@ int kernel_wait(pid_t pid, int *stat)
 	put_pid(wo.wo_pid);
 	return ret;
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(kernel_wait, "kunit-uapi");
 
 SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
 		int, options, struct rusage __user *, ru)
diff --git a/kernel/fork.c b/kernel/fork.c
index 1ee8eb11f38bae1d2eb6de9494aea94b7a19e6c3..5de7a9bc005ade6dcfbdfe1a63cadbef8782658c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -105,6 +105,7 @@
 #include <uapi/linux/pidfd.h>
 #include <linux/pidfs.h>
 #include <linux/tick.h>
+#include <linux/export.h>
 
 #include <asm/pgalloc.h>
 #include <linux/uaccess.h>
@@ -2676,6 +2677,7 @@ pid_t user_mode_thread(int (*fn)(void *), void *arg, unsigned long flags)
 
 	return kernel_clone(&args);
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(user_mode_thread, "kunit-uapi");
 
 #ifdef __ARCH_WANT_SYS_FORK
 SYSCALL_DEFINE0(fork)

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 07/15] kunit: tool: Add test for nested test result reporting
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (5 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 06/15] fs,fork,exit: export symbols necessary for KUnit UAPI support Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-01 21:26   ` Rae Moar
  2025-06-26  6:10 ` [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Currently there is no test validating the result reporting from nested
tests. Add one, it will also be used to validate upcoming changes to the
nested test parsing.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 tools/testing/kunit/kunit_tool_test.py                         | 10 ++++++++++
 .../kunit/test_data/test_is_test_passed-failure-nested.log     |  7 +++++++
 2 files changed, 17 insertions(+)

diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
index bbba921e0eacb18663abfcabb2bccf330d8666f5..b74dc05fc2fe5b3ff629172fc7aafeb5c3d29fb3 100755
--- a/tools/testing/kunit/kunit_tool_test.py
+++ b/tools/testing/kunit/kunit_tool_test.py
@@ -165,6 +165,16 @@ class KUnitParserTest(unittest.TestCase):
 		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
 		self.assertEqual(result.counts.errors, 0)
 
+	def test_parse_failed_nested_tests_log(self):
+		nested_log = test_data_path('test_is_test_passed-failure-nested.log')
+		with open(nested_log) as file:
+			result = kunit_parser.parse_run_tests(file.readlines(), stdout)
+		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
+		self.assertEqual(result.counts.failed, 2)
+		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[0].status)
+		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].status)
+		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].subtests[0].status)
+
 	def test_no_header(self):
 		empty_log = test_data_path('test_is_test_passed-no_tests_run_no_header.log')
 		with open(empty_log) as file:
diff --git a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
new file mode 100644
index 0000000000000000000000000000000000000000..2e528da39ab5b2be0fca6cf9160c10929fba3c9e
--- /dev/null
+++ b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
@@ -0,0 +1,7 @@
+KTAP version 1
+1..2
+not ok 1 subtest 1
+    KTAP version 1
+    1..1
+        not ok 1 subsubtest 1
+not ok 2 subtest 2

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (6 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 07/15] kunit: tool: Add test for nested test result reporting Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-01 21:11   ` Rae Moar
  2025-06-26  6:10 ` [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h Thomas Weißschuh
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

If a subtest itself reports success, but the outer testcase fails,
the whole testcase should be reported as a failure.
However the status is recalculated based on the test counts,
overwriting the outer test result.
Synthesize a failed test in this case to make sure the failure is not
swallowed.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 tools/testing/kunit/kunit_parser.py                                  | 5 +++++
 tools/testing/kunit/kunit_tool_test.py                               | 3 ++-
 tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log | 3 +++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
index c176487356e6c94882046b19ea696d750905b8d5..2478beb28fc3db825855ad46200340e884da7df1 100644
--- a/tools/testing/kunit/kunit_parser.py
+++ b/tools/testing/kunit/kunit_parser.py
@@ -686,6 +686,11 @@ def bubble_up_test_results(test: Test) -> None:
 		counts.add_status(status)
 	elif test.counts.get_status() == TestStatus.TEST_CRASHED:
 		test.status = TestStatus.TEST_CRASHED
+	if not test.ok_status():
+		for t in subtests:
+			if not t.ok_status():
+				counts.add_status(t.status)
+				break
 
 def parse_test(lines: LineStream, expected_num: int, log: List[str], is_subtest: bool, printer: Printer) -> Test:
 	"""
diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
index b74dc05fc2fe5b3ff629172fc7aafeb5c3d29fb3..48a0dd0f9c87caf9f018aade161db90a613fc407 100755
--- a/tools/testing/kunit/kunit_tool_test.py
+++ b/tools/testing/kunit/kunit_tool_test.py
@@ -170,8 +170,9 @@ class KUnitParserTest(unittest.TestCase):
 		with open(nested_log) as file:
 			result = kunit_parser.parse_run_tests(file.readlines(), stdout)
 		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
-		self.assertEqual(result.counts.failed, 2)
+		self.assertEqual(result.counts.failed, 3)
 		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[0].status)
+		self.assertEqual(kunit_parser.TestStatus.SUCCESS, result.subtests[0].subtests[0].status)
 		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].status)
 		self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].subtests[0].status)
 
diff --git a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
index 2e528da39ab5b2be0fca6cf9160c10929fba3c9e..5498dfd0b0db24663e1a1e9bf78c587de6746522 100644
--- a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
+++ b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
@@ -1,5 +1,8 @@
 KTAP version 1
 1..2
+    KTAP version 1
+    1..1
+        ok 1 test 1
 not ok 1 subtest 1
     KTAP version 1
     1..1

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (7 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-01 21:22   ` Rae Moar
  2025-06-26  6:10 ` [PATCH v4 10/15] kunit: Always descend into kunit directory during build Thomas Weißschuh
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Skipped tests reported by kselftest.h use a different format than KTAP,
there is no explicit test name. Normally the test name is part of the
free-form string after the SKIP keyword:

	ok 3 # SKIP test: some reason

Extend the parser to handle those correctly. Use the free-form string as
test name instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 tools/testing/kunit/kunit_parser.py                             | 8 +++++---
 tools/testing/kunit/test_data/test_is_test_passed-kselftest.log | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
index 2478beb28fc3db825855ad46200340e884da7df1..4599d23c79b79f0e219d655c7053c8c3b34f8152 100644
--- a/tools/testing/kunit/kunit_parser.py
+++ b/tools/testing/kunit/kunit_parser.py
@@ -352,9 +352,9 @@ def parse_test_plan(lines: LineStream, test: Test) -> bool:
 	lines.pop()
 	return True
 
-TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?([^#]*)( # .*)?$')
+TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?([^#]*)( # .*)?$')
 
-TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?(.*) # SKIP(.*)$')
+TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?(.*) # SKIP ?(.*)$')
 
 def peek_test_name_match(lines: LineStream, test: Test) -> bool:
 	"""
@@ -379,6 +379,8 @@ def peek_test_name_match(lines: LineStream, test: Test) -> bool:
 	if not match:
 		return False
 	name = match.group(4)
+	if not name:
+		return False
 	return name == test.name
 
 def parse_test_result(lines: LineStream, test: Test,
@@ -416,7 +418,7 @@ def parse_test_result(lines: LineStream, test: Test,
 
 	# Set name of test object
 	if skip_match:
-		test.name = skip_match.group(4)
+		test.name = skip_match.group(4) or skip_match.group(5)
 	else:
 		test.name = match.group(4)
 
diff --git a/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log b/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log
index 65d3f27feaf22a3f47ed831c4c24f6f11c625a92..30d9ef18bcec177067288d5242771236f29b7d56 100644
--- a/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log
+++ b/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log
@@ -1,5 +1,5 @@
 TAP version 13
-1..2
+1..3
 # selftests: membarrier: membarrier_test_single_thread
 # TAP version 13
 # 1..2
@@ -12,3 +12,4 @@ ok 1 selftests: membarrier: membarrier_test_single_thread
 # ok 1 sys_membarrier available
 # ok 2 sys membarrier invalid command test: command = -1, flags = 0, errno = 22. Failed as expected
 ok 2 selftests: membarrier: membarrier_test_multi_thread
+ok 3 # SKIP selftests: membarrier: membarrier_test_multi_thread

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 10/15] kunit: Always descend into kunit directory during build
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (8 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 11/15] kunit: qemu_configs: loongarch: Enable LSX/LSAX Thomas Weißschuh
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

An upcoming change will add 'userprogs' to the kunit subdirectory.
For kbuild to properly clean up these build artifacts the subdirectory
needs to be always processed.

Pushing the special logic for hook.o into the kunit Makefile also makes the
logic easier to understand.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 lib/Makefile       | 4 ----
 lib/kunit/Makefile | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/Makefile b/lib/Makefile
index c38582f187dd81916113319072e5cfef26f26c84..698566135091cc3bf0054f1954b434dc3325364a 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -108,11 +108,7 @@ test_fpu-y := test_fpu_glue.o test_fpu_impl.o
 CFLAGS_test_fpu_impl.o += $(CC_FLAGS_FPU)
 CFLAGS_REMOVE_test_fpu_impl.o += $(CC_FLAGS_NO_FPU)
 
-# Some KUnit files (hooks.o) need to be built-in even when KUnit is a module,
-# so we can't just use obj-$(CONFIG_KUNIT).
-ifdef CONFIG_KUNIT
 obj-y += kunit/
-endif
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 5aa51978e456ab3bb60c12071a26cf2bdcb1b508..656f1fa35abcc635e67d5b4cb1bc586b48415ac5 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -17,7 +17,7 @@ kunit-objs +=				debugfs.o
 endif
 
 # KUnit 'hooks' are built-in even when KUnit is built as a module.
-obj-y +=				hooks.o
+obj-$(if $(CONFIG_KUNIT),y) +=		hooks.o
 
 obj-$(CONFIG_KUNIT_TEST) +=		kunit-test.o
 obj-$(CONFIG_KUNIT_TEST) +=		platform-test.o

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 11/15] kunit: qemu_configs: loongarch: Enable LSX/LSAX
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (9 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 10/15] kunit: Always descend into kunit directory during build Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 12/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

The upcoming kunit UAPI framework will run userspace executables as part of
kunit. These may use the LSX or LASX instructions.

Make sure the kunit kernel can handle these instructions.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 tools/testing/kunit/qemu_configs/loongarch.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/kunit/qemu_configs/loongarch.py b/tools/testing/kunit/qemu_configs/loongarch.py
index a92422967d1da9f1658ef1e80d0d7365ddbae307..1dba755284f11ffc94d8946105b0cfa49cb6f604 100644
--- a/tools/testing/kunit/qemu_configs/loongarch.py
+++ b/tools/testing/kunit/qemu_configs/loongarch.py
@@ -11,6 +11,8 @@ CONFIG_PVPANIC_PCI=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_CPU_HAS_LSX=y
+CONFIG_CPU_HAS_LASX=y
 ''',
 			   qemu_arch='loongarch64',
 			   kernel_path='arch/loongarch/boot/vmlinux.elf',

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 12/15] kunit: Introduce UAPI testing framework
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (10 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 11/15] kunit: qemu_configs: loongarch: Enable LSX/LSAX Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-06-26 18:11   ` Benjamin Berg
  2025-06-26  6:10 ` [PATCH v4 13/15] kunit: uapi: Add example for UAPI tests Thomas Weißschuh
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh, Kees Cook,
	Alexander Viro, Christian Brauner, Jan Kara, linux-mm,
	linux-fsdevel

Enable running UAPI tests as part of kunit.
The selftests are embedded into the kernel image and their output is
forwarded to kunit for unified reporting.

The implementation reuses parts of usermode drivers and usermode
helpers. However these frameworks are not used directly as they make it
impossible to retrieve a thread's exit code.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

---
To: Kees Cook <kees@kernel.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: Christian Brauner <brauner@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-mm@kvack.org
Cc: linux-fsdevel@vger.kernel.org
---
 Documentation/dev-tools/kunit/api/index.rst |   5 +
 Documentation/dev-tools/kunit/api/uapi.rst  |  14 ++
 MAINTAINERS                                 |   6 +
 include/kunit/uapi.h                        |  77 +++++++
 lib/kunit/Kconfig                           |  14 ++
 lib/kunit/Makefile                          |   2 +
 lib/kunit/kunit-uapi.c                      | 300 ++++++++++++++++++++++++++++
 7 files changed, 418 insertions(+)

diff --git a/Documentation/dev-tools/kunit/api/index.rst b/Documentation/dev-tools/kunit/api/index.rst
index 5cdb552a0808f25baeff5e47a9227b7b62c69e40..34d8fee9a97059d6da919a6fb1a7e359b5e0beef 100644
--- a/Documentation/dev-tools/kunit/api/index.rst
+++ b/Documentation/dev-tools/kunit/api/index.rst
@@ -9,6 +9,7 @@ API Reference
 	test
 	resource
 	functionredirection
+	uapi
 	clk
 	of
 	platformdevice
@@ -32,6 +33,10 @@ Documentation/dev-tools/kunit/api/functionredirection.rst
 
  - Documents the KUnit Function Redirection API
 
+Documentation/dev-tools/kunit/api/uapi.rst
+
+ - Documents the KUnit Userspace testing API
+
 Driver KUnit API
 ================
 
diff --git a/Documentation/dev-tools/kunit/api/uapi.rst b/Documentation/dev-tools/kunit/api/uapi.rst
new file mode 100644
index 0000000000000000000000000000000000000000..1f01b5c6c9db42f603f6507f2f33ef388f5b91d7
--- /dev/null
+++ b/Documentation/dev-tools/kunit/api/uapi.rst
@@ -0,0 +1,14 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+==================
+Userspace Test API
+==================
+
+This file documents all of the userspace testing API.
+Userspace tests are built as :ref:`kbuild userprogs <kbuild_userprogs>`,
+linked statically and without any external dependencies.
+
+For the widest platform compatibility they should use nolibc, as provided by `init/Makefile.nolibc`.
+
+.. kernel-doc:: include/kunit/uapi.h
+   :internal:
diff --git a/MAINTAINERS b/MAINTAINERS
index e806158cc6798cf97a4aab58c038fb5351d469aa..0f60501c6de570723123b24eb930d15f1bd956eb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13540,6 +13540,12 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml
 F:	drivers/video/backlight/ktz8866.c
 
+KUNIT UAPI TESTING FRAMEWORK (in addition to KERNEL UNIT TESTING FRAMEWORK)
+M:	Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+S:	Maintained
+F:	include/kunit/uapi.h
+F:	lib/kunit/kunit-uapi.c
+
 KVM PARAVIRT (KVM/paravirt)
 M:	Paolo Bonzini <pbonzini@redhat.com>
 R:	Vitaly Kuznetsov <vkuznets@redhat.com>
diff --git a/include/kunit/uapi.h b/include/kunit/uapi.h
new file mode 100644
index 0000000000000000000000000000000000000000..a5c923f5d82a91e0acd9dc17369f84f00b7d342f
--- /dev/null
+++ b/include/kunit/uapi.h
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * KUnit Userspace testing API.
+ *
+ * Copyright (C) 2025, Linutronix GmbH.
+ * Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+ */
+
+#ifndef _KUNIT_UAPI_H
+#define _KUNIT_UAPI_H
+
+#include <linux/types.h>
+
+struct kunit;
+
+/**
+ * struct kunit_uapi_blob - Blob embedded build artifact
+ * @path: Path of the embedded artifact.
+ * @data: Start of the embedded data in memory.
+ * @end: End of the embedded data in memory.
+ */
+struct kunit_uapi_blob {
+	const char *const path;
+	const u8 *data;
+	const u8 *end;
+};
+
+#if IS_ENABLED(CONFIG_KUNIT_UAPI)
+
+/**
+ * KUNIT_UAPI_EMBED_BLOB() - Embed another build artifact into the kernel
+ * @_name: The name of symbol under which the artifact is embedded.
+ * @_path: Path to the artifact on disk.
+ *
+ * Embeds a build artifact like a userspace executable into the kernel or current module.
+ * The build artifact is read from disk and needs to be already built.
+ */
+#define KUNIT_UAPI_EMBED_BLOB(_name, _path)					\
+	asm (									\
+	"	.pushsection .rodata, \"a\"				\n"	\
+	"	.global " __stringify(CONCATENATE(_name, _data)) "	\n"	\
+	__stringify(CONCATENATE(_name, _data)) ":			\n"	\
+	"	.incbin " __stringify(_path) "				\n"	\
+	"	.size " __stringify(CONCATENATE(_name, _data)) ", "		\
+			". - " __stringify(CONCATENATE(_name, _data)) "	\n"	\
+	"	.global " __stringify(CONCATENATE(_name, _end)) "	\n"	\
+	__stringify(CONCATENATE(_name, _end)) ":			\n"	\
+	"	.popsection						\n"	\
+	);									\
+										\
+	extern const char CONCATENATE(_name, _data)[];				\
+	extern const char CONCATENATE(_name, _end)[];				\
+										\
+	static const struct kunit_uapi_blob _name = {				\
+		.path	= _path,						\
+		.data	= CONCATENATE(_name, _data),				\
+		.end	= CONCATENATE(_name, _end),				\
+	}									\
+
+#else /* !CONFIG_KUNIT_UAPI */
+
+/* Unresolved external reference, to be optimized away */
+#define KUNIT_UAPI_EMBED_BLOB(_name, _path)					\
+	extern const struct kunit_uapi_blob _name
+
+#endif /* CONFIG_KUNIT_UAPI */
+
+/**
+ * kunit_uapi_run_kselftest() - Run a userspace kselftest as part of kunit
+ * @test: The test context object.
+ * @executable: kselftest executable to run
+ *
+ * Runs the kselftest and forwards its TAP output and exit status to kunit.
+ */
+void kunit_uapi_run_kselftest(struct kunit *test, const struct kunit_uapi_blob *executable);
+
+#endif /* _KUNIT_UAPI_H */
diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig
index a97897edd9642f3e5df7fdd9dee26ee5cf00d6a4..c88e6cf5610bc8246c94d16b9025461f0cd3b2d2 100644
--- a/lib/kunit/Kconfig
+++ b/lib/kunit/Kconfig
@@ -93,4 +93,18 @@ config KUNIT_AUTORUN_ENABLED
 	  In most cases this should be left as Y. Only if additional opt-in
 	  behavior is needed should this be set to N.
 
+config KUNIT_UAPI
+	tristate "KUnit UAPI testing framework"
+	depends on KUNIT
+	depends on CC_CAN_LINK_STATIC || ARCH_HAS_NOLIBC
+	depends on !LTO_CLANG # https://github.com/llvm/llvm-project/issues/112920
+	select HEADERS_INSTALL
+	default KUNIT
+	help
+	  Enables support for building and running userspace selftests as part of kunit.
+	  These tests should be statically linked and use kselftest.h or kselftest_harness.h
+	  for status reporting.
+
+	  In most cases this should be left as Y.
+
 endif # KUNIT
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 656f1fa35abcc635e67d5b4cb1bc586b48415ac5..6059621a2d32c8e7384acda59793f05826af8c81 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -12,6 +12,8 @@ kunit-objs +=				test.o \
 					device.o \
 					platform.o
 
+obj-$(CONFIG_KUNIT_UAPI) +=		kunit-uapi.o
+
 ifeq ($(CONFIG_KUNIT_DEBUGFS),y)
 kunit-objs +=				debugfs.o
 endif
diff --git a/lib/kunit/kunit-uapi.c b/lib/kunit/kunit-uapi.c
new file mode 100644
index 0000000000000000000000000000000000000000..cfe8440e16fde942a5f0fa7ac9d8ab90a737215b
--- /dev/null
+++ b/lib/kunit/kunit-uapi.c
@@ -0,0 +1,300 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit Userspace testing API.
+ *
+ * Copyright (C) 2025, Linutronix GmbH.
+ * Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+ */
+
+#include <linux/binfmts.h>
+#include <linux/export.h>
+#include <linux/file.h>
+#include <linux/fs.h>
+#include <linux/fs_struct.h>
+#include <linux/pid.h>
+#include <linux/pipe_fs_i.h>
+#include <linux/sched/task.h>
+#include <linux/types.h>
+
+#include <kunit/test.h>
+#include <kunit/uapi.h>
+
+#define KSFT_PASS	0
+#define KSFT_FAIL	1
+#define KSFT_XFAIL	2
+#define KSFT_XPASS	3
+#define KSFT_SKIP	4
+
+static struct vfsmount *kunit_uapi_mount_ramfs(void)
+{
+	struct file_system_type *type;
+	struct vfsmount *mnt;
+
+	type = get_fs_type("ramfs");
+	if (!type)
+		return ERR_PTR(-ENODEV);
+
+	/* FIXME
+	 * The mount setup is supposed to look like this:
+	 * kunit_uapi_mount_ramfs() sets up a private mount,
+	 * with nothing visible except the new tmpfs.
+	 * Then each executable execution gets a new namespace on top of that
+	 * on which it can mount whatever it needs.
+	 * However I didn't manage to set this up, so keep everything simple
+	 * for now and let somebody familiar with the VFS figure this out.
+	 */
+
+	mnt = kern_mount(type);
+	put_filesystem(type);
+
+	return mnt;
+}
+
+static int kunit_uapi_write_file(struct vfsmount *mnt, const char *name, mode_t mode,
+				 const u8 *data, size_t size)
+{
+	struct file *file;
+	ssize_t written;
+
+	file = file_open_root_mnt(mnt, name, O_CREAT | O_WRONLY, mode);
+	if (IS_ERR(file))
+		return PTR_ERR(file);
+
+	written = kernel_write(file, data, size, NULL);
+	filp_close(file, NULL);
+	if (written != size) {
+		if (written >= 0)
+			return -ENOMEM;
+		return written;
+	}
+
+	/* Flush delayed fput so exec can open the file read-only */
+	flush_delayed_fput();
+
+	return 0;
+}
+
+static int kunit_uapi_write_executable(struct vfsmount *mnt,
+				       const struct kunit_uapi_blob *executable)
+{
+	return kunit_uapi_write_file(mnt, kbasename(executable->path), 0755,
+				     executable->data, executable->end - executable->data);
+}
+
+struct kunit_uapi_user_mode_thread_ctx {
+	const char *executable;
+
+	/* Signals mnt, out, pwd and tgid */
+	struct completion setup_done;
+	struct vfsmount *mnt;
+	struct file *out;
+	struct path pwd;
+	pid_t tgid;
+
+	/* Valid after wait(tgid) */
+	int exec_err;
+};
+
+static int kunit_uapi_user_mode_thread_init(void *data)
+{
+	struct kunit_uapi_user_mode_thread_ctx *ctx = data;
+	const char *const argv[] = {
+		ctx->executable,
+		NULL
+	};
+	struct file *out[2];
+	int err;
+
+	err = create_pipe_files(out, 0);
+	if (err)
+		return err;
+
+	/* stdin, use the *write* end to the pipe to have an unreadable input */
+	err = replace_fd(0, out[1], 0);
+	if (err < 0) {
+		fput(out[0]);
+		fput(out[1]);
+		return err;
+	}
+
+	/* stdout */
+	err = replace_fd(1, out[1], 0);
+	if (err < 0) {
+		replace_fd(0, NULL, 0);
+		fput(out[0]);
+		fput(out[1]);
+		return err;
+	}
+
+	/* stderr */
+	err = replace_fd(2, out[1], 0);
+	if (err < 0) {
+		replace_fd(0, NULL, 0);
+		replace_fd(1, NULL, 0);
+		fput(out[0]);
+		fput(out[1]);
+		return err;
+	}
+
+	fput(out[1]);
+
+	ctx->out = out[0];
+	ctx->tgid = current->tgid;
+
+	set_fs_pwd(current->fs, &ctx->pwd);
+	kernel_sigaction(SIGKILL, SIG_DFL);
+	kernel_sigaction(SIGABRT, SIG_DFL);
+
+	complete(&ctx->setup_done);
+	ctx->exec_err = kernel_execve(ctx->executable, argv, NULL);
+	if (!ctx->exec_err)
+		return 0;
+	do_exit(0);
+}
+
+static size_t kunit_uapi_printk_subtest_lines(struct kunit *test, char *buf, size_t s)
+{
+	const char *ptr = buf, *newline;
+	size_t n;
+
+	while (s) {
+		newline = strnchr(ptr, s, '\n');
+		if (!newline)
+			break;
+
+		n = newline - ptr + 1;
+
+		kunit_log(KERN_INFO, test, KUNIT_SUBSUBTEST_INDENT "%.*s", (int)n, ptr);
+		ptr += n;
+		s -= n;
+	}
+
+	memmove(buf, ptr, s);
+
+	return s;
+}
+
+static int kunit_uapi_forward_to_printk(struct kunit *test, struct file *output)
+{
+	/*
+	 * printk() automatically adds a newline after each message.
+	 * Therefore only fully accumulated lines can be forwarded.
+	 * Each line needs to fit into the buffer below.
+	 */
+	char buf[512];
+	size_t s = 0;
+	ssize_t n;
+
+	while (1) {
+		n = kernel_read(output, buf + s, sizeof(buf) - s, NULL);
+		if (n <= 0)
+			return n;
+		s = kunit_uapi_printk_subtest_lines(test, buf, s + n);
+	}
+}
+
+static void kunit_uapi_kill_pid(pid_t pid)
+{
+	struct pid *p;
+
+	p = find_get_pid(pid);
+	kill_pid(p, SIGKILL, 1);
+	put_pid(p);
+}
+
+static int kunit_uapi_run_executable_in_mount(struct kunit *test, const char *executable,
+						   struct vfsmount *mnt)
+{
+	struct kunit_uapi_user_mode_thread_ctx ctx = {
+		.setup_done	= COMPLETION_INITIALIZER_ONSTACK(ctx.setup_done),
+		.executable	= executable,
+		.pwd		= {
+			.mnt	= mnt,
+			.dentry	= mnt->mnt_root,
+		},
+	};
+	int forward_err, wait_err, ret;
+	pid_t pid;
+
+	/* If SIGCHLD is ignored do_wait won't populate the status. */
+	kernel_sigaction(SIGCHLD, SIG_DFL);
+	pid = user_mode_thread(kunit_uapi_user_mode_thread_init, &ctx, SIGCHLD);
+	if (pid < 0) {
+		kernel_sigaction(SIGCHLD, SIG_IGN);
+		return pid;
+	}
+
+	wait_for_completion(&ctx.setup_done);
+
+	forward_err = kunit_uapi_forward_to_printk(test, ctx.out);
+	if (forward_err)
+		kunit_uapi_kill_pid(ctx.tgid);
+
+	wait_err = kernel_wait(ctx.tgid, &ret);
+
+	/* Restore default kernel sig handler */
+	kernel_sigaction(SIGCHLD, SIG_IGN);
+
+	if (ctx.exec_err)
+		return ctx.exec_err;
+	if (forward_err)
+		return forward_err;
+	if (wait_err < 0)
+		return wait_err;
+	return ret;
+}
+
+static int kunit_uapi_run_executable(struct kunit *test,
+				     const struct kunit_uapi_blob *executable)
+{
+	const char *exe_name = kbasename(executable->path);
+	struct vfsmount *mnt;
+	int err;
+
+	mnt = kunit_uapi_mount_ramfs();
+	if (IS_ERR(mnt))
+		return PTR_ERR(mnt);
+
+	err = kunit_uapi_write_executable(mnt, executable);
+
+	if (!err)
+		err = kunit_uapi_run_executable_in_mount(test, exe_name, mnt);
+
+	kern_unmount(mnt);
+
+	return err;
+}
+
+void kunit_uapi_run_kselftest(struct kunit *test, const struct kunit_uapi_blob *executable)
+{
+	u8 exit_code, exit_signal;
+	int err;
+
+	err = kunit_uapi_run_executable(test, executable);
+	if (err < 0)
+		KUNIT_FAIL_AND_ABORT(test, "Could not run test executable: %pe\n", ERR_PTR(err));
+
+	exit_code = err >> 8;
+	exit_signal = err & 0xff;
+
+	if (exit_signal)
+		KUNIT_FAIL_AND_ABORT(test, "kselftest exited with signal: %d\n", exit_signal);
+	else if (exit_code == KSFT_PASS)
+		; /* Noop */
+	else if (exit_code == KSFT_FAIL)
+		KUNIT_FAIL_AND_ABORT(test, "kselftest exited with code KSFT_FAIL\n");
+	else if (exit_code == KSFT_XPASS)
+		KUNIT_FAIL_AND_ABORT(test, "kselftest exited with code KSFT_XPASS\n");
+	else if (exit_code == KSFT_XFAIL)
+		; /* Noop */
+	else if (exit_code == KSFT_SKIP)
+		kunit_mark_skipped(test, "kselftest exited with code KSFT_SKIP\n");
+	else
+		KUNIT_FAIL_AND_ABORT(test, "kselftest exited with unknown exit code: %d\n",
+				     exit_code);
+}
+EXPORT_SYMBOL_GPL(kunit_uapi_run_kselftest);
+
+MODULE_DESCRIPTION("KUnit UAPI testing framework");
+MODULE_AUTHOR("Thomas Weißschuh <thomas.weissschuh@linutronix.de");
+MODULE_LICENSE("GPL");

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 13/15] kunit: uapi: Add example for UAPI tests
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (11 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 12/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-06-26  6:10 ` [PATCH v4 14/15] kunit: uapi: Introduce preinit executable Thomas Weißschuh
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Extend the example to show how to run a userspace executable.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 MAINTAINERS                    |  1 +
 lib/kunit/Makefile             |  9 +++++++++
 lib/kunit/kunit-example-test.c | 15 +++++++++++++++
 lib/kunit/kunit-example-uapi.c | 22 ++++++++++++++++++++++
 4 files changed, 47 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0f60501c6de570723123b24eb930d15f1bd956eb..b1405f0a0e638d1654d9dc9e51d784ddc838cf5b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13544,6 +13544,7 @@ KUNIT UAPI TESTING FRAMEWORK (in addition to KERNEL UNIT TESTING FRAMEWORK)
 M:	Thomas Weißschuh <thomas.weissschuh@linutronix.de>
 S:	Maintained
 F:	include/kunit/uapi.h
+F:	lib/kunit/kunit-example-uapi.c
 F:	lib/kunit/kunit-uapi.c
 
 KVM PARAVIRT (KVM/paravirt)
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 6059621a2d32c8e7384acda59793f05826af8c81..1bba7965613e36e26939d6b31e1d65acf5bad0dc 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -1,3 +1,5 @@
+include $(srctree)/init/Makefile.nolibc
+
 obj-$(CONFIG_KUNIT) +=			kunit.o
 
 kunit-objs +=				test.o \
@@ -31,3 +33,10 @@ obj-$(CONFIG_KUNIT_TEST) +=		assert_test.o
 endif
 
 obj-$(CONFIG_KUNIT_EXAMPLE_TEST) +=	kunit-example-test.o
+
+userprogs +=				kunit-example-uapi
+kunit-example-uapi-userccflags :=	-static $(NOLIBC_USERCFLAGS)
+
+ifdef CONFIG_KUNIT_UAPI
+$(obj)/kunit-example-test.o: $(obj)/kunit-example-uapi
+endif
diff --git a/lib/kunit/kunit-example-test.c b/lib/kunit/kunit-example-test.c
index 3056d6bc705d0a8f196f0f4412e679dbb0e03114..0c5e1e59f9358b84aee2621e342d824a2f99f9aa 100644
--- a/lib/kunit/kunit-example-test.c
+++ b/lib/kunit/kunit-example-test.c
@@ -8,6 +8,7 @@
 
 #include <kunit/test.h>
 #include <kunit/static_stub.h>
+#include <kunit/uapi.h>
 
 /*
  * This is the most fundamental element of KUnit, the test case. A test case
@@ -277,6 +278,19 @@ static void example_slow_test(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 1 + 1, 2);
 }
 
+/*
+ * This test shows the usage of UAPI tests.
+ */
+static void example_uapi_test(struct kunit *test)
+{
+	KUNIT_UAPI_EMBED_BLOB(kunit_example_uapi, "kunit-example-uapi");
+
+	if (IS_ENABLED(CONFIG_KUNIT_UAPI))
+		kunit_uapi_run_kselftest(test, &kunit_example_uapi);
+	else
+		kunit_skip(test, "CONFIG_KUNIT_UAPI is not enabled");
+}
+
 /*
  * Here we make a list of all the test cases we want to add to the test suite
  * below.
@@ -297,6 +311,7 @@ static struct kunit_case example_test_cases[] = {
 	KUNIT_CASE(example_priv_test),
 	KUNIT_CASE_PARAM(example_params_test, example_gen_params),
 	KUNIT_CASE_SLOW(example_slow_test),
+	KUNIT_CASE(example_uapi_test),
 	{}
 };
 
diff --git a/lib/kunit/kunit-example-uapi.c b/lib/kunit/kunit-example-uapi.c
new file mode 100644
index 0000000000000000000000000000000000000000..4ce657050dd4a576632a41ca0309c4cb5134ce14
--- /dev/null
+++ b/lib/kunit/kunit-example-uapi.c
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit Userspace example test.
+ *
+ * Copyright (C) 2025, Linutronix GmbH.
+ * Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+ *
+ * This is *userspace* code.
+ */
+
+#include "../../tools/testing/selftests/kselftest.h"
+
+int main(void)
+{
+	ksft_print_header();
+	ksft_set_plan(4);
+	ksft_test_result_pass("userspace test 1\n");
+	ksft_test_result_pass("userspace test 2\n");
+	ksft_test_result_skip("userspace test 3: some reason\n");
+	ksft_test_result_pass("userspace test 4\n");
+	ksft_finished();
+}

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 14/15] kunit: uapi: Introduce preinit executable
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (12 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 13/15] kunit: uapi: Add example for UAPI tests Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-12  9:49   ` Muhammad Usama Anjum
  2025-06-26  6:10 ` [PATCH v4 15/15] kunit: uapi: Validate usability of /proc Thomas Weißschuh
  2025-07-07 18:18 ` [PATCH v4 00/15] kunit: Introduce UAPI testing framework Jonathan Corbet
  15 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

UAPI selftests may expect a "normal" userspace environment.
For example the normal kernel API pseudo-filesystems should be mounted.
This could be done from kernel code but it is non-idiomatic.

Add a preinit userspace executable which performs these setup steps
before running the final test executable.
This preinit executable is only ever run from the kernel.
Give it access to autoconf.h and kconfig.h to adapt itself to the
tested kernel.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
---
 MAINTAINERS              |  1 +
 lib/kunit/Makefile       |  6 +++++
 lib/kunit/kunit-uapi.c   |  9 +++++--
 lib/kunit/uapi-preinit.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index b1405f0a0e638d1654d9dc9e51d784ddc838cf5b..e81dfa180ab374ef91c7a45e546e6e9a8f454fa7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13546,6 +13546,7 @@ S:	Maintained
 F:	include/kunit/uapi.h
 F:	lib/kunit/kunit-example-uapi.c
 F:	lib/kunit/kunit-uapi.c
+F:	lib/kunit/uapi-preinit.c
 
 KVM PARAVIRT (KVM/paravirt)
 M:	Paolo Bonzini <pbonzini@redhat.com>
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index 1bba7965613e36e26939d6b31e1d65acf5bad0dc..b50f3bc8bc7f3ade03be4900d9163d7a0d96863c 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -14,8 +14,14 @@ kunit-objs +=				test.o \
 					device.o \
 					platform.o
 
+userprogs +=				uapi-preinit
+uapi-preinit-userccflags +=		-static $(NOLIBC_USERCFLAGS) \
+					-include include/generated/autoconf.h \
+					-include $(srctree)/tools/include/linux/kconfig.h
 obj-$(CONFIG_KUNIT_UAPI) +=		kunit-uapi.o
 
+$(obj)/kunit-uapi.o: $(obj)/uapi-preinit
+
 ifeq ($(CONFIG_KUNIT_DEBUGFS),y)
 kunit-objs +=				debugfs.o
 endif
diff --git a/lib/kunit/kunit-uapi.c b/lib/kunit/kunit-uapi.c
index cfe8440e16fde942a5f0fa7ac9d8ab90a737215b..7c87605b9ded9dbeb3968af8a8f4650ab5938887 100644
--- a/lib/kunit/kunit-uapi.c
+++ b/lib/kunit/kunit-uapi.c
@@ -25,6 +25,8 @@
 #define KSFT_XPASS	3
 #define KSFT_SKIP	4
 
+KUNIT_UAPI_EMBED_BLOB(kunit_uapi_preinit, "uapi-preinit");
+
 static struct vfsmount *kunit_uapi_mount_ramfs(void)
 {
 	struct file_system_type *type;
@@ -146,7 +148,7 @@ static int kunit_uapi_user_mode_thread_init(void *data)
 	kernel_sigaction(SIGABRT, SIG_DFL);
 
 	complete(&ctx->setup_done);
-	ctx->exec_err = kernel_execve(ctx->executable, argv, NULL);
+	ctx->exec_err = kernel_execve(kbasename(kunit_uapi_preinit.path), argv, NULL);
 	if (!ctx->exec_err)
 		return 0;
 	do_exit(0);
@@ -255,7 +257,10 @@ static int kunit_uapi_run_executable(struct kunit *test,
 	if (IS_ERR(mnt))
 		return PTR_ERR(mnt);
 
-	err = kunit_uapi_write_executable(mnt, executable);
+	err = kunit_uapi_write_executable(mnt, &kunit_uapi_preinit);
+
+	if (!err)
+		err = kunit_uapi_write_executable(mnt, executable);
 
 	if (!err)
 		err = kunit_uapi_run_executable_in_mount(test, exe_name, mnt);
diff --git a/lib/kunit/uapi-preinit.c b/lib/kunit/uapi-preinit.c
new file mode 100644
index 0000000000000000000000000000000000000000..81182039965a8c93aebb2d5d76f4113bfef277a6
--- /dev/null
+++ b/lib/kunit/uapi-preinit.c
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit Userspace environment setup.
+ *
+ * Copyright (C) 2025, Linutronix GmbH.
+ * Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+ *
+ * This is *userspace* code.
+ */
+
+#include <sys/mount.h>
+#include <sys/stat.h>
+
+#include "../../tools/testing/selftests/kselftest.h"
+
+static int setup_api_mount(const char *target, const char *fstype)
+{
+	int ret;
+
+	ret = mkdir(target, 0755);
+	if (ret && errno != EEXIST)
+		return -errno;
+
+	ret = mount("none", target, fstype, 0, NULL);
+	if (ret && errno != EBUSY)
+		return -errno;
+
+	return 0;
+}
+
+static void exit_failure(const char *stage, int err)
+{
+	/* If preinit fails synthesize a failed test report. */
+	ksft_print_header();
+	ksft_set_plan(1);
+	ksft_test_result_fail("Failed during test setup: %s: %s\n", stage, strerror(-err));
+	ksft_finished();
+}
+
+int main(int argc, char **argv, char **envp)
+{
+	int ret;
+
+	ret = setup_api_mount("/proc", "proc");
+	if (ret)
+		exit_failure("mount /proc", ret);
+
+	ret = setup_api_mount("/sys", "sysfs");
+	if (ret)
+		exit_failure("mount /sys", ret);
+
+	if (IS_ENABLED(CONFIG_DEVTMPFS)) {
+		ret = setup_api_mount("/dev", "devtmpfs");
+		if (ret)
+			exit_failure("mount /dev", ret);
+	}
+
+	ret = execve(argv[0], argv, envp);
+	if (ret)
+		exit_failure("execve", ret);
+
+	return 0;
+}

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH v4 15/15] kunit: uapi: Validate usability of /proc
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (13 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 14/15] kunit: uapi: Introduce preinit executable Thomas Weißschuh
@ 2025-06-26  6:10 ` Thomas Weißschuh
  2025-07-07 18:18 ` [PATCH v4 00/15] kunit: Introduce UAPI testing framework Jonathan Corbet
  15 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-26  6:10 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh

Show that the selftests are executed from a fairly "normal"
userspace context.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 MAINTAINERS                 |  1 +
 lib/kunit/Makefile          |  8 +++++++
 lib/kunit/kunit-test-uapi.c | 51 +++++++++++++++++++++++++++++++++++++++++++++
 lib/kunit/kunit-test.c      | 23 +++++++++++++++++++-
 4 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e81dfa180ab374ef91c7a45e546e6e9a8f454fa7..d86e8e0bfee75acecfeb9569d53ea8ea99727985 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13545,6 +13545,7 @@ M:	Thomas Weißschuh <thomas.weissschuh@linutronix.de>
 S:	Maintained
 F:	include/kunit/uapi.h
 F:	lib/kunit/kunit-example-uapi.c
+F:	lib/kunit/kunit-test-uapi.c
 F:	lib/kunit/kunit-uapi.c
 F:	lib/kunit/uapi-preinit.c
 
diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
index b50f3bc8bc7f3ade03be4900d9163d7a0d96863c..25384e5c3c4cd1f92e4ec2c3830e0be1c6732ac1 100644
--- a/lib/kunit/Makefile
+++ b/lib/kunit/Makefile
@@ -30,6 +30,14 @@ endif
 obj-$(if $(CONFIG_KUNIT),y) +=		hooks.o
 
 obj-$(CONFIG_KUNIT_TEST) +=		kunit-test.o
+
+userprogs +=				kunit-test-uapi
+kunit-test-uapi-userccflags :=		-static $(NOLIBC_USERCFLAGS)
+
+ifdef CONFIG_KUNIT_UAPI
+$(obj)/kunit-test.o: $(obj)/kunit-test-uapi
+endif
+
 obj-$(CONFIG_KUNIT_TEST) +=		platform-test.o
 
 # string-stream-test compiles built-in only.
diff --git a/lib/kunit/kunit-test-uapi.c b/lib/kunit/kunit-test-uapi.c
new file mode 100644
index 0000000000000000000000000000000000000000..ec5395d809ee2a4bd3c47a573a576e2f98ef5c1b
--- /dev/null
+++ b/lib/kunit/kunit-test-uapi.c
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit Userspace selftest.
+ *
+ * Copyright (C) 2025, Linutronix GmbH.
+ * Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+ *
+ * This is *userspace* code.
+ */
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "../../tools/testing/selftests/kselftest.h"
+
+static void test_procfs(void)
+{
+	char buf[256];
+	ssize_t r;
+	int fd;
+
+	fd = open("/proc/self/comm", O_RDONLY);
+	if (fd == -1) {
+		ksft_test_result_fail("procfs: open() failed: %s\n", strerror(errno));
+		return;
+	}
+
+	r = read(fd, buf, sizeof(buf));
+	close(fd);
+
+	if (r == -1) {
+		ksft_test_result_fail("procfs: read() failed: %s\n", strerror(errno));
+		return;
+	}
+
+	if (r != 16 || strncmp("kunit-test-uapi\n", buf, 16) != 0) {
+		ksft_test_result_fail("procfs: incorrect comm\n");
+		return;
+	}
+
+	ksft_test_result_pass("procfs\n");
+}
+
+int main(void)
+{
+	ksft_print_header();
+	ksft_set_plan(1);
+	test_procfs();
+	ksft_finished();
+}
diff --git a/lib/kunit/kunit-test.c b/lib/kunit/kunit-test.c
index d9c781c859fde1f3623eb71b6829e82aa4803762..03972a3cb172d4af61bec17be800ddfb4bbd7268 100644
--- a/lib/kunit/kunit-test.c
+++ b/lib/kunit/kunit-test.c
@@ -8,6 +8,7 @@
 #include "linux/gfp_types.h"
 #include <kunit/test.h>
 #include <kunit/test-bug.h>
+#include <kunit/uapi.h>
 
 #include <linux/device.h>
 #include <kunit/device.h>
@@ -868,10 +869,30 @@ static struct kunit_suite kunit_current_test_suite = {
 	.test_cases = kunit_current_test_cases,
 };
 
+static void kunit_uapi_test(struct kunit *test)
+{
+	KUNIT_UAPI_EMBED_BLOB(kunit_test_uapi, "kunit-test-uapi");
+
+	if (IS_ENABLED(CONFIG_KUNIT_UAPI))
+		kunit_uapi_run_kselftest(test, &kunit_test_uapi);
+	else
+		kunit_skip(test, "CONFIG_KUNIT_UAPI is not enabled");
+}
+
+static struct kunit_case kunit_uapi_test_cases[] = {
+	KUNIT_CASE(kunit_uapi_test),
+	{}
+};
+
+static struct kunit_suite kunit_uapi_test_suite = {
+	.name = "kunit_uapi",
+	.test_cases = kunit_uapi_test_cases,
+};
+
 kunit_test_suites(&kunit_try_catch_test_suite, &kunit_resource_test_suite,
 		  &kunit_log_test_suite, &kunit_status_test_suite,
 		  &kunit_current_test_suite, &kunit_device_test_suite,
-		  &kunit_fault_test_suite);
+		  &kunit_fault_test_suite, &kunit_uapi_test_suite);
 
 MODULE_DESCRIPTION("KUnit test for core test infrastructure");
 MODULE_LICENSE("GPL v2");

-- 
2.50.0


^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 12/15] kunit: Introduce UAPI testing framework
  2025-06-26  6:10 ` [PATCH v4 12/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
@ 2025-06-26 18:11   ` Benjamin Berg
  2025-06-27  4:20     ` Thomas Weißschuh
  0 siblings, 1 reply; 38+ messages in thread
From: Benjamin Berg @ 2025-06-26 18:11 UTC (permalink / raw)
  To: Thomas Weißschuh, Masahiro Yamada, Nathan Chancellor,
	Andrew Morton, Willy Tarreau, Thomas Weißschuh,
	Brendan Higgins, David Gow, Rae Moar, Shuah Khan, Jonathan Corbet,
	Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Kees Cook, Alexander Viro,
	Christian Brauner, Jan Kara, linux-mm, linux-fsdevel

Hi Thomas,

I ran into two minor issues trying out the patches, see inline.

On Thu, 2025-06-26 at 08:10 +0200, Thomas Weißschuh wrote:
> Enable running UAPI tests as part of kunit.
> The selftests are embedded into the kernel image and their output is
> forwarded to kunit for unified reporting.
> 
> The implementation reuses parts of usermode drivers and usermode
> helpers. However these frameworks are not used directly as they make it
> impossible to retrieve a thread's exit code.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> 
> [SNIP]
> +/**
> + * KUNIT_UAPI_EMBED_BLOB() - Embed another build artifact into the kernel
> + * @_name: The name of symbol under which the artifact is embedded.
> + * @_path: Path to the artifact on disk.
> + *
> + * Embeds a build artifact like a userspace executable into the kernel or current module.
> + * The build artifact is read from disk and needs to be already built.
> + */
> +#define KUNIT_UAPI_EMBED_BLOB(_name, _path)					\
> +	asm (									\
> +	"	.pushsection .rodata, \"a\"				\n"	\
> +	"	.global " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> +	__stringify(CONCATENATE(_name, _data)) ":			\n"	\
> +	"	.incbin " __stringify(_path) "				\n"	\
> +	"	.size " __stringify(CONCATENATE(_name, _data)) ", "		\
> +			". - " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> +	"	.global " __stringify(CONCATENATE(_name, _end)) "	\n"	\
> +	__stringify(CONCATENATE(_name, _end)) ":			\n"	\
> +	"	.popsection						\n"	\
> +	);									\
> +										\
> +	extern const char CONCATENATE(_name, _data)[];				\
> +	extern const char CONCATENATE(_name, _end)[];				\
> +										\
> +	static const struct kunit_uapi_blob _name = {				\
> +		.path	= _path,						\
> +		.data	= CONCATENATE(_name, _data),				\
> +		.end	= CONCATENATE(_name, _end),				\
> +	}									\

For me, the compiler could not find the files for the ".incbin" unless
I added an include path. i.e. adding
  ccflags-y := -I$(obj)
to lib/kunit/Makefile fixed the problem for me.

> [SNIP]
> +static int kunit_uapi_run_executable_in_mount(struct kunit *test, const char *executable,
> +						   struct vfsmount *mnt)
> +{
> +	struct kunit_uapi_user_mode_thread_ctx ctx = {
> +		.setup_done	= COMPLETION_INITIALIZER_ONSTACK(ctx.setup_done),
> +		.executable	= executable,
> +		.pwd		= {
> +			.mnt	= mnt,
> +			.dentry	= mnt->mnt_root,
> +		},
> +	};
> +	int forward_err, wait_err, ret;

ret needs to be initialized to zero here as the kernel_wait function
will only set "ret" if wo.wo_stat is non-zero.

Benjamin

> [SNIP]


^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 12/15] kunit: Introduce UAPI testing framework
  2025-06-26 18:11   ` Benjamin Berg
@ 2025-06-27  4:20     ` Thomas Weißschuh
  2025-06-27  6:58       ` Benjamin Berg
  0 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-27  4:20 UTC (permalink / raw)
  To: Benjamin Berg
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows, Kees Cook, Alexander Viro, Christian Brauner, Jan Kara,
	linux-mm, linux-fsdevel

Hi Benjamin,

On Thu, Jun 26, 2025 at 08:11:17PM +0200, Benjamin Berg wrote:
> I ran into two minor issues trying out the patches, see inline.

Thanks for testing the series.

> On Thu, 2025-06-26 at 08:10 +0200, Thomas Weißschuh wrote:
> > Enable running UAPI tests as part of kunit.
> > The selftests are embedded into the kernel image and their output is
> > forwarded to kunit for unified reporting.
> > 
> > The implementation reuses parts of usermode drivers and usermode
> > helpers. However these frameworks are not used directly as they make it
> > impossible to retrieve a thread's exit code.
> > 
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > 
> > [SNIP]
> > +/**
> > + * KUNIT_UAPI_EMBED_BLOB() - Embed another build artifact into the kernel
> > + * @_name: The name of symbol under which the artifact is embedded.
> > + * @_path: Path to the artifact on disk.
> > + *
> > + * Embeds a build artifact like a userspace executable into the kernel or current module.
> > + * The build artifact is read from disk and needs to be already built.
> > + */
> > +#define KUNIT_UAPI_EMBED_BLOB(_name, _path)					\
> > +	asm (									\
> > +	"	.pushsection .rodata, \"a\"				\n"	\
> > +	"	.global " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> > +	__stringify(CONCATENATE(_name, _data)) ":			\n"	\
> > +	"	.incbin " __stringify(_path) "				\n"	\
> > +	"	.size " __stringify(CONCATENATE(_name, _data)) ", "		\
> > +			". - " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> > +	"	.global " __stringify(CONCATENATE(_name, _end)) "	\n"	\
> > +	__stringify(CONCATENATE(_name, _end)) ":			\n"	\
> > +	"	.popsection						\n"	\
> > +	);									\
> > +										\
> > +	extern const char CONCATENATE(_name, _data)[];				\
> > +	extern const char CONCATENATE(_name, _end)[];				\
> > +										\
> > +	static const struct kunit_uapi_blob _name = {				\
> > +		.path	= _path,						\
> > +		.data	= CONCATENATE(_name, _data),				\
> > +		.end	= CONCATENATE(_name, _end),				\
> > +	}									\
> 
> For me, the compiler could not find the files for the ".incbin" unless
> I added an include path. i.e. adding
>   ccflags-y := -I$(obj)
> to lib/kunit/Makefile fixed the problem for me.

Can you share some more details on your build setup?
This worked for me as-is and also passed 0day build testing.

> > [SNIP]
> > +static int kunit_uapi_run_executable_in_mount(struct kunit *test, const char *executable,
> > +						   struct vfsmount *mnt)
> > +{
> > +	struct kunit_uapi_user_mode_thread_ctx ctx = {
> > +		.setup_done	= COMPLETION_INITIALIZER_ONSTACK(ctx.setup_done),
> > +		.executable	= executable,
> > +		.pwd		= {
> > +			.mnt	= mnt,
> > +			.dentry	= mnt->mnt_root,
> > +		},
> > +	};
> > +	int forward_err, wait_err, ret;
> 
> ret needs to be initialized to zero here as the kernel_wait function
> will only set "ret" if wo.wo_stat is non-zero.

Ack.

> > [SNIP]


Thomas

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 12/15] kunit: Introduce UAPI testing framework
  2025-06-27  4:20     ` Thomas Weißschuh
@ 2025-06-27  6:58       ` Benjamin Berg
  2025-06-27  8:27         ` Thomas Weißschuh
  0 siblings, 1 reply; 38+ messages in thread
From: Benjamin Berg @ 2025-06-27  6:58 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows, Kees Cook, Alexander Viro, Christian Brauner, Jan Kara,
	linux-mm, linux-fsdevel

[-- Attachment #1: Type: text/plain, Size: 3595 bytes --]

Hi,

On Fri, 2025-06-27 at 06:20 +0200, Thomas Weißschuh wrote:
> On Thu, Jun 26, 2025 at 08:11:17PM +0200, Benjamin Berg wrote:
> > I ran into two minor issues trying out the patches, see inline.
> 
> Thanks for testing the series.
> 
> > On Thu, 2025-06-26 at 08:10 +0200, Thomas Weißschuh wrote:
> > > Enable running UAPI tests as part of kunit.
> > > The selftests are embedded into the kernel image and their output is
> > > forwarded to kunit for unified reporting.
> > > 
> > > The implementation reuses parts of usermode drivers and usermode
> > > helpers. However these frameworks are not used directly as they make it
> > > impossible to retrieve a thread's exit code.
> > > 
> > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > > 
> > > [SNIP]
> > > +/**
> > > + * KUNIT_UAPI_EMBED_BLOB() - Embed another build artifact into the kernel
> > > + * @_name: The name of symbol under which the artifact is embedded.
> > > + * @_path: Path to the artifact on disk.
> > > + *
> > > + * Embeds a build artifact like a userspace executable into the kernel or current module.
> > > + * The build artifact is read from disk and needs to be already built.
> > > + */
> > > +#define KUNIT_UAPI_EMBED_BLOB(_name, _path)					\
> > > +	asm (									\
> > > +	"	.pushsection .rodata, \"a\"				\n"	\
> > > +	"	.global " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> > > +	__stringify(CONCATENATE(_name, _data)) ":			\n"	\
> > > +	"	.incbin " __stringify(_path) "				\n"	\
> > > +	"	.size " __stringify(CONCATENATE(_name, _data)) ", "		\
> > > +			". - " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> > > +	"	.global " __stringify(CONCATENATE(_name, _end)) "	\n"	\
> > > +	__stringify(CONCATENATE(_name, _end)) ":			\n"	\
> > > +	"	.popsection						\n"	\
> > > +	);									\
> > > +										\
> > > +	extern const char CONCATENATE(_name, _data)[];				\
> > > +	extern const char CONCATENATE(_name, _end)[];				\
> > > +										\
> > > +	static const struct kunit_uapi_blob _name = {				\
> > > +		.path	= _path,						\
> > > +		.data	= CONCATENATE(_name, _data),				\
> > > +		.end	= CONCATENATE(_name, _end),				\
> > > +	}									\
> > 
> > For me, the compiler could not find the files for the ".incbin" unless
> > I added an include path. i.e. adding
> >   ccflags-y := -I$(obj)
> > to lib/kunit/Makefile fixed the problem for me.
> 
> Can you share some more details on your build setup?
> This worked for me as-is and also passed 0day build testing.

Funny, I ran this on a Fedora 41 with gcc --version saying
gcc (GCC) 14.3.1 20250523 (Red Hat 14.3.1-1)

I tried both 32 and 64 bit builds for ARCH=um.

Attaching my current kernel configuration and the last few lines of a
V=1 build.

The kernel I used is a bit newer than what you had. Applied on top of
ee88bddf7f2f5d1f1da87dd7bedc734048b70e88 (bpf-fixes merge).

Benjamin


> > > [SNIP]
> > > +static int kunit_uapi_run_executable_in_mount(struct kunit *test, const char *executable,
> > > +						   struct vfsmount *mnt)
> > > +{
> > > +	struct kunit_uapi_user_mode_thread_ctx ctx = {
> > > +		.setup_done	= COMPLETION_INITIALIZER_ONSTACK(ctx.setup_done),
> > > +		.executable	= executable,
> > > +		.pwd		= {
> > > +			.mnt	= mnt,
> > > +			.dentry	= mnt->mnt_root,
> > > +		},
> > > +	};
> > > +	int forward_err, wait_err, ret;
> > 
> > ret needs to be initialized to zero here as the kernel_wait function
> > will only set "ret" if wo.wo_stat is non-zero.
> 
> Ack.
> 
> > > [SNIP]
> 
> 
> Thomas
> 


[-- Attachment #2: build.log --]
[-- Type: text/x-log, Size: 3166 bytes --]


make -f ./scripts/Makefile.build obj=lib \
need-builtin=1 \
need-modorder=1 \

make -f ./scripts/Makefile.build obj=lib/kunit \
need-builtin=1 \
need-modorder=1 \

# CC      lib/kunit/kunit-uapi.o
  gcc -Wp,-MMD,lib/kunit/.kunit-uapi.o.d -nostdinc -I./arch/um/include -I./arch/um/include/generated -I./include -I./include -I./arch/um/include/uapi -I./arch/um/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -m64 -I./arch/x86/um -I./arch/x86/include -I./arch/x86/include/uapi -I./arch/x86/include/generated -I./arch/x86/include/generated/uapi -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mcmodel=large -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-builtin -m64 -D__arch_um__ -I./arch/um/include/shared -I./arch/x86/um/shared -I./arch/um/include/shared/skas -Dvmap=kernel_vmap -Dlongjmp=kernel_longjmp -Dsetjmp=kernel_setjmp -Din6addr_loopback=kernel_in6addr_loopback -Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr -D__close_range=kernel__close_range -D_LARGEFILE64_SOURCE -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -Dmktime=kernel_mktime -fno-delete-null-pointer-checks -Os -fno-allow-store-data-races -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=1536 -Wno-main -Wno-dangling-pointer -Wvla-larger-than=1 -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-stringop-overflow -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gz=zlib -DGCC_PLUGINS   -fsanitize=bounds-strict -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=bool -fsanitize=enum      -DKBUILD_MODFILE='"lib/kunit/kunit-uapi"' -DKBUILD_BASENAME='"kunit_uapi"' -DKBUILD_MODNAME='"kunit_uapi"' -D__KBUILD_MODNAME=kmod_kunit_uapi -c -o lib/kunit/kunit-uapi.o lib/kunit/kunit-uapi.c  
/tmp/ccxwhSuj.s: Assembler messages:
/tmp/ccxwhSuj.s:9: Error: file not found: uapi-preinit
make[4]: *** [scripts/Makefile.build:287: lib/kunit/kunit-uapi.o] Error 1
make[3]: *** [scripts/Makefile.build:554: lib/kunit] Error 2
make[2]: *** [scripts/Makefile.build:554: lib] Error 2
make[1]: *** [/home/bergbenj/Projects/linux/Makefile:2004: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2

[-- Attachment #3: .config --]
[-- Type: text/plain, Size: 53893 bytes --]

#
# Automatically generated file; DO NOT EDIT.
# Linux/um 6.16.0-rc3 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.3.1 20250523 (Red Hat 14.3.1-1)"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140301
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24050
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24050
CONFIG_LLD_VERSION=0
CONFIG_RUSTC_VERSION=108700
CONFIG_RUSTC_LLVM_VERSION=190107
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_ARCH_HAS_NOLIBC=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
CONFIG_RUSTC_HAS_COERCE_POINTEE=y
CONFIG_PAHOLE_VERSION=130
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=128
# CONFIG_WERROR is not set
CONFIG_UAPI_HEADER_TEST=y
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
CONFIG_DEFAULT_INIT=""
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_WATCH_QUEUE is not set
CONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_AUDIT is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_SHOW=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem

CONFIG_GENERIC_CLOCKEVENTS=y
# CONFIG_TIME_KUNIT_TEST is not set

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem

CONFIG_BPF=y

#
# BPF subsystem
#
# CONFIG_BPF_SYSCALL is not set
# end of BPF subsystem

CONFIG_PREEMPT_VOLUNTARY_BUILD=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_COUNT=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
# CONFIG_TASKSTATS is not set
# CONFIG_PSI is not set
# end of CPU/Task time and stats accounting

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
CONFIG_RCU_EXPERT=y
CONFIG_TINY_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
# CONFIG_FORCE_TASKS_RCU is not set
CONFIG_NEED_TASKS_RCU=y
# CONFIG_FORCE_TASKS_RUDE_RCU is not set
# CONFIG_FORCE_TASKS_TRACE_RCU is not set
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_NEED_SEGCBLIST=y
CONFIG_TASKS_TRACE_RCU_READ_MB=y
# CONFIG_RCU_DOUBLE_CHECK_CB_TIME is not set
# end of RCU Subsystem

CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_IKHEADERS is not set
CONFIG_LOG_BUF_SHIFT=18
# CONFIG_PRINTK_INDEX is not set

#
# Scheduler features
#
# end of Scheduler features

CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
CONFIG_CC_NO_STRINGOP_OVERFLOW=y
CONFIG_CGROUPS=y
# CONFIG_CGROUP_FAVOR_DYNMODS is not set
# CONFIG_MEMCG is not set
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_SCHED=y
CONFIG_GROUP_SCHED_WEIGHT=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
# CONFIG_RT_GROUP_SCHED is not set
# CONFIG_CGROUP_PIDS is not set
# CONFIG_CGROUP_RDMA is not set
# CONFIG_CGROUP_DMEM is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
# CONFIG_CGROUP_MISC is not set
# CONFIG_CGROUP_DEBUG is not set
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_NET_NS=y
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BOOT_CONFIG is not set
CONFIG_INITRAMFS_PRESERVE_MTIME=y
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_HAVE_UID16=y
CONFIG_SYSFS_SYSCALL=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_MULTIUSER=y
# CONFIG_SGETMASK_SYSCALL is not set
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
# CONFIG_BASE_SMALL is not set
CONFIG_FUTEX=y
CONFIG_FUTEX_PI=y
CONFIG_FUTEX_PRIVATE_HASH=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_IO_URING=y
# CONFIG_GCOV_PROFILE_URING is not set
CONFIG_ADVISE_SYSCALLS=y
CONFIG_MEMBARRIER=y
# CONFIG_KCMP is not set
CONFIG_CACHESTAT_SYSCALL=y
# CONFIG_PC104 is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_SELFTEST is not set
CONFIG_KALLSYMS_ALL=y

#
# Kernel Performance Events And Counters
#
# end of Kernel Performance Events And Counters

CONFIG_SYSTEM_DATA_VERIFICATION=y
# CONFIG_PROFILING is not set
CONFIG_TRACEPOINTS=y

#
# Kexec and crash features
#
CONFIG_VMCORE_INFO=y
# end of Kexec and crash features
# end of General setup

#
# UML-specific options
#
CONFIG_UML=y
CONFIG_MMU=y
CONFIG_NO_IOMEM=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_HZ=100
CONFIG_NR_CPUS=1
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y

#
# Host processor type and features
#
CONFIG_CC_HAS_MARCH_NATIVE=y
# CONFIG_X86_NATIVE_CPU is not set
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_TSC=y
CONFIG_X86_HAVE_PAE=y
CONFIG_X86_CX8=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_IA32_FEAT_CTL=y
CONFIG_X86_VMX_FEATURE_NAMES=y
# CONFIG_PROCESSOR_SELECT is not set
CONFIG_BROADCAST_TLB_FLUSH=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_HYGON=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_ZHAOXIN=y
# end of Host processor type and features

CONFIG_UML_X86=y
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_STATIC_LINK is not set
CONFIG_LD_SCRIPT_DYN=y
CONFIG_LD_SCRIPT_DYN_RPATH=y
CONFIG_HOSTFS=y
CONFIG_MCONSOLE=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_KERNEL_STACK_ORDER=2
# CONFIG_MMAPPER is not set
CONFIG_PGTABLE_LEVELS=4
# CONFIG_UML_TIME_TRAVEL_SUPPORT is not set
# end of UML-specific options

#
# UML Character Devices
#
CONFIG_STDERR_CONSOLE=y
# CONFIG_SSL is not set
# CONFIG_NULL_CHAN is not set
# CONFIG_PORT_CHAN is not set
# CONFIG_PTY_CHAN is not set
# CONFIG_TTY_CHAN is not set
# CONFIG_XTERM_CHAN is not set
CONFIG_NOCONFIG_CHAN=y
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
CONFIG_CON_CHAN="xterm"
CONFIG_SSL_CHAN="pty"
# end of UML Character Devices

#
# UML Network Devices
#
# CONFIG_UML_NET_VECTOR is not set
# end of UML Network Devices

# CONFIG_VIRTIO_UML is not set
# CONFIG_UML_RTC is not set
# CONFIG_UML_PCI_OVER_VFIO is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y

#
# Power management options
#
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_SUSPEND_SKIP_SYNC is not set
CONFIG_PM_SLEEP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_USERSPACE_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not set
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
# end of Power management options

CONFIG_CPU_MITIGATIONS=y

#
# General architecture-dependent options
#
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
CONFIG_HAVE_ASM_MODVERSIONS=y
CONFIG_HAVE_RUST=y
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
CONFIG_HAVE_ARCH_SECCOMP=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
# CONFIG_SECCOMP is not set
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_LTO_NONE=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_HAVE_PAGE_SIZE_4KB=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
CONFIG_PAGE_SHIFT=12
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
CONFIG_STRICT_KERNEL_RWX=y
# CONFIG_LOCK_EVENT_COUNTS is not set

#
# GCOV-based kernel profiling
#
CONFIG_GCOV_KERNEL=y
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# CONFIG_GCOV_PROFILE_ALL is not set
# end of GCOV-based kernel profiling

CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_GCC_PLUGINS=y
# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
CONFIG_FUNCTION_ALIGNMENT=0
CONFIG_CC_HAS_MIN_FUNCTION_ALIGNMENT=y
CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT=y
# end of General architecture-dependent options

CONFIG_RT_MUTEXES=y
CONFIG_MODULES=y
CONFIG_MODULE_DEBUG=y
# CONFIG_MODULE_STATS is not set
# CONFIG_MODULE_DEBUG_AUTOLOAD_DUPS is not set
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODULE_COMPRESS is not set
CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
CONFIG_MODPROBE_PATH="/sbin/modprobe"
# CONFIG_TRIM_UNUSED_KSYMS is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
# CONFIG_BLOCK_LEGACY_AUTOLOAD is not set
# CONFIG_BLK_DEV_BSGLIB is not set
# CONFIG_BLK_DEV_INTEGRITY is not set
CONFIG_BLK_DEV_WRITE_MOUNTED=y
# CONFIG_BLK_DEV_ZONED is not set
# CONFIG_BLK_DEV_THROTTLING is not set
# CONFIG_BLK_WBT is not set
# CONFIG_BLK_CGROUP_IOLATENCY is not set
# CONFIG_BLK_CGROUP_IOCOST is not set
# CONFIG_BLK_CGROUP_IOPRIO is not set
CONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
# CONFIG_BLK_INLINE_ENCRYPTION is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_AIX_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_MSDOS_PARTITION is not set
# CONFIG_LDM_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SYSV68_PARTITION is not set
# CONFIG_CMDLINE_PARTITION is not set
# end of Partition Types

CONFIG_BLK_PM=y

#
# IO Schedulers
#
# CONFIG_MQ_IOSCHED_DEADLINE is not set
# CONFIG_MQ_IOSCHED_KYBER is not set
# CONFIG_IOSCHED_BFQ is not set
# end of IO Schedulers

CONFIG_ASN1=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_FREEZER=y

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_ELF_KUNIT_TEST is not set
CONFIG_ELFCORE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_BINFMT_MISC=y
CONFIG_COREDUMP=y
# CONFIG_EXEC_KUNIT_TEST is not set
# end of Executable file formats

#
# Memory Management options
#
CONFIG_SWAP=y
# CONFIG_ZSWAP is not set

#
# Slab allocator options
#
CONFIG_SLUB=y
# CONFIG_SLUB_TINY is not set
CONFIG_SLAB_MERGE_DEFAULT=y
# CONFIG_SLAB_FREELIST_RANDOM is not set
CONFIG_SLAB_FREELIST_HARDENED=y
# CONFIG_SLAB_BUCKETS is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_RANDOM_KMALLOC_CACHES is not set
# end of Slab allocator options

# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
CONFIG_COMPAT_BRK=y
CONFIG_FLATMEM=y
# CONFIG_COMPACTION is not set
# CONFIG_PAGE_REPORTING is not set
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
# CONFIG_KSM is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_PAGE_MAPCOUNT=y
CONFIG_NEED_PER_CPU_KM=y
# CONFIG_CMA is not set
CONFIG_PAGE_BLOCK_ORDER=10
# CONFIG_IDLE_PAGE_TRACKING is not set
CONFIG_VM_EVENT_COUNTERS=y
# CONFIG_PERCPU_STATS is not set
# CONFIG_GUP_TEST is not set
CONFIG_MEMFD_CREATE=y
CONFIG_ANON_VMA_NAME=y
# CONFIG_USERFAULTFD is not set
# CONFIG_LRU_GEN is not set
CONFIG_EXECMEM=y

#
# Data Access Monitoring
#
# CONFIG_DAMON is not set
# end of Data Access Monitoring
# end of Memory Management options

CONFIG_NET=y
CONFIG_NET_INGRESS=y
CONFIG_SKB_EXTENSIONS=y
CONFIG_NET_CRC32C=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_DIAG is not set
CONFIG_UNIX=y
CONFIG_AF_UNIX_OOB=y
# CONFIG_UNIX_DIAG is not set
# CONFIG_TLS is not set
# CONFIG_XFRM_USER is not set
# CONFIG_NET_KEY is not set
# CONFIG_NET_HANDSHAKE_KUNIT_TEST is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
CONFIG_NET_IP_TUNNEL=y
CONFIG_SYN_COOKIES=y
# CONFIG_NET_IPVTI is not set
# CONFIG_NET_FOU is not set
# CONFIG_NET_FOU_IP_TUNNELS is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
CONFIG_INET_TABLE_PERTURB_ORDER=16
CONFIG_INET_TUNNEL=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_INET_UDP_DIAG is not set
# CONFIG_INET_RAW_DIAG is not set
# CONFIG_INET_DIAG_DESTROY is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_AO is not set
# CONFIG_TCP_MD5SIG is not set
CONFIG_IPV6=y
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_IPV6_ILA is not set
# CONFIG_IPV6_VTI is not set
CONFIG_IPV6_SIT=y
# CONFIG_IPV6_SIT_6RD is not set
CONFIG_IPV6_NDISC_NODETYPE=y
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_IPV6_IOAM6_LWTUNNEL is not set
# CONFIG_MPTCP is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NET_PTP_CLASSIFY=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_INGRESS=y
# CONFIG_NETFILTER_EGRESS is not set
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_FAMILY_BRIDGE=y
# CONFIG_NETFILTER_NETLINK_HOOK is not set
# CONFIG_NETFILTER_NETLINK_ACCT is not set
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
# CONFIG_NETFILTER_NETLINK_OSF is not set
# CONFIG_NF_CONNTRACK is not set
CONFIG_NF_LOG_SYSLOG=m
CONFIG_NF_TABLES=y
# CONFIG_NF_TABLES_INET is not set
# CONFIG_NF_TABLES_NETDEV is not set
# CONFIG_NFT_NUMGEN is not set
# CONFIG_NFT_LOG is not set
# CONFIG_NFT_LIMIT is not set
# CONFIG_NFT_TUNNEL is not set
# CONFIG_NFT_QUOTA is not set
# CONFIG_NFT_REJECT is not set
CONFIG_NFT_COMPAT=y
# CONFIG_NFT_HASH is not set
# CONFIG_NFT_SOCKET is not set
# CONFIG_NFT_OSF is not set
# CONFIG_NFT_TPROXY is not set
CONFIG_NETFILTER_XTABLES=y

#
# Xtables combined modules
#
# CONFIG_NETFILTER_XT_MARK is not set

#
# Xtables targets
#
# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set
# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
# CONFIG_NETFILTER_XT_TARGET_HL is not set
# CONFIG_NETFILTER_XT_TARGET_HMARK is not set
# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set
# CONFIG_NETFILTER_XT_TARGET_LED is not set
# CONFIG_NETFILTER_XT_TARGET_LOG is not set
# CONFIG_NETFILTER_XT_TARGET_MARK is not set
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
# CONFIG_NETFILTER_XT_TARGET_TEE is not set
# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set
# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set

#
# Xtables matches
#
# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set
# CONFIG_NETFILTER_XT_MATCH_BPF is not set
# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set
# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
# CONFIG_NETFILTER_XT_MATCH_CPU is not set
# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
# CONFIG_NETFILTER_XT_MATCH_ECN is not set
# CONFIG_NETFILTER_XT_MATCH_ESP is not set
# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
# CONFIG_NETFILTER_XT_MATCH_HL is not set
# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set
# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
# CONFIG_NETFILTER_XT_MATCH_L2TP is not set
# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
# CONFIG_NETFILTER_XT_MATCH_MAC is not set
# CONFIG_NETFILTER_XT_MATCH_MARK is not set
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set
# CONFIG_NETFILTER_XT_MATCH_OSF is not set
# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
# CONFIG_NETFILTER_XT_MATCH_REALM is not set
# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set
# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
# CONFIG_NETFILTER_XT_MATCH_STRING is not set
# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
# CONFIG_NETFILTER_XT_MATCH_TIME is not set
# CONFIG_NETFILTER_XT_MATCH_U32 is not set
# end of Core Netfilter Configuration

# CONFIG_IP_SET is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
# CONFIG_IP_NF_IPTABLES_LEGACY is not set
# CONFIG_NF_SOCKET_IPV4 is not set
# CONFIG_NF_TPROXY_IPV4 is not set
# CONFIG_NF_TABLES_IPV4 is not set
# CONFIG_NF_TABLES_ARP is not set
# CONFIG_NF_DUP_IPV4 is not set
# CONFIG_NF_LOG_ARP is not set
# CONFIG_NF_LOG_IPV4 is not set
# CONFIG_NF_REJECT_IPV4 is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_ARPFILTER is not set
# end of IP: Netfilter Configuration

#
# IPv6: Netfilter Configuration
#
CONFIG_IP6_NF_IPTABLES_LEGACY=y
# CONFIG_NF_SOCKET_IPV6 is not set
# CONFIG_NF_TPROXY_IPV6 is not set
# CONFIG_NF_TABLES_IPV6 is not set
# CONFIG_NF_DUP_IPV6 is not set
CONFIG_NF_REJECT_IPV6=y
# CONFIG_NF_LOG_IPV6 is not set
CONFIG_IP6_NF_IPTABLES=y
# CONFIG_IP6_NF_MATCH_AH is not set
# CONFIG_IP6_NF_MATCH_EUI64 is not set
# CONFIG_IP6_NF_MATCH_FRAG is not set
# CONFIG_IP6_NF_MATCH_OPTS is not set
# CONFIG_IP6_NF_MATCH_HL is not set
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
# CONFIG_IP6_NF_MATCH_MH is not set
# CONFIG_IP6_NF_MATCH_RPFILTER is not set
# CONFIG_IP6_NF_MATCH_RT is not set
# CONFIG_IP6_NF_MATCH_SRH is not set
# CONFIG_IP6_NF_TARGET_HL is not set
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_MANGLE=y
# CONFIG_IP6_NF_RAW is not set
# CONFIG_IP6_NF_TARGET_NPT is not set
# end of IPv6: Netfilter Configuration

CONFIG_NF_TABLES_BRIDGE=y
# CONFIG_NFT_BRIDGE_META is not set
CONFIG_BRIDGE_NF_EBTABLES_LEGACY=y
CONFIG_BRIDGE_NF_EBTABLES=y
CONFIG_BRIDGE_EBT_BROUTE=y
CONFIG_BRIDGE_EBT_T_FILTER=y
CONFIG_BRIDGE_EBT_T_NAT=y
CONFIG_BRIDGE_EBT_802_3=y
CONFIG_BRIDGE_EBT_AMONG=y
CONFIG_BRIDGE_EBT_ARP=y
CONFIG_BRIDGE_EBT_IP=y
CONFIG_BRIDGE_EBT_IP6=y
CONFIG_BRIDGE_EBT_LIMIT=y
CONFIG_BRIDGE_EBT_MARK=y
CONFIG_BRIDGE_EBT_PKTTYPE=y
CONFIG_BRIDGE_EBT_STP=y
CONFIG_BRIDGE_EBT_VLAN=y
CONFIG_BRIDGE_EBT_ARPREPLY=y
CONFIG_BRIDGE_EBT_DNAT=y
CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_REDIRECT=y
CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_GCOV_PROFILE_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
CONFIG_STP=y
CONFIG_BRIDGE=y
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_BRIDGE_VLAN_FILTERING=y
# CONFIG_BRIDGE_MRP is not set
# CONFIG_BRIDGE_CFM is not set
# CONFIG_NET_DSA is not set
CONFIG_VLAN_8021Q=y
# CONFIG_VLAN_8021Q_GVRP is not set
# CONFIG_VLAN_8021Q_MVRP is not set
CONFIG_LLC=y
# CONFIG_LLC2 is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_PHONET is not set
# CONFIG_6LOWPAN is not set
# CONFIG_IEEE802154 is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set
# CONFIG_DNS_RESOLVER is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
# CONFIG_VSOCKETS is not set
# CONFIG_NETLINK_DIAG is not set
# CONFIG_MPLS is not set
# CONFIG_NET_NSH is not set
# CONFIG_HSR is not set
# CONFIG_NET_SWITCHDEV is not set
# CONFIG_NET_L3_MASTER_DEV is not set
# CONFIG_QRTR is not set
# CONFIG_NET_NCSI is not set
CONFIG_MAX_SKB_FRAGS=17
# CONFIG_CGROUP_NET_PRIO is not set
# CONFIG_CGROUP_NET_CLASSID is not set
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_DROP_MONITOR is not set
# end of Network testing
# end of Networking options

# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not set
# CONFIG_MCTP is not set
CONFIG_WIRELESS=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_DEBUGFS=y
CONFIG_CFG80211_CRDA_SUPPORT=y
CONFIG_CFG80211_WEXT=y
# CONFIG_CFG80211_KUNIT_TEST is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
# CONFIG_MAC80211_KUNIT_TEST is not set
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211_LEDS=y
CONFIG_MAC80211_DEBUGFS=y
CONFIG_MAC80211_MESSAGE_TRACING=y
CONFIG_MAC80211_DEBUG_MENU=y
# CONFIG_MAC80211_NOINLINE is not set
CONFIG_MAC80211_VERBOSE_DEBUG=y
CONFIG_MAC80211_MLME_DEBUG=y
CONFIG_MAC80211_STA_DEBUG=y
CONFIG_MAC80211_HT_DEBUG=y
CONFIG_MAC80211_OCB_DEBUG=y
CONFIG_MAC80211_IBSS_DEBUG=y
CONFIG_MAC80211_PS_DEBUG=y
CONFIG_MAC80211_MPL_DEBUG=y
CONFIG_MAC80211_MPATH_DEBUG=y
CONFIG_MAC80211_MHWMP_DEBUG=y
CONFIG_MAC80211_MESH_SYNC_DEBUG=y
CONFIG_MAC80211_MESH_CSA_DEBUG=y
CONFIG_MAC80211_MESH_PS_DEBUG=y
CONFIG_MAC80211_TDLS_DEBUG=y
CONFIG_MAC80211_DEBUG_COUNTERS=y
CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not set
# CONFIG_NET_IFE is not set
# CONFIG_LWTUNNEL is not set
CONFIG_DST_CACHE=y
CONFIG_GRO_CELLS=y
CONFIG_PAGE_POOL=y
CONFIG_PAGE_POOL_STATS=y
CONFIG_FAILOVER=y
CONFIG_ETHTOOL_NETLINK=y
# CONFIG_NETDEV_ADDR_LIST_TEST is not set
# CONFIG_NET_TEST is not set

#
# Device Drivers
#
# CONFIG_PCCARD is not set

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DEVTMPFS_SAFE=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y

#
# Firmware loader
#
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_DEBUG is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_FW_LOADER_COMPRESS is not set
CONFIG_FW_CACHE=y
# CONFIG_FW_UPLOAD is not set
# end of Firmware loader

CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
# CONFIG_PM_QOS_KUNIT_TEST is not set
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
# CONFIG_DM_KUNIT_TEST is not set
# CONFIG_DRIVER_PE_KUNIT_TEST is not set
CONFIG_GENERIC_CPU_DEVICES=y
# CONFIG_REGMAP_BUILD is not set
CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y
# end of Generic Driver Options

#
# Bus devices
#
# CONFIG_MHI_BUS is not set
# CONFIG_MHI_BUS_EP is not set
# end of Bus devices

#
# Cache Drivers
#
# end of Cache Drivers

# CONFIG_CONNECTOR is not set

#
# Firmware Drivers
#

#
# ARM System Control and Management Interface Protocol
#
# end of ARM System Control and Management Interface Protocol

# CONFIG_FIRMWARE_MEMMAP is not set
# CONFIG_GOOGLE_FIRMWARE is not set

#
# Qualcomm firmware drivers
#
# end of Qualcomm firmware drivers

#
# Tegra firmware driver
#
# end of Tegra firmware driver
# end of Firmware Drivers

# CONFIG_FWCTL is not set
# CONFIG_GNSS is not set
# CONFIG_MTD is not set
# CONFIG_OF is not set
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_NULL_BLK is not set
# CONFIG_ZRAM is not set
# CONFIG_BLK_DEV_UBD is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_UBLK is not set

#
# NVME Support
#
# CONFIG_NVME_TCP is not set
# CONFIG_NVME_TARGET is not set
# end of NVME Support

#
# Misc devices
#
# CONFIG_DUMMY_IRQ is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_NTSYNC is not set
# CONFIG_NSM is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_93CX6 is not set
# end of EEPROM support

#
# Altera FPGA firmware download module (requires I2C)
#
# CONFIG_PVPANIC is not set
# end of Misc devices

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
# CONFIG_SCSI is not set
# CONFIG_SCSI_LIB_KUNIT_TEST is not set
# end of SCSI device support

# CONFIG_MD is not set
# CONFIG_TARGET_CORE is not set
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
# CONFIG_BONDING is not set
CONFIG_DUMMY=y
# CONFIG_WIREGUARD is not set
# CONFIG_OVPN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
# CONFIG_IPVLAN is not set
# CONFIG_VXLAN is not set
# CONFIG_GENEVE is not set
# CONFIG_BAREUDP is not set
# CONFIG_GTP is not set
# CONFIG_PFCP is not set
CONFIG_MACSEC=y
# CONFIG_NETCONSOLE is not set
# CONFIG_TUN is not set
# CONFIG_TUN_VNET_CROSS_LE is not set
CONFIG_VETH=y
CONFIG_VIRTIO_NET=y
# CONFIG_NLMON is not set
# CONFIG_ETHERNET is not set
# CONFIG_PHYLIB is not set
# CONFIG_MDIO_BUS is not set

#
# PCS device drivers
#
# CONFIG_PCS_XPCS is not set
# end of PCS device drivers

# CONFIG_PPP is not set
# CONFIG_SLIP is not set

#
# Host-side USB support is needed for USB Network Adapter support
#
CONFIG_WLAN=y
# CONFIG_WLAN_VENDOR_ADMTEK is not set
CONFIG_WLAN_VENDOR_ATH=y
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH6KL is not set
# CONFIG_WLAN_VENDOR_ATMEL is not set
# CONFIG_WLAN_VENDOR_BROADCOM is not set
# CONFIG_WLAN_VENDOR_INTEL is not set
# CONFIG_WLAN_VENDOR_INTERSIL is not set
# CONFIG_WLAN_VENDOR_MARVELL is not set
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
# CONFIG_WLAN_VENDOR_MICROCHIP is not set
# CONFIG_WLAN_VENDOR_PURELIFI is not set
# CONFIG_WLAN_VENDOR_RALINK is not set
# CONFIG_WLAN_VENDOR_REALTEK is not set
# CONFIG_WLAN_VENDOR_RSI is not set
# CONFIG_WLAN_VENDOR_SILABS is not set
# CONFIG_WLAN_VENDOR_ST is not set
# CONFIG_WLAN_VENDOR_TI is not set
# CONFIG_WLAN_VENDOR_ZYDAS is not set
# CONFIG_WLAN_VENDOR_QUANTENNA is not set
CONFIG_MAC80211_HWSIM=m
# CONFIG_VIRT_WIFI is not set
# CONFIG_WAN is not set

#
# Wireless WAN
#
# CONFIG_WWAN is not set
# end of Wireless WAN

# CONFIG_NETDEVSIM is not set
CONFIG_NET_FAILOVER=y
# CONFIG_ISDN is not set

#
# Input device support
#
# CONFIG_INPUT is not set

#
# Hardware I/O ports
#
# CONFIG_SERIO is not set
# end of Hardware I/O ports
# end of Input device support

#
# Character devices
#
CONFIG_TTY=y
# CONFIG_VT is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=32
# CONFIG_LEGACY_TIOCSTI is not set
CONFIG_LDISC_AUTOLOAD=y
# CONFIG_N_GSM is not set
# CONFIG_NULL_TTY is not set
CONFIG_HVC_DRIVER=y
# CONFIG_SERIAL_DEV_BUS is not set
# CONFIG_TTY_PRINTK is not set
CONFIG_VIRTIO_CONSOLE=y
# CONFIG_HW_RANDOM is not set
# CONFIG_UML_RANDOM is not set
CONFIG_DEVMEM=y
# end of Character devices

#
# I2C support
#
# CONFIG_I2C is not set
# end of I2C support

# CONFIG_I3C is not set
# CONFIG_SPMI is not set
# CONFIG_HSI is not set
CONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set

#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_GPIO is not set
# CONFIG_PPS_GENERATOR is not set

#
# PTP clock support
#
CONFIG_PTP_1588_CLOCK=y
CONFIG_PTP_1588_CLOCK_OPTIONAL=y

#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
#
# CONFIG_PTP_1588_CLOCK_MOCK is not set
# end of PTP clock support

# CONFIG_PINCTRL is not set
# CONFIG_GPIOLIB is not set
# CONFIG_POWER_RESET is not set
# CONFIG_POWER_SEQUENCING is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_SAMSUNG_SDI is not set
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_CHARGER_MAX8903 is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_NETLINK=y
# CONFIG_THERMAL_STATISTICS is not set
# CONFIG_THERMAL_DEBUGFS is not set
# CONFIG_THERMAL_CORE_TESTING is not set
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
CONFIG_THERMAL_GOV_STEP_WISE=y
# CONFIG_THERMAL_GOV_BANG_BANG is not set
# CONFIG_THERMAL_GOV_USER_SPACE is not set
# CONFIG_THERMAL_EMULATION is not set
# CONFIG_WATCHDOG is not set
# CONFIG_REGULATOR is not set

#
# CEC support
#
# CONFIG_MEDIA_CEC_SUPPORT is not set
# end of CEC support

#
# Graphics support
#
# CONFIG_AUXDISPLAY is not set
# end of Graphics support

CONFIG_USB_OHCI_LITTLE_ENDIAN=y
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_CLASS_FLASH=y
# CONFIG_LEDS_CLASS_MULTICOLOR is not set
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
# CONFIG_LEDS_KUNIT_TEST is not set

#
# LED drivers
#

#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)
#
# CONFIG_LEDS_MLXREG is not set
# CONFIG_LEDS_USER is not set

#
# Flash and Torch LED drivers
#
# CONFIG_LEDS_SGM3140 is not set

#
# RGB LED drivers
#

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_CPU is not set
# CONFIG_LEDS_TRIGGER_ACTIVITY is not set
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y

#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_LEDS_TRIGGER_TRANSIENT is not set
# CONFIG_LEDS_TRIGGER_CAMERA is not set
# CONFIG_LEDS_TRIGGER_PANIC is not set
# CONFIG_LEDS_TRIGGER_NETDEV is not set
# CONFIG_LEDS_TRIGGER_PATTERN is not set
# CONFIG_LEDS_TRIGGER_TTY is not set

#
# Simatic LED drivers
#
# CONFIG_ACCESSIBILITY is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_SYSTOHC_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
# CONFIG_RTC_LIB_KUNIT_TEST is not set
# CONFIG_RTC_NVMEM is not set

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#

#
# SPI RTC drivers
#

#
# SPI and I2C RTC drivers
#

#
# Platform RTC drivers
#
# CONFIG_RTC_DRV_DS2404 is not set

#
# on-CPU RTC drivers
#

#
# HID Sensor RTC drivers
#

#
# DMABUF options
#
# CONFIG_SYNC_FILE is not set
# CONFIG_DMABUF_HEAPS is not set
# end of DMABUF options

# CONFIG_UIO is not set
# CONFIG_VFIO is not set
# CONFIG_VIRT_DRIVERS is not set
CONFIG_VIRTIO_ANCHOR=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_MENU=y
# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_VIRTIO_DEBUG is not set
# CONFIG_VIRTIO_RTC is not set
# CONFIG_VDPA is not set
CONFIG_VHOST_MENU=y
# CONFIG_VHOST_NET is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set

#
# Microsoft Hyper-V guest support
#
# end of Microsoft Hyper-V guest support

# CONFIG_GREYBUS is not set
# CONFIG_COMEDI is not set
# CONFIG_STAGING is not set
# CONFIG_COMMON_CLK is not set
# CONFIG_HWSPINLOCK is not set

#
# Clock Source drivers
#
# end of Clock Source drivers

# CONFIG_MAILBOX is not set
# CONFIG_IOMMU_SUPPORT is not set

#
# Remoteproc drivers
#
# end of Remoteproc drivers

#
# Rpmsg drivers
#
# end of Rpmsg drivers

#
# SOC (System On Chip) specific Drivers
#

#
# Amlogic SoC drivers
#
# end of Amlogic SoC drivers

#
# Broadcom SoC drivers
#
# end of Broadcom SoC drivers

#
# NXP/Freescale QorIQ SoC drivers
#
# end of NXP/Freescale QorIQ SoC drivers

#
# fujitsu SoC drivers
#
# end of fujitsu SoC drivers

#
# i.MX SoC drivers
#
# end of i.MX SoC drivers

#
# Enable LiteX SoC Builder specific drivers
#
# end of Enable LiteX SoC Builder specific drivers

# CONFIG_WPCM450_SOC is not set

#
# Qualcomm SoC drivers
#
# end of Qualcomm SoC drivers

# CONFIG_SOC_TI is not set

#
# Xilinx SoC drivers
#
# end of Xilinx SoC drivers
# end of SOC (System On Chip) specific Drivers

#
# PM Domains
#

#
# Amlogic PM Domains
#
# end of Amlogic PM Domains

#
# Broadcom PM Domains
#
# end of Broadcom PM Domains

#
# i.MX PM Domains
#
# end of i.MX PM Domains

#
# Qualcomm PM Domains
#
# end of Qualcomm PM Domains
# end of PM Domains

# CONFIG_PM_DEVFREQ is not set
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_PWM is not set

#
# IRQ chip support
#
# end of IRQ chip support

# CONFIG_RESET_CONTROLLER is not set

#
# PHY Subsystem
#
# CONFIG_GENERIC_PHY is not set
# CONFIG_PHY_CAN_TRANSCEIVER is not set

#
# PHY drivers for Broadcom platforms
#
# end of PHY drivers for Broadcom platforms
# end of PHY Subsystem

# CONFIG_POWERCAP is not set
# CONFIG_RAS is not set

#
# Android
#
# CONFIG_ANDROID_BINDER_IPC is not set
# end of Android

# CONFIG_DAX is not set
# CONFIG_NVMEM is not set

#
# HW tracing support
#
# CONFIG_STM is not set
# end of HW tracing support

# CONFIG_FPGA is not set
# CONFIG_TEE is not set
# CONFIG_SIOX is not set
# CONFIG_SLIMBUS is not set
# CONFIG_INTERCONNECT is not set
# CONFIG_COUNTER is not set
# CONFIG_PECI is not set
# CONFIG_HTE is not set
# end of Device Drivers

#
# File systems
#
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_VALIDATE_FS_PARSER=y
CONFIG_FS_IOMAP=y
CONFIG_FS_STACK=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_EXT4_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
# CONFIG_F2FS_FS is not set
# CONFIG_BCACHEFS_FS is not set
CONFIG_EXPORTFS=y
# CONFIG_EXPORTFS_BLOCK_OPS is not set
CONFIG_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not set
# CONFIG_FS_VERITY is not set
CONFIG_FSNOTIFY=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY_USER=y
# CONFIG_FANOTIFY is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_FUSE_FS is not set
CONFIG_OVERLAY_FS=y
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
# CONFIG_OVERLAY_FS_DEBUG is not set

#
# Caches
#
# end of Caches

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set
# end of CD-ROM/DVD Filesystems

#
# DOS/FAT/EXFAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_EXFAT_FS is not set
# CONFIG_NTFS3_FS is not set
# CONFIG_NTFS_FS is not set
# end of DOS/FAT/EXFAT/NT Filesystems

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
# CONFIG_PROC_CHILDREN is not set
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_TMPFS_XATTR is not set
# CONFIG_TMPFS_INODE64 is not set
# CONFIG_TMPFS_QUOTA is not set
# CONFIG_CONFIGFS_FS is not set
# end of Pseudo filesystems

# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_MAC_ROMAN is not set
# CONFIG_NLS_MAC_CELTIC is not set
# CONFIG_NLS_MAC_CENTEURO is not set
# CONFIG_NLS_MAC_CROATIAN is not set
# CONFIG_NLS_MAC_CYRILLIC is not set
# CONFIG_NLS_MAC_GAELIC is not set
# CONFIG_NLS_MAC_GREEK is not set
# CONFIG_NLS_MAC_ICELAND is not set
# CONFIG_NLS_MAC_INUIT is not set
# CONFIG_NLS_MAC_ROMANIAN is not set
# CONFIG_NLS_MAC_TURKISH is not set
# CONFIG_NLS_UTF8 is not set
# CONFIG_UNICODE is not set
CONFIG_IO_WQ=y
# end of File systems

#
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_REQUEST_CACHE is not set
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_BIG_KEYS is not set
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEY_DH_OPERATIONS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_STATIC_USERMODEHELPER is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_LSM="yama,loadpin,safesetid,integrity"

#
# Kernel hardening options
#

#
# Memory initialization
#
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
# CONFIG_INIT_STACK_NONE is not set
CONFIG_INIT_STACK_ALL_PATTERN=y
# CONFIG_INIT_STACK_ALL_ZERO is not set
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
# CONFIG_ZERO_CALL_USED_REGS is not set
# end of Memory initialization

#
# Bounds checking
#
CONFIG_FORTIFY_SOURCE=y
CONFIG_HARDENED_USERCOPY=y
CONFIG_HARDENED_USERCOPY_DEFAULT_ON=y
# end of Bounds checking

#
# Hardening of kernel data structures
#
CONFIG_LIST_HARDENED=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
# end of Hardening of kernel data structures

CONFIG_RANDSTRUCT_NONE=y
# CONFIG_RANDSTRUCT_FULL is not set
# CONFIG_RANDSTRUCT_PERFORMANCE is not set
# end of Kernel hardening options
# end of Security options

CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_AKCIPHER2=y
CONFIG_CRYPTO_AKCIPHER=y
CONFIG_CRYPTO_KPP2=y
CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_USER is not set
# CONFIG_CRYPTO_SELFTESTS is not set
CONFIG_CRYPTO_NULL=y
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_KRB5ENC is not set
# CONFIG_CRYPTO_BENCHMARK is not set
# end of Crypto core or helper

#
# Public-key cryptography
#
CONFIG_CRYPTO_RSA=y
# CONFIG_CRYPTO_DH is not set
# CONFIG_CRYPTO_ECDH is not set
# CONFIG_CRYPTO_ECDSA is not set
# CONFIG_CRYPTO_ECRDSA is not set
# CONFIG_CRYPTO_CURVE25519 is not set
# end of Public-key cryptography

#
# Block ciphers
#
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_AES_TI is not set
# CONFIG_CRYPTO_ARIA is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SM4_GENERIC is not set
# CONFIG_CRYPTO_TWOFISH is not set
# end of Block ciphers

#
# Length-preserving ciphers and modes
#
# CONFIG_CRYPTO_ADIANTUM is not set
# CONFIG_CRYPTO_CHACHA20 is not set
# CONFIG_CRYPTO_CBC is not set
CONFIG_CRYPTO_CTR=y
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_HCTR2 is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set
# end of Length-preserving ciphers and modes

#
# AEAD (authenticated encryption with associated data) ciphers
#
# CONFIG_CRYPTO_AEGIS128 is not set
# CONFIG_CRYPTO_CHACHA20POLY1305 is not set
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
# CONFIG_CRYPTO_SEQIV is not set
# CONFIG_CRYPTO_ECHAINIV is not set
# CONFIG_CRYPTO_ESSIV is not set
# end of AEAD (authenticated encryption with associated data) ciphers

#
# Hashes, digests, and MACs
#
# CONFIG_CRYPTO_BLAKE2B is not set
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_GHASH=y
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_SHA1 is not set
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA3=y
# CONFIG_CRYPTO_SM3_GENERIC is not set
# CONFIG_CRYPTO_STREEBOG is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_XXHASH is not set
# end of Hashes, digests, and MACs

#
# CRCs (cyclic redundancy checks)
#
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32 is not set
# end of CRCs (cyclic redundancy checks)

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_842 is not set
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set
# CONFIG_CRYPTO_ZSTD is not set
# end of Compression

#
# Random number generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_DRBG_MENU is not set
# CONFIG_CRYPTO_JITTERENTROPY is not set
# end of Random number generation

#
# Userspace interface
#
# CONFIG_CRYPTO_USER_API_HASH is not set
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
# CONFIG_CRYPTO_USER_API_RNG is not set
# CONFIG_CRYPTO_USER_API_AEAD is not set
# end of Userspace interface

CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_VIRTIO is not set
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set
CONFIG_PKCS7_MESSAGE_PARSER=y
# CONFIG_PKCS7_TEST_KEY is not set
# CONFIG_SIGNED_PE_FILE_VERIFICATION is not set
# CONFIG_FIPS_SIGNATURE_SELFTEST is not set

#
# Certificates for signature checking
#
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""
# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set
# CONFIG_SECONDARY_TRUSTED_KEYRING is not set
# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set
# end of Certificates for signature checking

# CONFIG_CRYPTO_KRB5 is not set
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
# CONFIG_PACKING is not set
CONFIG_BITREVERSE=y
CONFIG_ARCH_HAS_STRNCPY_FROM_USER=y
CONFIG_ARCH_HAS_STRNLEN_USER=y
CONFIG_GENERIC_NET_UTILS=y
# CONFIG_CORDIC is not set
# CONFIG_PRIME_NUMBERS is not set

#
# Crypto library routines
#
CONFIG_CRYPTO_LIB_UTILS=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_ARC4=m
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
CONFIG_CRYPTO_LIB_SHA1=y
CONFIG_CRYPTO_LIB_SHA256=y
CONFIG_CRYPTO_LIB_SHA256_GENERIC=y
# end of Crypto library routines

CONFIG_CRC32=y
# CONFIG_CRC_OPTIMIZATIONS is not set
# CONFIG_RANDOM32_SELFTEST is not set
# CONFIG_XZ_DEC is not set
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_NO_DMA=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_DMA_NEED_SYNC=y
CONFIG_DMA_API_DEBUG=y
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_FORCE_NR_CPUS=y
CONFIG_DQL=y
CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_CLZ_TAB=y
# CONFIG_IRQ_POLL is not set
CONFIG_MPILIB=y
CONFIG_DIMLIB=y
CONFIG_OID_REGISTRY=y
CONFIG_SG_POOL=y
CONFIG_STACKDEPOT=y
CONFIG_STACKDEPOT_ALWAYS_INIT=y
CONFIG_STACKDEPOT_MAX_FRAMES=64
CONFIG_REF_TRACKER=y
CONFIG_SBITMAP=y
# CONFIG_LWQ_TEST is not set
# end of Library routines

#
# Kernel hacking
#

#
# printk and dmesg options
#
# CONFIG_PRINTK_TIME is not set
# CONFIG_PRINTK_CALLER is not set
# CONFIG_STACKTRACE_BUILD_ID is not set
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=8
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
# CONFIG_BOOT_PRINTK_DELAY is not set
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y
CONFIG_SYMBOLIC_ERRNAME=y
CONFIG_DEBUG_BUGVERBOSE=y
# end of printk and dmesg options

CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_MISC=y

#
# Compile-time checks and compiler options
#
CONFIG_DEBUG_INFO=y
CONFIG_AS_HAS_NON_CONST_ULEB128=y
# CONFIG_DEBUG_INFO_NONE is not set
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_COMPRESSED_NONE is not set
CONFIG_DEBUG_INFO_COMPRESSED_ZLIB=y
# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
CONFIG_GDB_SCRIPTS=y
CONFIG_FRAME_WARN=1536
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
CONFIG_HEADERS_INSTALL=y
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set
CONFIG_FRAME_POINTER=y
# CONFIG_VMLINUX_MAP is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options

#
# Generic Kernel Debugging Instruments
#
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
CONFIG_ARCH_HAS_UBSAN=y
CONFIG_UBSAN=y
# CONFIG_UBSAN_TRAP is not set
CONFIG_CC_HAS_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_SHIFT=y
CONFIG_UBSAN_DIV_ZERO=y
# CONFIG_UBSAN_UNREACHABLE is not set
CONFIG_UBSAN_BOOL=y
CONFIG_UBSAN_ENUM=y
# CONFIG_UBSAN_ALIGNMENT is not set
# CONFIG_TEST_UBSAN is not set
CONFIG_HAVE_KCSAN_COMPILER=y
# end of Generic Kernel Debugging Instruments

#
# Networking Debugging
#
CONFIG_NET_DEV_REFCNT_TRACKER=y
CONFIG_NET_NS_REFCNT_TRACKER=y
CONFIG_DEBUG_NET=y
# CONFIG_DEBUG_NET_SMALL_RTNL is not set
# end of Networking Debugging

#
# Memory Debugging
#
# CONFIG_PAGE_EXTENSION is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_PAGE_OWNER is not set
CONFIG_PAGE_POISONING=y
# CONFIG_DEBUG_PAGE_REF is not set
CONFIG_DEBUG_RODATA_TEST=y
CONFIG_HAVE_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
# CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN is not set
CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
CONFIG_DEBUG_OBJECTS_FREE=y
CONFIG_DEBUG_OBJECTS_TIMERS=y
CONFIG_DEBUG_OBJECTS_WORK=y
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
# CONFIG_SHRINKER_DEBUG is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_SCHED_STACK_END_CHECK is not set
# CONFIG_DEBUG_VFS is not set
# CONFIG_DEBUG_VM is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_MEM_ALLOC_PROFILING is not set
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_KASAN_SW_TAGS=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not set
# end of Memory Debugging

# CONFIG_DEBUG_SHIRQ is not set

#
# Debug Oops, Lockups and Hangs
#
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_ON_OOPS_VALUE=1
CONFIG_PANIC_TIMEOUT=0
CONFIG_LOCKUP_DETECTOR=y
CONFIG_SOFTLOCKUP_DETECTOR=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=5
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_DETECT_HUNG_TASK_BLOCKER=y
CONFIG_WQ_WATCHDOG=y
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
# CONFIG_TEST_LOCKUP is not set
# end of Debug Oops, Lockups and Hangs

#
# Scheduler Debugging
#
# CONFIG_SCHEDSTATS is not set
# end of Scheduler Debugging

#
# Lock Debugging (spinlocks, mutexes, etc...)
#
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_PROVE_LOCKING=y
CONFIG_PROVE_RAW_LOCK_NESTING=y
CONFIG_LOCK_STAT=y
CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
CONFIG_DEBUG_RWSEMS=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_LOCKDEP=y
CONFIG_LOCKDEP_BITS=15
CONFIG_LOCKDEP_CHAINS_BITS=16
CONFIG_LOCKDEP_STACK_TRACE_BITS=21
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
CONFIG_DEBUG_LOCKDEP=y
CONFIG_DEBUG_ATOMIC_SLEEP=y
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_LOCK_TORTURE_TEST is not set
# CONFIG_WW_MUTEX_SELFTEST is not set
# CONFIG_SCF_TORTURE_TEST is not set
# end of Lock Debugging (spinlocks, mutexes, etc...)

CONFIG_TRACE_IRQFLAGS=y
CONFIG_DEBUG_IRQFLAGS=y
CONFIG_STACKTRACE=y
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_KOBJECT_RELEASE is not set
CONFIG_HAVE_DEBUG_BUGVERBOSE=y

#
# Debug kernel data structures
#
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_PLIST=y
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
# CONFIG_DEBUG_MAPLE_TREE is not set
# end of Debug kernel data structures

#
# RCU Debugging
#
CONFIG_PROVE_RCU=y
CONFIG_PROVE_RCU_LIST=y
# CONFIG_RCU_SCALE_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_REF_SCALE_TEST is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_RCU_EQS_DEBUG is not set
# end of RCU Debugging

# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
# CONFIG_LATENCYTOP is not set
CONFIG_NOP_TRACER=y
CONFIG_TRACE_CLOCK=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_PREEMPTIRQ_TRACEPOINTS=y
CONFIG_TRACING=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
# CONFIG_BOOTTIME_TRACING is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_HWLAT_TRACER is not set
# CONFIG_OSNOISE_TRACER is not set
# CONFIG_TIMERLAT_TRACER is not set
# CONFIG_ENABLE_DEFAULT_TRACERS is not set
# CONFIG_TRACER_SNAPSHOT is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_DYNAMIC_EVENTS=y
# CONFIG_SYNTH_EVENTS is not set
CONFIG_USER_EVENTS=y
# CONFIG_TRACE_EVENT_INJECT is not set
# CONFIG_TRACEPOINT_BENCHMARK is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_GCOV_PROFILE_FTRACE is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set
# CONFIG_RV is not set
# CONFIG_SAMPLES is not set
# CONFIG_STRICT_DEVMEM is not set

#
# um Debugging
#
# CONFIG_GPROF is not set
CONFIG_EARLY_PRINTK=y
# end of um Debugging

#
# Kernel Testing and Coverage
#
CONFIG_KUNIT=y
CONFIG_KUNIT_DEBUGFS=y
# CONFIG_KUNIT_TEST is not set
# CONFIG_KUNIT_EXAMPLE_TEST is not set
# CONFIG_KUNIT_ALL_TESTS is not set
CONFIG_KUNIT_DEFAULT_ENABLED=y
CONFIG_KUNIT_AUTORUN_ENABLED=y
CONFIG_KUNIT_UAPI=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_ARCH_HAS_KCOV=y
# CONFIG_KCOV is not set
CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_TEST_DHRY is not set
# CONFIG_LKDTM is not set
# CONFIG_CPUMASK_KUNIT_TEST is not set
# CONFIG_TEST_LIST_SORT is not set
# CONFIG_TEST_MIN_HEAP is not set
# CONFIG_TEST_SORT is not set
# CONFIG_TEST_DIV64 is not set
# CONFIG_TEST_MULDIV64 is not set
# CONFIG_TEST_IOV_ITER is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_TEST_REF_TRACKER is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_PERCPU_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_PRINTF_KUNIT_TEST is not set
# CONFIG_SCANF_KUNIT_TEST is not set
# CONFIG_STRING_KUNIT_TEST is not set
# CONFIG_STRING_HELPERS_KUNIT_TEST is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_BITMAP is not set
# CONFIG_TEST_UUID is not set
# CONFIG_TEST_XARRAY is not set
# CONFIG_TEST_MAPLE_TREE is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_IDA is not set
# CONFIG_TEST_MISC_MINOR is not set
# CONFIG_TEST_LKM is not set
# CONFIG_TEST_BITOPS is not set
# CONFIG_TEST_VMALLOC is not set
# CONFIG_TEST_BPF is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_BITFIELD_KUNIT is not set
# CONFIG_CHECKSUM_KUNIT is not set
# CONFIG_UTIL_MACROS_KUNIT is not set
# CONFIG_HASH_KUNIT_TEST is not set
# CONFIG_RESOURCE_KUNIT_TEST is not set
# CONFIG_SYSCTL_KUNIT_TEST is not set
# CONFIG_KFIFO_KUNIT_TEST is not set
# CONFIG_LIST_KUNIT_TEST is not set
# CONFIG_HASHTABLE_KUNIT_TEST is not set
# CONFIG_LINEAR_RANGES_TEST is not set
# CONFIG_CMDLINE_KUNIT_TEST is not set
# CONFIG_BITS_TEST is not set
# CONFIG_SLUB_KUNIT_TEST is not set
# CONFIG_MEMCPY_KUNIT_TEST is not set
# CONFIG_IS_SIGNED_TYPE_KUNIT_TEST is not set
# CONFIG_OVERFLOW_KUNIT_TEST is not set
# CONFIG_RANDSTRUCT_KUNIT_TEST is not set
# CONFIG_STACKINIT_KUNIT_TEST is not set
# CONFIG_FORTIFY_KUNIT_TEST is not set
# CONFIG_CRC_KUNIT_TEST is not set
# CONFIG_SIPHASH_KUNIT_TEST is not set
# CONFIG_USERCOPY_KUNIT_TEST is not set
# CONFIG_BLACKHOLE_DEV_KUNIT_TEST is not set
# CONFIG_TEST_UDELAY is not set
# CONFIG_TEST_STATIC_KEYS is not set
# CONFIG_TEST_DYNAMIC_DEBUG is not set
# CONFIG_TEST_KMOD is not set
# CONFIG_TEST_KALLSYMS is not set
# CONFIG_TEST_MEMCAT_P is not set
# CONFIG_TEST_MEMINIT is not set
# CONFIG_TEST_FREE_PAGES is not set
# CONFIG_TEST_OBJPOOL is not set
# CONFIG_INT_POW_KUNIT_TEST is not set
# CONFIG_INT_SQRT_KUNIT_TEST is not set
# CONFIG_INT_LOG_KUNIT_TEST is not set
# CONFIG_GCD_KUNIT_TEST is not set
# end of Kernel Testing and Coverage

#
# Rust hacking
#
# end of Rust hacking
# end of Kernel hacking

CONFIG_IO_URING_ZCRX=y

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 12/15] kunit: Introduce UAPI testing framework
  2025-06-27  6:58       ` Benjamin Berg
@ 2025-06-27  8:27         ` Thomas Weißschuh
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-06-27  8:27 UTC (permalink / raw)
  To: Benjamin Berg, Masahiro Yamada
  Cc: Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows, Kees Cook, Alexander Viro, Christian Brauner, Jan Kara,
	linux-mm, linux-fsdevel

On Fri, Jun 27, 2025 at 08:58:11AM +0200, Benjamin Berg wrote:
> On Fri, 2025-06-27 at 06:20 +0200, Thomas Weißschuh wrote:
> > On Thu, Jun 26, 2025 at 08:11:17PM +0200, Benjamin Berg wrote:
> > > I ran into two minor issues trying out the patches, see inline.
> > 
> > Thanks for testing the series.
> > 
> > > On Thu, 2025-06-26 at 08:10 +0200, Thomas Weißschuh wrote:
> > > > Enable running UAPI tests as part of kunit.
> > > > The selftests are embedded into the kernel image and their output is
> > > > forwarded to kunit for unified reporting.
> > > > 
> > > > The implementation reuses parts of usermode drivers and usermode
> > > > helpers. However these frameworks are not used directly as they make it
> > > > impossible to retrieve a thread's exit code.
> > > > 
> > > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > > > 
> > > > [SNIP]
> > > > +/**
> > > > + * KUNIT_UAPI_EMBED_BLOB() - Embed another build artifact into the kernel
> > > > + * @_name: The name of symbol under which the artifact is embedded.
> > > > + * @_path: Path to the artifact on disk.
> > > > + *
> > > > + * Embeds a build artifact like a userspace executable into the kernel or current module.
> > > > + * The build artifact is read from disk and needs to be already built.
> > > > + */
> > > > +#define KUNIT_UAPI_EMBED_BLOB(_name, _path)					\
> > > > +	asm (									\
> > > > +	"	.pushsection .rodata, \"a\"				\n"	\
> > > > +	"	.global " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> > > > +	__stringify(CONCATENATE(_name, _data)) ":			\n"	\
> > > > +	"	.incbin " __stringify(_path) "				\n"	\
> > > > +	"	.size " __stringify(CONCATENATE(_name, _data)) ", "		\
> > > > +			". - " __stringify(CONCATENATE(_name, _data)) "	\n"	\
> > > > +	"	.global " __stringify(CONCATENATE(_name, _end)) "	\n"	\
> > > > +	__stringify(CONCATENATE(_name, _end)) ":			\n"	\
> > > > +	"	.popsection						\n"	\
> > > > +	);									\
> > > > +										\
> > > > +	extern const char CONCATENATE(_name, _data)[];				\
> > > > +	extern const char CONCATENATE(_name, _end)[];				\
> > > > +										\
> > > > +	static const struct kunit_uapi_blob _name = {				\
> > > > +		.path	= _path,						\
> > > > +		.data	= CONCATENATE(_name, _data),				\
> > > > +		.end	= CONCATENATE(_name, _end),				\
> > > > +	}									\
> > > 
> > > For me, the compiler could not find the files for the ".incbin" unless
> > > I added an include path. i.e. adding
> > >   ccflags-y := -I$(obj)
> > > to lib/kunit/Makefile fixed the problem for me.
> > 
> > Can you share some more details on your build setup?
> > This worked for me as-is and also passed 0day build testing.
> 
> Funny, I ran this on a Fedora 41 with gcc --version saying
> gcc (GCC) 14.3.1 20250523 (Red Hat 14.3.1-1)
> 
> I tried both 32 and 64 bit builds for ARCH=um.
> 
> Attaching my current kernel configuration and the last few lines of a
> V=1 build.
> 
> The kernel I used is a bit newer than what you had. Applied on top of
> ee88bddf7f2f5d1f1da87dd7bedc734048b70e88 (bpf-fixes merge).

So this happens because you are building inside the source tree.
scripts/Makefile.lib has this block:

# $(src) for including checkin headers from generated source files
# $(obj) for including generated headers from checkin source files
ifdef building_out_of_srctree
_c_flags   += $(addprefix -I, $(src) $(obj))
_a_flags   += $(addprefix -I, $(src) $(obj))
_cpp_flags += $(addprefix -I, $(src) $(obj))
endif

Apparently GNU/clang assemblers don't look for .incbin/.include files next to
the including files [0].
In contrast, the ARM compiler does (at least according to its docs) [1].

Maybe we can work around this in the macro, but I assume this will become even
uglier. So for the next revision I'll use your proposal of explicit cflags.
Or if Masahiro prefers to have a more global and generic solution, we can do that.

[0] https://sourceware.org/binutils/docs/as/I.html
[1] https://developer.arm.com/documentation/dui0801/l/Directives-Reference/INCBIN


Thomas

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts
  2025-06-26  6:10 ` [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
@ 2025-07-01 21:11   ` Rae Moar
  2025-07-03 15:29     ` Thomas Weißschuh
  0 siblings, 1 reply; 38+ messages in thread
From: Rae Moar @ 2025-07-01 21:11 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Shuah Khan,
	Jonathan Corbet, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

On Thu, Jun 26, 2025 at 2:10 AM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> If a subtest itself reports success, but the outer testcase fails,
> the whole testcase should be reported as a failure.
> However the status is recalculated based on the test counts,
> overwriting the outer test result.
> Synthesize a failed test in this case to make sure the failure is not
> swallowed.

Hello!

This is a very exciting patch series! However, I have a few concerns
with this patch.

When I parse the following KTAP with this change:

KTAP version 1
1..2
    KTAP version 1
    1..2
        ok 1 test 1
        not ok 2 test 2
not ok 1 subtest 1
    KTAP version 1
    1..1
        not ok 1 subsubtest 1
not ok 2 subtest 2

The output is:

[20:54:12] ============================================================
[20:54:12] ======================= (2 subtests) =======================
[20:54:12] [PASSED] test 1
[20:54:12] [FAILED] test 2
[20:54:12] ==================== [FAILED] subtest 1 ====================
[20:54:12] ======================= (1 subtest) ========================
[20:54:12] [FAILED] subsubtest 1
[20:54:12] ==================== [FAILED] subtest 2 ====================
[20:54:12] ============================================================
[20:54:12] Testing complete. Ran 6 tests: passed: 1, failed: 5

This reports a total of 6 tests, which is not equivalent to the three
subtests plus the two suites. I believe this is because the change to
bubble_up_test_results below double counts the failed test case.

Historically, the KUnit parser only counts the results of test cases,
not the suites. I would like to stay as close to this as possible so
as to not inflate existing testing numbers. However, I believe the
main concern here is the case where if there is a suite reporting
failure but all subtests pass, it will not appear in the summary line.
For example,

KTAP version 1
1..1
    KTAP version 1
    1..1
        ok 1 test 1
not ok 1 subtest 1

Reporting: All passing: Tests run: 1, passed: 1

This is absolutely an important edge case to cover. Therefore, we
should add 1 failure count to the suite count if the bubbled up
results indicate it should instead pass.

Thanks!
-Rae

>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Reviewed-by: David Gow <davidgow@google.com>
> ---
>  tools/testing/kunit/kunit_parser.py                                  | 5 +++++
>  tools/testing/kunit/kunit_tool_test.py                               | 3 ++-
>  tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log | 3 +++
>  3 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
> index c176487356e6c94882046b19ea696d750905b8d5..2478beb28fc3db825855ad46200340e884da7df1 100644
> --- a/tools/testing/kunit/kunit_parser.py
> +++ b/tools/testing/kunit/kunit_parser.py
> @@ -686,6 +686,11 @@ def bubble_up_test_results(test: Test) -> None:
>                 counts.add_status(status)
>         elif test.counts.get_status() == TestStatus.TEST_CRASHED:
>                 test.status = TestStatus.TEST_CRASHED
> +       if not test.ok_status():
> +               for t in subtests:
> +                       if not t.ok_status():
> +                               counts.add_status(t.status)
> +                               break

Here instead I recommend checking if not test.ok_status() and
test.counts.get_status() == TestStatus.SUCCESS and if so
counts.add_status(status)

>
>  def parse_test(lines: LineStream, expected_num: int, log: List[str], is_subtest: bool, printer: Printer) -> Test:
>         """
> diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
> index b74dc05fc2fe5b3ff629172fc7aafeb5c3d29fb3..48a0dd0f9c87caf9f018aade161db90a613fc407 100755
> --- a/tools/testing/kunit/kunit_tool_test.py
> +++ b/tools/testing/kunit/kunit_tool_test.py
> @@ -170,8 +170,9 @@ class KUnitParserTest(unittest.TestCase):
>                 with open(nested_log) as file:
>                         result = kunit_parser.parse_run_tests(file.readlines(), stdout)
>                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
> -               self.assertEqual(result.counts.failed, 2)
> +               self.assertEqual(result.counts.failed, 3)
>                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[0].status)
> +               self.assertEqual(kunit_parser.TestStatus.SUCCESS, result.subtests[0].subtests[0].status)
>                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].status)
>                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].subtests[0].status)
>
> diff --git a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> index 2e528da39ab5b2be0fca6cf9160c10929fba3c9e..5498dfd0b0db24663e1a1e9bf78c587de6746522 100644
> --- a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> +++ b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> @@ -1,5 +1,8 @@
>  KTAP version 1
>  1..2
> +    KTAP version 1
> +    1..1
> +        ok 1 test 1
>  not ok 1 subtest 1
>      KTAP version 1
>      1..1
>
> --
> 2.50.0
>
> --
> You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kunit-dev/20250626-kunit-kselftests-v4-8-48760534fef5%40linutronix.de.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h
  2025-06-26  6:10 ` [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h Thomas Weißschuh
@ 2025-07-01 21:22   ` Rae Moar
  2025-07-03 15:59     ` Thomas Weißschuh
  0 siblings, 1 reply; 38+ messages in thread
From: Rae Moar @ 2025-07-01 21:22 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Shuah Khan,
	Jonathan Corbet, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

On Thu, Jun 26, 2025 at 2:10 AM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Skipped tests reported by kselftest.h use a different format than KTAP,
> there is no explicit test name. Normally the test name is part of the
> free-form string after the SKIP keyword:
>
>         ok 3 # SKIP test: some reason
>
> Extend the parser to handle those correctly. Use the free-form string as
> test name instead.

Hello!

I am happy to see that the kunit_parser will be used to parse
kselftest.h patches!

This patch looks pretty good to me! However, I do have one concern
where it does cause the parser to break.

Thanks!
-Rae

>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Reviewed-by: David Gow <davidgow@google.com>
> ---
>  tools/testing/kunit/kunit_parser.py                             | 8 +++++---
>  tools/testing/kunit/test_data/test_is_test_passed-kselftest.log | 3 ++-
>  2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
> index 2478beb28fc3db825855ad46200340e884da7df1..4599d23c79b79f0e219d655c7053c8c3b34f8152 100644
> --- a/tools/testing/kunit/kunit_parser.py
> +++ b/tools/testing/kunit/kunit_parser.py
> @@ -352,9 +352,9 @@ def parse_test_plan(lines: LineStream, test: Test) -> bool:
>         lines.pop()
>         return True
>
> -TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?([^#]*)( # .*)?$')
> +TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?([^#]*)( # .*)?$')
>
> -TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?(.*) # SKIP(.*)$')
> +TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?(.*) # SKIP ?(.*)$')

My concern with this patch is that this makes the test number optional
([0-9]+) -> ([0-9]+)? for both the test result regex matches. But if I
do pass in KTAP containing a line where the test number is missing, it
causes the parser to crash because other lines of the code rely on the
match with the test number.

I would prefer if we keep the test number as required. This is
integral to the KTAP specification and seems to be largely shared by
different frameworks test output.

>
>  def peek_test_name_match(lines: LineStream, test: Test) -> bool:
>         """
> @@ -379,6 +379,8 @@ def peek_test_name_match(lines: LineStream, test: Test) -> bool:
>         if not match:
>                 return False
>         name = match.group(4)
> +       if not name:
> +               return False
>         return name == test.name
>
>  def parse_test_result(lines: LineStream, test: Test,
> @@ -416,7 +418,7 @@ def parse_test_result(lines: LineStream, test: Test,
>
>         # Set name of test object
>         if skip_match:
> -               test.name = skip_match.group(4)
> +               test.name = skip_match.group(4) or skip_match.group(5)
>         else:
>                 test.name = match.group(4)
>
> diff --git a/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log b/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log
> index 65d3f27feaf22a3f47ed831c4c24f6f11c625a92..30d9ef18bcec177067288d5242771236f29b7d56 100644
> --- a/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log
> +++ b/tools/testing/kunit/test_data/test_is_test_passed-kselftest.log
> @@ -1,5 +1,5 @@
>  TAP version 13
> -1..2
> +1..3
>  # selftests: membarrier: membarrier_test_single_thread
>  # TAP version 13
>  # 1..2
> @@ -12,3 +12,4 @@ ok 1 selftests: membarrier: membarrier_test_single_thread
>  # ok 1 sys_membarrier available
>  # ok 2 sys membarrier invalid command test: command = -1, flags = 0, errno = 22. Failed as expected
>  ok 2 selftests: membarrier: membarrier_test_multi_thread
> +ok 3 # SKIP selftests: membarrier: membarrier_test_multi_thread
>
> --
> 2.50.0
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 07/15] kunit: tool: Add test for nested test result reporting
  2025-06-26  6:10 ` [PATCH v4 07/15] kunit: tool: Add test for nested test result reporting Thomas Weißschuh
@ 2025-07-01 21:26   ` Rae Moar
  0 siblings, 0 replies; 38+ messages in thread
From: Rae Moar @ 2025-07-01 21:26 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Shuah Khan,
	Jonathan Corbet, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

On Thu, Jun 26, 2025 at 2:10 AM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Currently there is no test validating the result reporting from nested
> tests. Add one, it will also be used to validate upcoming changes to the
> nested test parsing.

Hello!

This patch looks good to me! However, most of the tests in
kunit-tool-test do check nested test output but we do lack checks for
failing tests. Could we change this commit description to be something
like: "Currently there is a lack of tests validating failed results
reporting from nested tests."?

Reviewed-by: Rae Moar <rmoar@google.com>

Thanks!
-Rae

>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Reviewed-by: David Gow <davidgow@google.com>
> ---
>  tools/testing/kunit/kunit_tool_test.py                         | 10 ++++++++++
>  .../kunit/test_data/test_is_test_passed-failure-nested.log     |  7 +++++++
>  2 files changed, 17 insertions(+)
>
> diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
> index bbba921e0eacb18663abfcabb2bccf330d8666f5..b74dc05fc2fe5b3ff629172fc7aafeb5c3d29fb3 100755
> --- a/tools/testing/kunit/kunit_tool_test.py
> +++ b/tools/testing/kunit/kunit_tool_test.py
> @@ -165,6 +165,16 @@ class KUnitParserTest(unittest.TestCase):
>                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
>                 self.assertEqual(result.counts.errors, 0)
>
> +       def test_parse_failed_nested_tests_log(self):
> +               nested_log = test_data_path('test_is_test_passed-failure-nested.log')
> +               with open(nested_log) as file:
> +                       result = kunit_parser.parse_run_tests(file.readlines(), stdout)
> +               self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
> +               self.assertEqual(result.counts.failed, 2)
> +               self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[0].status)
> +               self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].status)
> +               self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].subtests[0].status)
> +
>         def test_no_header(self):
>                 empty_log = test_data_path('test_is_test_passed-no_tests_run_no_header.log')
>                 with open(empty_log) as file:
> diff --git a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> new file mode 100644
> index 0000000000000000000000000000000000000000..2e528da39ab5b2be0fca6cf9160c10929fba3c9e
> --- /dev/null
> +++ b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> @@ -0,0 +1,7 @@
> +KTAP version 1
> +1..2
> +not ok 1 subtest 1
> +    KTAP version 1
> +    1..1
> +        not ok 1 subsubtest 1
> +not ok 2 subtest 2
>
> --
> 2.50.0
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel
  2025-06-26  6:10 ` [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel Thomas Weißschuh
@ 2025-07-03 13:59   ` Nicolas Schier
  2025-07-04 21:51   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Nicolas Schier @ 2025-07-03 13:59 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

On Thu, Jun 26, 2025 at 08:10:09AM +0200, Thomas Weißschuh wrote:
> The duplication makes maintenance harder. Changes need to be done in two
> places and the lines will grow overly long.
> 
> Use an intermediary variable instead.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Nicolas Schier <n.schier@avm.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI from kernel
  2025-06-26  6:10 ` [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI " Thomas Weißschuh
@ 2025-07-03 14:00   ` Nicolas Schier
  2025-07-04 21:51   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Nicolas Schier @ 2025-07-03 14:00 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

On Thu, Jun 26, 2025 at 08:10:10AM +0200, Thomas Weißschuh wrote:
> Make sure the byte order and ABI of the userprogs matches the one of the
> kernel, similar to how the bit size is handled.
> Otherwise the userprogs may not be executable.
> This happens for example on powerpc little endian, or riscv32.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Nicolas Schier <n.schier@avm.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 03/15] kbuild: doc: add label for userprogs section
  2025-06-26  6:10 ` [PATCH v4 03/15] kbuild: doc: add label for userprogs section Thomas Weißschuh
@ 2025-07-03 14:00   ` Nicolas Schier
  2025-07-04 21:55   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Nicolas Schier @ 2025-07-03 14:00 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On Thu, Jun 26, 2025 at 08:10:11AM +0200, Thomas Weißschuh wrote:
> Some upcoming new documentation should link directly to the userprogs section.
> 
> Add a label to the section so it can be referenced.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  Documentation/kbuild/makefiles.rst | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Nicolas Schier <n.schier@avm.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC
  2025-06-26  6:10 ` [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC Thomas Weißschuh
@ 2025-07-03 14:00   ` Nicolas Schier
  2025-07-04 21:55   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Nicolas Schier @ 2025-07-03 14:00 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On Thu, Jun 26, 2025 at 08:10:12AM +0200, Thomas Weißschuh wrote:
> For the kunit UAPI functionality this feature is needed.
> 
> This reverts commit d1b99cdf22e0 ("init: remove unused CONFIG_CC_CAN_LINK_STATIC")
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  init/Kconfig | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Nicolas Schier <n.schier@avm.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 05/15] init: add nolibc build support
  2025-06-26  6:10 ` [PATCH v4 05/15] init: add nolibc build support Thomas Weißschuh
@ 2025-07-03 14:01   ` Nicolas Schier
  0 siblings, 0 replies; 38+ messages in thread
From: Nicolas Schier @ 2025-07-03 14:01 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On Thu, Jun 26, 2025 at 08:10:13AM +0200, Thomas Weißschuh wrote:
> Building userspace applications through the kbuild "userprogs" framework
> requires a libc. Kernel toolchains often do not contain a libc.
> In this case it is useful to use the nolibc library from the kernel tree.
> Nolibc does not support all architectures and requires compiler flags.
> 
> Add a kconfig option, so users can know where it is available and provide a
> variable for common options.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  MAINTAINERS          |  2 ++
>  init/Kconfig         |  2 ++
>  init/Kconfig.nolibc  | 15 +++++++++++++++
>  init/Makefile.nolibc | 13 +++++++++++++
>  4 files changed, 32 insertions(+)

Reviewed-by: Nicolas Schier <n.schier@avm.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts
  2025-07-01 21:11   ` Rae Moar
@ 2025-07-03 15:29     ` Thomas Weißschuh
  2025-07-04 12:55       ` Thomas Weißschuh
  0 siblings, 1 reply; 38+ messages in thread
From: Thomas Weißschuh @ 2025-07-03 15:29 UTC (permalink / raw)
  To: Rae Moar
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Shuah Khan,
	Jonathan Corbet, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

On Tue, Jul 01, 2025 at 05:11:59PM -0400, Rae Moar wrote:
> On Thu, Jun 26, 2025 at 2:10 AM Thomas Weißschuh
> <thomas.weissschuh@linutronix.de> wrote:
> >
> > If a subtest itself reports success, but the outer testcase fails,
> > the whole testcase should be reported as a failure.
> > However the status is recalculated based on the test counts,
> > overwriting the outer test result.
> > Synthesize a failed test in this case to make sure the failure is not
> > swallowed.
> 
> This is a very exciting patch series! However, I have a few concerns
> with this patch.

Thanks for the review!

> When I parse the following KTAP with this change:
> 
> KTAP version 1
> 1..2
>     KTAP version 1
>     1..2
>         ok 1 test 1
>         not ok 2 test 2
> not ok 1 subtest 1
>     KTAP version 1
>     1..1
>         not ok 1 subsubtest 1
> not ok 2 subtest 2
> 
> The output is:
> 
> [20:54:12] ============================================================
> [20:54:12] ======================= (2 subtests) =======================
> [20:54:12] [PASSED] test 1
> [20:54:12] [FAILED] test 2
> [20:54:12] ==================== [FAILED] subtest 1 ====================
> [20:54:12] ======================= (1 subtest) ========================
> [20:54:12] [FAILED] subsubtest 1
> [20:54:12] ==================== [FAILED] subtest 2 ====================
> [20:54:12] ============================================================
> [20:54:12] Testing complete. Ran 6 tests: passed: 1, failed: 5
> 
> This reports a total of 6 tests, which is not equivalent to the three
> subtests plus the two suites. I believe this is because the change to
> bubble_up_test_results below double counts the failed test case.
> 
> Historically, the KUnit parser only counts the results of test cases,
> not the suites. I would like to stay as close to this as possible so
> as to not inflate existing testing numbers. However, I believe the
> main concern here is the case where if there is a suite reporting
> failure but all subtests pass, it will not appear in the summary line.
> For example,
> 
> KTAP version 1
> 1..1
>     KTAP version 1
>     1..1
>         ok 1 test 1
> not ok 1 subtest 1
> 
> Reporting: All passing: Tests run: 1, passed: 1
> 
> This is absolutely an important edge case to cover. Therefore, we
> should add 1 failure count to the suite count if the bubbled up
> results indicate it should instead pass.

Makes sense.

> >
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > Reviewed-by: David Gow <davidgow@google.com>
> > ---
> >  tools/testing/kunit/kunit_parser.py                                  | 5 +++++
> >  tools/testing/kunit/kunit_tool_test.py                               | 3 ++-
> >  tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log | 3 +++
> >  3 files changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
> > index c176487356e6c94882046b19ea696d750905b8d5..2478beb28fc3db825855ad46200340e884da7df1 100644
> > --- a/tools/testing/kunit/kunit_parser.py
> > +++ b/tools/testing/kunit/kunit_parser.py
> > @@ -686,6 +686,11 @@ def bubble_up_test_results(test: Test) -> None:
> >                 counts.add_status(status)
> >         elif test.counts.get_status() == TestStatus.TEST_CRASHED:
> >                 test.status = TestStatus.TEST_CRASHED
> > +       if not test.ok_status():
> > +               for t in subtests:
> > +                       if not t.ok_status():
> > +                               counts.add_status(t.status)
> > +                               break
> 
> Here instead I recommend checking if not test.ok_status() and
> test.counts.get_status() == TestStatus.SUCCESS and if so
> counts.add_status(status)

Thanks for the recommendation. I tried this and it works well for this specific
testcase, but unfortunately all kinds of othes tests are now broken.
I'll look into it some more, but any hints are highly appreciated.
It has been a while since I looked at the code.

> >  def parse_test(lines: LineStream, expected_num: int, log: List[str], is_subtest: bool, printer: Printer) -> Test:
> >         """
> > diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py
> > index b74dc05fc2fe5b3ff629172fc7aafeb5c3d29fb3..48a0dd0f9c87caf9f018aade161db90a613fc407 100755
> > --- a/tools/testing/kunit/kunit_tool_test.py
> > +++ b/tools/testing/kunit/kunit_tool_test.py
> > @@ -170,8 +170,9 @@ class KUnitParserTest(unittest.TestCase):
> >                 with open(nested_log) as file:
> >                         result = kunit_parser.parse_run_tests(file.readlines(), stdout)
> >                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.status)
> > -               self.assertEqual(result.counts.failed, 2)
> > +               self.assertEqual(result.counts.failed, 3)
> >                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[0].status)
> > +               self.assertEqual(kunit_parser.TestStatus.SUCCESS, result.subtests[0].subtests[0].status)
> >                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].status)
> >                 self.assertEqual(kunit_parser.TestStatus.FAILURE, result.subtests[1].subtests[0].status)
> >
> > diff --git a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> > index 2e528da39ab5b2be0fca6cf9160c10929fba3c9e..5498dfd0b0db24663e1a1e9bf78c587de6746522 100644
> > --- a/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> > +++ b/tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log
> > @@ -1,5 +1,8 @@
> >  KTAP version 1
> >  1..2
> > +    KTAP version 1
> > +    1..1
> > +        ok 1 test 1
> >  not ok 1 subtest 1
> >      KTAP version 1
> >      1..1
> >
> > --
> > 2.50.0
> >
> > --
> > You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@googlegroups.com.
> > To view this discussion visit https://groups.google.com/d/msgid/kunit-dev/20250626-kunit-kselftests-v4-8-48760534fef5%40linutronix.de.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h
  2025-07-01 21:22   ` Rae Moar
@ 2025-07-03 15:59     ` Thomas Weißschuh
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-07-03 15:59 UTC (permalink / raw)
  To: Rae Moar
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Shuah Khan,
	Jonathan Corbet, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

On Tue, Jul 01, 2025 at 05:22:07PM -0400, Rae Moar wrote:
> On Thu, Jun 26, 2025 at 2:10 AM Thomas Weißschuh
> <thomas.weissschuh@linutronix.de> wrote:

<snip>

> > -TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?([^#]*)( # .*)?$')
> > +TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?([^#]*)( # .*)?$')
> >
> > -TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?(.*) # SKIP(.*)$')
> > +TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?(.*) # SKIP ?(.*)$')
> 
> My concern with this patch is that this makes the test number optional
> ([0-9]+) -> ([0-9]+)? for both the test result regex matches. But if I
> do pass in KTAP containing a line where the test number is missing, it
> causes the parser to crash because other lines of the code rely on the
> match with the test number.
> 
> I would prefer if we keep the test number as required. This is
> integral to the KTAP specification and seems to be largely shared by
> different frameworks test output.

This part of the patch was actually unnecessary, so I dropped it.
Good catch, thanks.

<snip>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts
  2025-07-03 15:29     ` Thomas Weißschuh
@ 2025-07-04 12:55       ` Thomas Weißschuh
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-07-04 12:55 UTC (permalink / raw)
  To: Rae Moar
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Shuah Khan,
	Jonathan Corbet, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows

Hi Rae,

On Thu, Jul 03, 2025 at 05:30:02PM +0200, Thomas Weißschuh wrote:
> On Tue, Jul 01, 2025 at 05:11:59PM -0400, Rae Moar wrote:

<snip>

> > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > > Reviewed-by: David Gow <davidgow@google.com>
> > > ---
> > >  tools/testing/kunit/kunit_parser.py                                  | 5 +++++
> > >  tools/testing/kunit/kunit_tool_test.py                               | 3 ++-
> > >  tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log | 3 +++
> > >  3 files changed, 10 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
> > > index c176487356e6c94882046b19ea696d750905b8d5..2478beb28fc3db825855ad46200340e884da7df1 100644
> > > --- a/tools/testing/kunit/kunit_parser.py
> > > +++ b/tools/testing/kunit/kunit_parser.py
> > > @@ -686,6 +686,11 @@ def bubble_up_test_results(test: Test) -> None:
> > >                 counts.add_status(status)
> > >         elif test.counts.get_status() == TestStatus.TEST_CRASHED:
> > >                 test.status = TestStatus.TEST_CRASHED
> > > +       if not test.ok_status():
> > > +               for t in subtests:
> > > +                       if not t.ok_status():
> > > +                               counts.add_status(t.status)
> > > +                               break
> > 
> > Here instead I recommend checking if not test.ok_status() and
> > test.counts.get_status() == TestStatus.SUCCESS and if so
> > counts.add_status(status)
> 
> Thanks for the recommendation. I tried this and it works well for this specific
> testcase, but unfortunately all kinds of othes tests are now broken.
> I'll look into it some more, but any hints are highly appreciated.
> It has been a while since I looked at the code.

The following variant passes all tests. What do you think?

diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
index 333cd3a4a56b..5338489dcbe4 100644
--- a/tools/testing/kunit/kunit_parser.py
+++ b/tools/testing/kunit/kunit_parser.py
@@ -689,6 +689,9 @@ def bubble_up_test_results(test: Test) -> None:
        elif test.counts.get_status() == TestStatus.TEST_CRASHED:
                test.status = TestStatus.TEST_CRASHED
 
+       if status == TestStatus.FAILURE and test.counts.get_status() == TestStatus.SUCCESS:
+               counts.add_status(status)
+

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel
  2025-06-26  6:10 ` [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel Thomas Weißschuh
  2025-07-03 13:59   ` Nicolas Schier
@ 2025-07-04 21:51   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Masahiro Yamada @ 2025-07-04 21:51 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows

On Thu, Jun 26, 2025 at 3:10 PM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> The duplication makes maintenance harder. Changes need to be done in two
> places and the lines will grow overly long.
>
> Use an intermediary variable instead.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 35e6e5240c61a8a329011929fcd0352b881dccdc..c4293cf91e968ca8ee64452841fb266e24df63f6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1130,8 +1130,9 @@ LDFLAGS_vmlinux   += --emit-relocs --discard-none
>  endif
>
>  # Align the bit size of userspace programs with the kernel
> -KBUILD_USERCFLAGS  += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
> -KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
> +USERFLAGS_FROM_KERNEL := -m32 -m64 --target=%
> +KBUILD_USERCFLAGS  += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
> +KBUILD_USERLDFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
>

Acked-by: Masahiro Yamada <masahiroy@kernel.org>

However, as I mentioned before, the following code is shorter.

USERFLAGS_FROM_KERNEL := $(filter -m32 -m64 --target=%,
$(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
KBUILD_USERCFLAGS  += $(USERFLAGS_FROM_KERNEL)
KBUILD_USERLDFLAGS += $(USERFLAGS_FROM_KERNEL)



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI from kernel
  2025-06-26  6:10 ` [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI " Thomas Weißschuh
  2025-07-03 14:00   ` Nicolas Schier
@ 2025-07-04 21:51   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Masahiro Yamada @ 2025-07-04 21:51 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows

On Thu, Jun 26, 2025 at 3:10 PM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Make sure the byte order and ABI of the userprogs matches the one of the
> kernel, similar to how the bit size is handled.
> Otherwise the userprogs may not be executable.
> This happens for example on powerpc little endian, or riscv32.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c4293cf91e968ca8ee64452841fb266e24df63f6..b9aa1058321dabd3b3dd5610e45a2807dfa257f4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1129,8 +1129,8 @@ ifneq ($(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS),)
>  LDFLAGS_vmlinux        += --emit-relocs --discard-none
>  endif
>
> -# Align the bit size of userspace programs with the kernel
> -USERFLAGS_FROM_KERNEL := -m32 -m64 --target=%
> +# Align the bit size, byte order and architecture of userspace programs with the kernel
> +USERFLAGS_FROM_KERNEL := -m32 -m64 -mlittle-endian -mbig-endian --target=% -march=% -mabi=%
>  KBUILD_USERCFLAGS  += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
>  KBUILD_USERLDFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))


Acked-by: Masahiro Yamada <masahiroy@kernel.org>

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC
  2025-06-26  6:10 ` [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC Thomas Weißschuh
  2025-07-03 14:00   ` Nicolas Schier
@ 2025-07-04 21:55   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Masahiro Yamada @ 2025-07-04 21:55 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows

On Thu, Jun 26, 2025 at 3:10 PM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> For the kunit UAPI functionality this feature is needed.
>
> This reverts commit d1b99cdf22e0 ("init: remove unused CONFIG_CC_CAN_LINK_STATIC")
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  init/Kconfig | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index af4c2f0854554bbcdf193852cf5c1d2c2accc64f..26cafbad4f1560fb56b4bef31ae29baf54175661 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -87,6 +87,11 @@ config CC_CAN_LINK
>         default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
>         default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))
>
> +config CC_CAN_LINK_STATIC
> +       bool
> +       default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
> +       default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
> +
>  # Fixed in GCC 14, 13.3, 12.4 and 11.5
>  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
>  config GCC_ASM_GOTO_OUTPUT_BROKEN
>
> --
> 2.50.0
>
>

Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 03/15] kbuild: doc: add label for userprogs section
  2025-06-26  6:10 ` [PATCH v4 03/15] kbuild: doc: add label for userprogs section Thomas Weißschuh
  2025-07-03 14:00   ` Nicolas Schier
@ 2025-07-04 21:55   ` Masahiro Yamada
  1 sibling, 0 replies; 38+ messages in thread
From: Masahiro Yamada @ 2025-07-04 21:55 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Jonathan Corbet, Nicolas Schier, Christophe Leroy,
	linux-kbuild, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	workflows

On Thu, Jun 26, 2025 at 3:10 PM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Some upcoming new documentation should link directly to the userprogs section.
>
> Add a label to the section so it can be referenced.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  Documentation/kbuild/makefiles.rst | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
> index 8aef3650c1f32b6b197e0dc777e26775d371a081..c14c1f632f6069c8751c8388a35bef539e19f9e8 100644
> --- a/Documentation/kbuild/makefiles.rst
> +++ b/Documentation/kbuild/makefiles.rst
> @@ -891,6 +891,8 @@ This is possible in two ways:
>      This will tell kbuild to build lxdialog even if not referenced in
>      any rule.
>
> +.. _kbuild_userprogs:
> +
>  Userspace Program support


Acked-by: Masahiro Yamada <masahiroy@kernel.org>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 00/15] kunit: Introduce UAPI testing framework
  2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
                   ` (14 preceding siblings ...)
  2025-06-26  6:10 ` [PATCH v4 15/15] kunit: uapi: Validate usability of /proc Thomas Weißschuh
@ 2025-07-07 18:18 ` Jonathan Corbet
  2025-07-08  5:51   ` Thomas Weißschuh
  15 siblings, 1 reply; 38+ messages in thread
From: Jonathan Corbet @ 2025-07-07 18:18 UTC (permalink / raw)
  To: Thomas Weißschuh, Masahiro Yamada, Nathan Chancellor,
	Andrew Morton, Willy Tarreau, Thomas Weißschuh,
	Brendan Higgins, David Gow, Rae Moar, Shuah Khan, Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows, Thomas Weißschuh, Kees Cook,
	Alexander Viro, Christian Brauner, Jan Kara, linux-mm,
	linux-fsdevel

Thomas Weißschuh <thomas.weissschuh@linutronix.de> writes:

> This series aims to combine kselftests and kunit, avoiding both their
> limitations. It works by compiling the userspace kselftests as part of
> the regular kernel build, embedding them into the kunit kernel or module
> and executing them from there.

Please forgive the possibly dumb question but ... this series sets up
the framework, but doesn't actually integrate the kselftests, right?
Will it be necessary to write a little KUnit glue function for each
kselftest, or is there some other scheme in mind here?

Thanks,

jon

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 00/15] kunit: Introduce UAPI testing framework
  2025-07-07 18:18 ` [PATCH v4 00/15] kunit: Introduce UAPI testing framework Jonathan Corbet
@ 2025-07-08  5:51   ` Thomas Weißschuh
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Weißschuh @ 2025-07-08  5:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Masahiro Yamada, Nathan Chancellor, Andrew Morton, Willy Tarreau,
	Thomas Weißschuh, Brendan Higgins, David Gow, Rae Moar,
	Shuah Khan, Nicolas Schier, Christophe Leroy, linux-kbuild,
	linux-kernel, linux-kselftest, kunit-dev, linux-doc, workflows,
	Kees Cook, Alexander Viro, Christian Brauner, Jan Kara, linux-mm,
	linux-fsdevel

On Mon, Jul 07, 2025 at 12:18:01PM -0600, Jonathan Corbet wrote:
> Thomas Weißschuh <thomas.weissschuh@linutronix.de> writes:
> 
> > This series aims to combine kselftests and kunit, avoiding both their
> > limitations. It works by compiling the userspace kselftests as part of
> > the regular kernel build, embedding them into the kunit kernel or module
> > and executing them from there.
> 
> Please forgive the possibly dumb question but ... this series sets up
> the framework, but doesn't actually integrate the kselftests, right?

Correct.

> Will it be necessary to write a little KUnit glue function for each
> kselftest, or is there some other scheme in mind here?

With the current framework it is necessary to write some glue code:
* A stub .c file which #includes the existing kselftest source
* A kbuild userprog Makefile
* A custom KUnit function which calls kunit_uapi_run_kselftest()

A more high-level scheme may come later, but so far I have not worked on that.
It would be nice for example to build and run the tests for all ABIs supported
by a kernel without a lot of manual code duplication.
And maybe have some higher level helpers around declaring the tests.


Thomas

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH v4 14/15] kunit: uapi: Introduce preinit executable
  2025-06-26  6:10 ` [PATCH v4 14/15] kunit: uapi: Introduce preinit executable Thomas Weißschuh
@ 2025-07-12  9:49   ` Muhammad Usama Anjum
  0 siblings, 0 replies; 38+ messages in thread
From: Muhammad Usama Anjum @ 2025-07-12  9:49 UTC (permalink / raw)
  To: Thomas Weißschuh, Masahiro Yamada, Nathan Chancellor,
	Andrew Morton, Willy Tarreau, Thomas Weißschuh,
	Brendan Higgins, David Gow, Rae Moar, Shuah Khan, Jonathan Corbet,
	Nicolas Schier
  Cc: Christophe Leroy, linux-kbuild, linux-kernel, linux-kselftest,
	kunit-dev, linux-doc, workflows

On 6/26/25 11:10 AM, Thomas WeiÃschuh wrote:
> UAPI selftests may expect a "normal" userspace environment.
> For example the normal kernel API pseudo-filesystems should be mounted.
> This could be done from kernel code but it is non-idiomatic.
> 
> Add a preinit userspace executable which performs these setup steps
> before running the final test executable.
> This preinit executable is only ever run from the kernel.
> Give it access to autoconf.h and kconfig.h to adapt itself to the
> tested kernel.
From perspective of kselftests, I've liked the approach. Once we have an
automated way to run all the tests by some simple stubs, it would solve
the inherent problem of kselftests that it require different config options
enabled before tests can run. Hopefully, they would be auto enabled / disabled as
kernel config changes.

Acked-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Reviewed-by: David Gow <davidgow@google.com>
> ---
>  MAINTAINERS              |  1 +
>  lib/kunit/Makefile       |  6 +++++
>  lib/kunit/kunit-uapi.c   |  9 +++++--
>  lib/kunit/uapi-preinit.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 77 insertions(+), 2 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b1405f0a0e638d1654d9dc9e51d784ddc838cf5b..e81dfa180ab374ef91c7a45e546e6e9a8f454fa7 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -13546,6 +13546,7 @@ S:	Maintained
>  F:	include/kunit/uapi.h
>  F:	lib/kunit/kunit-example-uapi.c
>  F:	lib/kunit/kunit-uapi.c
> +F:	lib/kunit/uapi-preinit.c
>  
>  KVM PARAVIRT (KVM/paravirt)
>  M:	Paolo Bonzini <pbonzini@redhat.com>
> diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
> index 1bba7965613e36e26939d6b31e1d65acf5bad0dc..b50f3bc8bc7f3ade03be4900d9163d7a0d96863c 100644
> --- a/lib/kunit/Makefile
> +++ b/lib/kunit/Makefile
> @@ -14,8 +14,14 @@ kunit-objs +=				test.o \
>  					device.o \
>  					platform.o
>  
> +userprogs +=				uapi-preinit
> +uapi-preinit-userccflags +=		-static $(NOLIBC_USERCFLAGS) \
> +					-include include/generated/autoconf.h \
> +					-include $(srctree)/tools/include/linux/kconfig.h
>  obj-$(CONFIG_KUNIT_UAPI) +=		kunit-uapi.o
>  
> +$(obj)/kunit-uapi.o: $(obj)/uapi-preinit
> +
>  ifeq ($(CONFIG_KUNIT_DEBUGFS),y)
>  kunit-objs +=				debugfs.o
>  endif
> diff --git a/lib/kunit/kunit-uapi.c b/lib/kunit/kunit-uapi.c
> index cfe8440e16fde942a5f0fa7ac9d8ab90a737215b..7c87605b9ded9dbeb3968af8a8f4650ab5938887 100644
> --- a/lib/kunit/kunit-uapi.c
> +++ b/lib/kunit/kunit-uapi.c
> @@ -25,6 +25,8 @@
>  #define KSFT_XPASS	3
>  #define KSFT_SKIP	4
>  
> +KUNIT_UAPI_EMBED_BLOB(kunit_uapi_preinit, "uapi-preinit");
> +
>  static struct vfsmount *kunit_uapi_mount_ramfs(void)
>  {
>  	struct file_system_type *type;
> @@ -146,7 +148,7 @@ static int kunit_uapi_user_mode_thread_init(void *data)
>  	kernel_sigaction(SIGABRT, SIG_DFL);
>  
>  	complete(&ctx->setup_done);
> -	ctx->exec_err = kernel_execve(ctx->executable, argv, NULL);
> +	ctx->exec_err = kernel_execve(kbasename(kunit_uapi_preinit.path), argv, NULL);
>  	if (!ctx->exec_err)
>  		return 0;
>  	do_exit(0);
> @@ -255,7 +257,10 @@ static int kunit_uapi_run_executable(struct kunit *test,
>  	if (IS_ERR(mnt))
>  		return PTR_ERR(mnt);
>  
> -	err = kunit_uapi_write_executable(mnt, executable);
> +	err = kunit_uapi_write_executable(mnt, &kunit_uapi_preinit);
> +
> +	if (!err)
> +		err = kunit_uapi_write_executable(mnt, executable);
>  
>  	if (!err)
>  		err = kunit_uapi_run_executable_in_mount(test, exe_name, mnt);
> diff --git a/lib/kunit/uapi-preinit.c b/lib/kunit/uapi-preinit.c
> new file mode 100644
> index 0000000000000000000000000000000000000000..81182039965a8c93aebb2d5d76f4113bfef277a6
> --- /dev/null
> +++ b/lib/kunit/uapi-preinit.c
> @@ -0,0 +1,63 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * KUnit Userspace environment setup.
> + *
> + * Copyright (C) 2025, Linutronix GmbH.
> + * Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> + *
> + * This is *userspace* code.
> + */
> +
> +#include <sys/mount.h>
> +#include <sys/stat.h>
> +
> +#include "../../tools/testing/selftests/kselftest.h"
> +
> +static int setup_api_mount(const char *target, const char *fstype)
> +{
> +	int ret;
> +
> +	ret = mkdir(target, 0755);
> +	if (ret && errno != EEXIST)
> +		return -errno;
> +
> +	ret = mount("none", target, fstype, 0, NULL);
> +	if (ret && errno != EBUSY)
> +		return -errno;
> +
> +	return 0;
> +}
> +
> +static void exit_failure(const char *stage, int err)
> +{
> +	/* If preinit fails synthesize a failed test report. */
> +	ksft_print_header();
> +	ksft_set_plan(1);
> +	ksft_test_result_fail("Failed during test setup: %s: %s\n", stage, strerror(-err));
Positive error values are passed to strerror() without the - sign in userspace.
Probably - needs to be removed from strerror() here.

> +	ksft_finished();
> +}
> +
> +int main(int argc, char **argv, char **envp)
> +{
> +	int ret;
> +
> +	ret = setup_api_mount("/proc", "proc");
> +	if (ret)
> +		exit_failure("mount /proc", ret);
> +
> +	ret = setup_api_mount("/sys", "sysfs");
> +	if (ret)
> +		exit_failure("mount /sys", ret);
> +
> +	if (IS_ENABLED(CONFIG_DEVTMPFS)) {
> +		ret = setup_api_mount("/dev", "devtmpfs");
> +		if (ret)
> +			exit_failure("mount /dev", ret);
> +	}
> +
> +	ret = execve(argv[0], argv, envp);
> +	if (ret)
> +		exit_failure("execve", ret);
> +
> +	return 0;
> +}
> 


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2025-07-12  9:50 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-26  6:10 [PATCH v4 00/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 01/15] kbuild: userprogs: avoid duplication of flags inherited from kernel Thomas Weißschuh
2025-07-03 13:59   ` Nicolas Schier
2025-07-04 21:51   ` Masahiro Yamada
2025-06-26  6:10 ` [PATCH v4 02/15] kbuild: userprogs: also inherit byte order and ABI " Thomas Weißschuh
2025-07-03 14:00   ` Nicolas Schier
2025-07-04 21:51   ` Masahiro Yamada
2025-06-26  6:10 ` [PATCH v4 03/15] kbuild: doc: add label for userprogs section Thomas Weißschuh
2025-07-03 14:00   ` Nicolas Schier
2025-07-04 21:55   ` Masahiro Yamada
2025-06-26  6:10 ` [PATCH v4 04/15] init: re-add CONFIG_CC_CAN_LINK_STATIC Thomas Weißschuh
2025-07-03 14:00   ` Nicolas Schier
2025-07-04 21:55   ` Masahiro Yamada
2025-06-26  6:10 ` [PATCH v4 05/15] init: add nolibc build support Thomas Weißschuh
2025-07-03 14:01   ` Nicolas Schier
2025-06-26  6:10 ` [PATCH v4 06/15] fs,fork,exit: export symbols necessary for KUnit UAPI support Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 07/15] kunit: tool: Add test for nested test result reporting Thomas Weißschuh
2025-07-01 21:26   ` Rae Moar
2025-06-26  6:10 ` [PATCH v4 08/15] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
2025-07-01 21:11   ` Rae Moar
2025-07-03 15:29     ` Thomas Weißschuh
2025-07-04 12:55       ` Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 09/15] kunit: tool: Parse skipped tests from kselftest.h Thomas Weißschuh
2025-07-01 21:22   ` Rae Moar
2025-07-03 15:59     ` Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 10/15] kunit: Always descend into kunit directory during build Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 11/15] kunit: qemu_configs: loongarch: Enable LSX/LSAX Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 12/15] kunit: Introduce UAPI testing framework Thomas Weißschuh
2025-06-26 18:11   ` Benjamin Berg
2025-06-27  4:20     ` Thomas Weißschuh
2025-06-27  6:58       ` Benjamin Berg
2025-06-27  8:27         ` Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 13/15] kunit: uapi: Add example for UAPI tests Thomas Weißschuh
2025-06-26  6:10 ` [PATCH v4 14/15] kunit: uapi: Introduce preinit executable Thomas Weißschuh
2025-07-12  9:49   ` Muhammad Usama Anjum
2025-06-26  6:10 ` [PATCH v4 15/15] kunit: uapi: Validate usability of /proc Thomas Weißschuh
2025-07-07 18:18 ` [PATCH v4 00/15] kunit: Introduce UAPI testing framework Jonathan Corbet
2025-07-08  5:51   ` 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;
as well as URLs for NNTP newsgroup(s).