linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] kselftest: Support nolibc
@ 2023-04-06 13:56 Mark Brown
  2023-04-06 13:56 ` [PATCH 1/2] " Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mark Brown @ 2023-04-06 13:56 UTC (permalink / raw)
  To: Shuah Khan, Catalin Marinas, Will Deacon, Paul E. McKenney
  Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Mark Brown

At present the kselftest header can't be used with nolibc since it makes
use of vprintf() which is not available in nolibc and seems like it would
be inappropriate to implement given the minimal system requirements and
environment intended for nolibc. This has resulted in some open coded
kselftests which use nolibc to test features that are supposed to be
controlled via libc and therefore better exercised in an environment with
no libc.

Rather than continue this let's factor out the I/O routines in kselftest.h
into a separate header file and provide a nolibc implementation which only
allows simple strings to be provided rather than full printf() support.
This is limiting but a great improvement on sharing no code at all.

As an example of using this I've updated the arm64 za-fork test to use
the standard kselftest.h.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (2):
      kselftest: Support nolibc
      kselftest/arm64: Convert za-fork to use kselftest.h

 tools/testing/selftests/arm64/fp/Makefile  |   2 +-
 tools/testing/selftests/arm64/fp/za-fork.c |  88 +++--------------
 tools/testing/selftests/kselftest-nolibc.h |  93 ++++++++++++++++++
 tools/testing/selftests/kselftest-std.h    | 151 +++++++++++++++++++++++++++++
 tools/testing/selftests/kselftest.h        | 149 +++-------------------------
 5 files changed, 272 insertions(+), 211 deletions(-)
---
base-commit: e8d018dd0257f744ca50a729e3d042cf2ec9da65
change-id: 20230405-kselftest-nolibc-cb2ce0446d09

Best regards,
-- 
Mark Brown <broonie@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-04-06 16:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06 13:56 [PATCH 0/2] kselftest: Support nolibc Mark Brown
2023-04-06 13:56 ` [PATCH 1/2] " Mark Brown
2023-04-06 13:56 ` [PATCH 2/2] kselftest/arm64: Convert za-fork to use kselftest.h Mark Brown
2023-04-06 14:20 ` [PATCH 0/2] kselftest: Support nolibc Willy Tarreau
2023-04-06 14:32   ` Mark Brown
2023-04-06 16:22     ` Willy Tarreau

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).