Re: [PATCH v2 bpf-next 4/5] Display test number when listing test names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 9, 2021 at 5:17 PM Yucong Sun <fallentree@xxxxxx> wrote:
>
> This patch adds tests number to the output when using "test_prog -l".

Yes, but why? Commit message should contain the motivation for the
change, not just description of what's being changed.

Also, this changes the output format and there are systems that might
rely on this specific format (I remember Red Hat were using
./test_progs -l, for example). So without a good reason, we shouldn't
change the format.

>
> Signed-off-by: Yucong Sun <fallentree@xxxxxx>
> ---
>  tools/testing/selftests/bpf/test_progs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
> index 82d012671552..5cc808992b00 100644
> --- a/tools/testing/selftests/bpf/test_progs.c
> +++ b/tools/testing/selftests/bpf/test_progs.c
> @@ -867,7 +867,8 @@ int main(int argc, char **argv)
>                 }
>
>                 if (env.list_test_names) {
> -                       fprintf(env.stdout, "%s\n", test->test_name);
> +                       fprintf(env.stdout, "# %d %s\n",
> +                               test->test_num, test->test_name);
>                         env.succ_cnt++;
>                         continue;
>                 }
> --
> 2.30.2
>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux