Message ID | 20230928-ktap-exec-v1-0-1013a2db0426@kernel.org |
---|---|
Headers | show |
Series | kselftest/exec: Convert execveat test to KTAP output | expand |
On Thu, Sep 28, 2023 at 05:48:22PM -0700, Kees Cook wrote: > > nolibc doesn't have a strerror() and adding the table of strings required > > doesn't seem like a good fit for what it's trying to do so when we're using > > that only print the errno. > Oh, interesting... what environment ends up without strerror()? Like I say it's for nolibc - it's just some header files (all in the kernel source), while it generally aims to be libc compatible it's intentionally very small.
On Fri, Sep 29, 2023 at 09:50:53AM +0200, Mark Brown wrote: > On Thu, Sep 28, 2023 at 05:48:22PM -0700, Kees Cook wrote: > > > > nolibc doesn't have a strerror() and adding the table of strings required > > > doesn't seem like a good fit for what it's trying to do so when we're using > > > that only print the errno. > > > Oh, interesting... what environment ends up without strerror()? > > Like I say it's for nolibc - it's just some header files (all in the > kernel source), while it generally aims to be libc compatible it's > intentionally very small. Right, I mean, how would one normally encounter this environment? Running the selftests on m68k userspace or something?
On Fri, Sep 29, 2023 at 10:31:56AM -0700, Kees Cook wrote: > On Fri, Sep 29, 2023 at 09:50:53AM +0200, Mark Brown wrote: > > Like I say it's for nolibc - it's just some header files (all in the > > kernel source), while it generally aims to be libc compatible it's > > intentionally very small. > Right, I mean, how would one normally encounter this environment? Running > the selftests on m68k userspace or something? There's a bunch of selftests that cover interfaces that are intended to be used by libc which are built with nolibc in order to avoid the tests and glibc stomping over each other.
This series converts the execveat test to generate KTAP output so it plays a bit more nicely with automation, KTAP means that kselftest runners can track the individual tests in the suite rather than just an overall pass/fail for the suite as a whole. The first patch adding a perror() equivalent for kselftest was previously sent as part of a similar conversion for the timers tests: https://lore.kernel.org/linux-kselftest/8734yyfx00.ffs@tglx/T there's probably no harm in applying it twice or possibly these should both go via the kselftest tree - I'm not sure who usually applies timers test changes. Signed-off-by: Mark Brown <broonie@kernel.org> --- Mark Brown (2): kselftest: Add a ksft_perror() helper selftests/exec: Convert execveat test to generate KTAP output tools/testing/selftests/exec/execveat.c | 87 ++++++++++++++++++++------------- tools/testing/selftests/kselftest.h | 14 ++++++ 2 files changed, 66 insertions(+), 35 deletions(-) --- base-commit: 6465e260f48790807eef06b583b38ca9789b6072 change-id: 20230928-ktap-exec-45ea8d28309a Best regards,