diff mbox series

[1/3] selftests/bpf: align kbuild messages to standard

Message ID 20230118-kbuild-alignment-v1-1-eb5e9fd55c92@weissschuh.net (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series align custom kbuild messages to standard layout | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-PR success PR summary
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 15 of 15 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-6 success Logs for llvm-toolchain
bpf/vmtest-bpf-next-VM_Test-7 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-2 success Logs for build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-3 success Logs for build for aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-4 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-5 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-8 success Logs for test_maps on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-10 success Logs for test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-11 success Logs for test_maps on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-12 success Logs for test_progs on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-14 success Logs for test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-15 success Logs for test_progs on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-16 fail Logs for test_progs_no_alu32 on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-18 success Logs for test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-19 success Logs for test_progs_no_alu32 on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-20 success Logs for test_progs_no_alu32_parallel on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-21 success Logs for test_progs_no_alu32_parallel on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-22 success Logs for test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-23 success Logs for test_progs_no_alu32_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-24 success Logs for test_progs_parallel on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-25 success Logs for test_progs_parallel on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-26 success Logs for test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-27 success Logs for test_progs_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-28 success Logs for test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-29 success Logs for test_verifier on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-30 success Logs for test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-31 success Logs for test_verifier on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-9 success Logs for test_maps on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-13 success Logs for test_progs on aarch64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-17 success Logs for test_progs_no_alu32 on aarch64 with llvm-16

Commit Message

Thomas Weißschuh Jan. 18, 2023, 3:52 a.m. UTC
The common layout for kbuild messages is as follows:

- 2 spaces
- 7 or more characters for the action
- 1 space
- name of the file being built/generated

The custom message formatting included an additional space in the action
part, which leads to misalignments with the rest of kbuild.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/testing/selftests/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yonghong Song Jan. 18, 2023, 5:02 a.m. UTC | #1
On 1/17/23 7:52 PM, Thomas Weißschuh wrote:
> The common layout for kbuild messages is as follows:
> 
> - 2 spaces
> - 7 or more characters for the action
> - 1 space
> - name of the file being built/generated
> 
> The custom message formatting included an additional space in the action
> part, which leads to misalignments with the rest of kbuild.

Could you give an example to show the output before/after the patch, and
how it leads to mis-alignment and why it is a problem?

> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
>   tools/testing/selftests/bpf/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index c22c43bbee19..5190c19295d4 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -98,7 +98,7 @@ Q =
>   msg =
>   else
>   Q = @
> -msg = @printf '  %-8s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
> +msg = @printf '  %-7s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
>   MAKEFLAGS += --no-print-directory
>   submake_extras := feature_display=0
>   endif
>
Thomas Weißschuh Jan. 18, 2023, 5:15 a.m. UTC | #2
On Tue, Jan 17, 2023 at 09:02:20PM -0800, Yonghong Song wrote:
> 
> 
> On 1/17/23 7:52 PM, Thomas Weißschuh wrote:
> > The common layout for kbuild messages is as follows:
> > 
> > - 2 spaces
> > - 7 or more characters for the action
> > - 1 space
> > - name of the file being built/generated
> > 
> > The custom message formatting included an additional space in the action
> > part, which leads to misalignments with the rest of kbuild.
> 
> Could you give an example to show the output before/after the patch, and
> how it leads to mis-alignment and why it is a problem?

Before:

  LD      .../linux/tools/bpf/resolve_btfids/resolve_btfids-in.o
  LINK     resolve_btfids
  CHK     kernel/kheaders_data.tar.xz

After:

  LD      .../linux/tools/bpf/resolve_btfids/resolve_btfids-in.o
  LINK    resolve_btfids
  CHK     kernel/kheaders_data.tar.xz

The line starting with "LINK" has the filename "resolve_btfids" one
space character more to the right than the other lines.

It's slightly confusing when scanning the build logs.

> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> >   tools/testing/selftests/bpf/Makefile | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index c22c43bbee19..5190c19295d4 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -98,7 +98,7 @@ Q =
> >   msg =
> >   else
> >   Q = @
> > -msg = @printf '  %-8s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
> > +msg = @printf '  %-7s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
> >   MAKEFLAGS += --no-print-directory
> >   submake_extras := feature_display=0
> >   endif
> >
Yonghong Song Jan. 18, 2023, 6:59 a.m. UTC | #3
On 1/17/23 9:15 PM, Thomas Weißschuh wrote:
> On Tue, Jan 17, 2023 at 09:02:20PM -0800, Yonghong Song wrote:
>>
>>
>> On 1/17/23 7:52 PM, Thomas Weißschuh wrote:
>>> The common layout for kbuild messages is as follows:
>>>
>>> - 2 spaces
>>> - 7 or more characters for the action
>>> - 1 space
>>> - name of the file being built/generated
>>>
>>> The custom message formatting included an additional space in the action
>>> part, which leads to misalignments with the rest of kbuild.
>>
>> Could you give an example to show the output before/after the patch, and
>> how it leads to mis-alignment and why it is a problem?
> 
> Before:
> 
>    LD      .../linux/tools/bpf/resolve_btfids/resolve_btfids-in.o
>    LINK     resolve_btfids
>    CHK     kernel/kheaders_data.tar.xz
> 
> After:
> 
>    LD      .../linux/tools/bpf/resolve_btfids/resolve_btfids-in.o
>    LINK    resolve_btfids
>    CHK     kernel/kheaders_data.tar.xz
> 
> The line starting with "LINK" has the filename "resolve_btfids" one
> space character more to the right than the other lines.

Thanks! I would be great if you can put the details about
   (1) what are the command line to reproduce the issue, and
   (2) what the output differences,
to the commit message in all three patches.

> 
> It's slightly confusing when scanning the build logs.
> 
>>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>>> ---
>>>    tools/testing/selftests/bpf/Makefile | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
>>> index c22c43bbee19..5190c19295d4 100644
>>> --- a/tools/testing/selftests/bpf/Makefile
>>> +++ b/tools/testing/selftests/bpf/Makefile
>>> @@ -98,7 +98,7 @@ Q =
>>>    msg =
>>>    else
>>>    Q = @
>>> -msg = @printf '  %-8s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
>>> +msg = @printf '  %-7s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
>>>    MAKEFLAGS += --no-print-directory
>>>    submake_extras := feature_display=0
>>>    endif
>>>
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index c22c43bbee19..5190c19295d4 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -98,7 +98,7 @@  Q =
 msg =
 else
 Q = @
-msg = @printf '  %-8s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
+msg = @printf '  %-7s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
 MAKEFLAGS += --no-print-directory
 submake_extras := feature_display=0
 endif