mbox series

[0/2] selftests: add ksft_exit_fail_perror()

Message ID 20240404161433.114497-1-usama.anjum@collabora.com (mailing list archive)
Headers show
Series selftests: add ksft_exit_fail_perror() | expand

Message

Muhammad Usama Anjum April 4, 2024, 4:14 p.m. UTC
In this series, ksft_exit_fail_perror() is being added which is helper
function on top of ksft_exit_fail_msg(). It prints errno and its string
form always. After writing and porting several kselftests, I've found
out that most of times ksft_exit_fail_msg() isn't useful if errno value
isn't printed. The ksft_exit_fail_perror() provides a convenient way to
always print errno when its used.

Muhammad Usama Anjum (2):
  selftests: add ksft_exit_fail_perror()
  selftests: exec: Use new ksft_exit_fail_perror() helper

 tools/testing/selftests/exec/recursion-depth.c | 10 +++++-----
 tools/testing/selftests/kselftest.h            | 14 ++++++++++++++
 2 files changed, 19 insertions(+), 5 deletions(-)

Comments

Shuah Khan April 4, 2024, 5:48 p.m. UTC | #1
On 4/4/24 10:14, Muhammad Usama Anjum wrote:
> In this series, ksft_exit_fail_perror() is being added which is helper
> function on top of ksft_exit_fail_msg(). It prints errno and its string
> form always. After writing and porting several kselftests, I've found
> out that most of times ksft_exit_fail_msg() isn't useful if errno value
> isn't printed. The ksft_exit_fail_perror() provides a convenient way to
> always print errno when its used.
> 
> Muhammad Usama Anjum (2):
>    selftests: add ksft_exit_fail_perror()>    selftests: exec: Use new ksft_exit_fail_perror() helper
> 
>   tools/testing/selftests/exec/recursion-depth.c | 10 +++++-----
>   tools/testing/selftests/kselftest.h            | 14 ++++++++++++++
>   2 files changed, 19 insertions(+), 5 deletions(-)
> 

Applied the two patches to linux-kselftest next for Linux 6.10-rc1.

thanks,
-- Shuah