Re: [PATCH 1/2] kselftest: Add a ksft_perror() helper

2023-10-01 Thread Mark Brown
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. >

Re: [PATCH 1/2] kselftest: Add a ksft_perror() helper

2023-09-29 Thread Kees Cook
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 > > >

Re: [PATCH 1/2] kselftest: Add a ksft_perror() helper

2023-09-29 Thread Mark Brown
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 wit

Re: [PATCH 1/2] kselftest: Add a ksft_perror() helper

2023-09-28 Thread Kees Cook
On Thu, Sep 28, 2023 at 04:38:11PM +0200, Mark Brown wrote: > The standard library perror() function provides a convenient way to print > an error message based on the current errno but this doesn't play nicely > with KTAP output. Provide a helper which does an equivalent thing in a KTAP > compatib

[PATCH 1/2] kselftest: Add a ksft_perror() helper

2023-09-28 Thread Mark Brown
The standard library perror() function provides a convenient way to print an error message based on the current errno but this doesn't play nicely with KTAP output. Provide a helper which does an equivalent thing in a KTAP compatible format. nolibc doesn't have a strerror() and adding the table of