public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/32] kselftest harness and nolibc compatibility
@ 2025-03-04  7:10 Thomas Weißschuh
  2025-03-04  7:10 ` [PATCH 01/32] selftests: harness: Add harness selftest Thomas Weißschuh
                   ` (32 more replies)
  0 siblings, 33 replies; 43+ messages in thread
From: Thomas Weißschuh @ 2025-03-04  7:10 UTC (permalink / raw)
  To: Shuah Khan, Shuah Khan, Willy Tarreau, Thomas Weißschuh
  Cc: linux-kernel, linux-kselftest, Thomas Weißschuh

Nolibc is useful for selftests as the test programs can be very small,
and compiled with just a kernel crosscompiler, without userspace support.
Currently nolibc is only usable with kselftest.h, not the more
convenient to use kselftest_harness.h
This series provides this compatibility by adding new features to nolibc
and removing the usage of problematic features from the harness.

The first half of the series are changes to the harness, the second one
are for nolibc. Both parts are very independent and can go through
different trees.
The last patch is not meant to be applied and serves as test that
everything works correctly.

Based on the next branch of the nolibc tree:
https://web.git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc.git/log/?h=next

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (32):
      selftests: harness: Add harness selftest
      selftests: harness: Use C89 comment style
      selftests: harness: Ignore unused variant argument warning
      selftests: harness: Mark functions without prototypes static
      selftests: harness: Remove inline qualifier for wrappers
      selftests: harness: Guard includes on nolibc
      selftests: harness: Remove dependency on libatomic
      selftests: harness: Implement test timeouts through pidfd
      selftests: harness: Don't set setup_completed for fixtureless tests
      selftests: harness: Always provide "self" and "variant"
      selftests: harness: Move teardown conditional into test metadata
      selftests: harness: Add teardown callback to test metadata
      selftests: harness: Stop using setjmp()/longjmp()
      tools/nolibc: handle intmax_t/uintmax_t in printf
      tools/nolibc: use intmax definitions from compiler
      tools/nolibc: use pselect6_time64 if available
      tools/nolibc: use ppoll_time64 if available
      tools/nolibc: add tolower() and toupper()
      tools/nolibc: add _exit()
      tools/nolibc: add setpgrp()
      tools/nolibc: implement waitpid() in terms of waitid()
      Revert "selftests/nolibc: use waitid() over waitpid()"
      tools/nolibc: add dprintf() and vdprintf()
      tools/nolibc: add getopt()
      tools/nolibc: allow different write callbacks in printf
      tools/nolibc: allow limiting of printf destination size
      tools/nolibc: add snprintf() and friends
      selftests/nolibc: use snprintf() for printf tests
      selftests/nolibc: rename vfprintf test suite
      selftests/nolibc: add test for snprintf() truncation
      tools/nolibc: implement width padding in printf()
      HACK: selftests/nolibc: demonstrate usage of the kselftest harness

 tools/include/nolibc/Makefile                      |    1 +
 tools/include/nolibc/getopt.h                      |  105 ++
 tools/include/nolibc/nolibc.h                      |    1 +
 tools/include/nolibc/stdint.h                      |    4 +-
 tools/include/nolibc/stdio.h                       |  127 +-
 tools/include/nolibc/string.h                      |   17 +
 tools/include/nolibc/sys.h                         |  102 +-
 tools/testing/selftests/Makefile                   |    1 +
 tools/testing/selftests/kselftest/.gitignore       |    1 +
 tools/testing/selftests/kselftest/Makefile         |    6 +
 .../testing/selftests/kselftest/harness-selftest.c |  129 ++
 .../selftests/kselftest/harness-selftest.expected  |   62 +
 .../selftests/kselftest/harness-selftest.sh        |   14 +
 tools/testing/selftests/kselftest_harness.h        |  188 +--
 tools/testing/selftests/nolibc/Makefile            |   17 +-
 tools/testing/selftests/nolibc/harness-selftest.c  |    1 +
 tools/testing/selftests/nolibc/nolibc-test.c       | 1712 +-------------------
 tools/testing/selftests/nolibc/run-tests.sh        |    2 +-
 18 files changed, 639 insertions(+), 1851 deletions(-)
---
base-commit: cb839e0cc881b4abd4a2e64cd06c2e313987a189
change-id: 20250130-nolibc-kselftest-harness-8b2c8cac43bf

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


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

end of thread, other threads:[~2025-03-05  8:04 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04  7:10 [PATCH 00/32] kselftest harness and nolibc compatibility Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 01/32] selftests: harness: Add harness selftest Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 02/32] selftests: harness: Use C89 comment style Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 03/32] selftests: harness: Ignore unused variant argument warning Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 04/32] selftests: harness: Mark functions without prototypes static Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 05/32] selftests: harness: Remove inline qualifier for wrappers Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 06/32] selftests: harness: Guard includes on nolibc Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 07/32] selftests: harness: Remove dependency on libatomic Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 08/32] selftests: harness: Implement test timeouts through pidfd Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 09/32] selftests: harness: Don't set setup_completed for fixtureless tests Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 10/32] selftests: harness: Always provide "self" and "variant" Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 11/32] selftests: harness: Move teardown conditional into test metadata Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 12/32] selftests: harness: Add teardown callback to " Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 13/32] selftests: harness: Stop using setjmp()/longjmp() Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 14/32] tools/nolibc: handle intmax_t/uintmax_t in printf Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 15/32] tools/nolibc: use intmax definitions from compiler Thomas Weißschuh
2025-03-04  7:37   ` Willy Tarreau
2025-03-04 11:08     ` Thomas Weißschuh
2025-03-04 20:29       ` Willy Tarreau
2025-03-04  7:10 ` [PATCH 16/32] tools/nolibc: use pselect6_time64 if available Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 17/32] tools/nolibc: use ppoll_time64 " Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 18/32] tools/nolibc: add tolower() and toupper() Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 19/32] tools/nolibc: add _exit() Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 20/32] tools/nolibc: add setpgrp() Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 21/32] tools/nolibc: implement waitpid() in terms of waitid() Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 22/32] Revert "selftests/nolibc: use waitid() over waitpid()" Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 23/32] tools/nolibc: add dprintf() and vdprintf() Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 24/32] tools/nolibc: add getopt() Thomas Weißschuh
2025-03-04  7:54   ` Willy Tarreau
2025-03-05  7:25     ` Thomas Weißschuh
2025-03-05  8:03       ` Willy Tarreau
2025-03-04  7:10 ` [PATCH 25/32] tools/nolibc: allow different write callbacks in printf Thomas Weißschuh
2025-03-04  7:59   ` Willy Tarreau
2025-03-04 11:10     ` Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 26/32] tools/nolibc: allow limiting of printf destination size Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 27/32] tools/nolibc: add snprintf() and friends Thomas Weißschuh
2025-03-04  8:01   ` Willy Tarreau
2025-03-04  7:10 ` [PATCH 28/32] selftests/nolibc: use snprintf() for printf tests Thomas Weißschuh
2025-03-04  7:10 ` [PATCH 29/32] selftests/nolibc: rename vfprintf test suite Thomas Weißschuh
2025-03-04  7:11 ` [PATCH 30/32] selftests/nolibc: add test for snprintf() truncation Thomas Weißschuh
2025-03-04  7:11 ` [PATCH 31/32] tools/nolibc: implement width padding in printf() Thomas Weißschuh
2025-03-04  7:11 ` [PATCH 32/32] HACK: selftests/nolibc: demonstrate usage of the kselftest harness Thomas Weißschuh
2025-03-04  8:06 ` [PATCH 00/32] kselftest harness and nolibc compatibility Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox