On 6/16/25 5:23 PM, Wei Yang wrote:
> In case there is no test chosen, e.g -t non-exist, the following message
> would be printed at start.
> 
>     TAP version 13
>     1..0
> 
> Change it to print 0 if no test is chosen.
Please give reference from TAP format guidelines for this change.

> 
> Signed-off-by: Wei Yang <richard.weiy...@gmail.com>
> ---
>  tools/testing/selftests/kselftest.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kselftest.h 
> b/tools/testing/selftests/kselftest.h
> index c3b6d2604b1e..9fcf76f0b702 100644
> --- a/tools/testing/selftests/kselftest.h
> +++ b/tools/testing/selftests/kselftest.h
> @@ -144,7 +144,7 @@ static inline void ksft_print_header(void)
>  static inline void ksft_set_plan(unsigned int plan)
>  {
>       ksft_plan = plan;
> -     printf("1..%u\n", ksft_plan);
> +     printf("%u..%u\n", !plan ? 0 : 1, ksft_plan);
>  }
>  
>  static inline void ksft_print_cnts(void)


Reply via email to