lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzbgaqWhFDQTZHDa6w7y02_f8JeoQoj30Zk2rzDe2UfZDg@mail.gmail.com>
Date:   Wed, 27 Apr 2022 12:38:32 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Yuntao Wang <ytcoode@...il.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Shuah Khan <shuah@...nel.org>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: Fix incorrect TRUNNER_BINARY name output

On Sat, Apr 23, 2022 at 7:30 AM Yuntao Wang <ytcoode@...il.com> wrote:
>
> Currently, when we run 'make test_progs', the output is:
>
>   CLNG-BPF [test_maps] atomic_bounds.o
>   ...
>   GEN-SKEL [test_progs] atomic_bounds.skel.h
>   ...
>   TEST-OBJ [test_progs] align.test.o
>   ...
>   TEST-HDR [test_progs] tests.h
>   EXT-OBJ  [test_progs] test_progs.o
>   ...
>   BINARY   test_progs
>
> As you can see, the TRUNNER_BINARY name in the CLNG-BPF part is test_maps,
> which is incorrect.

It's not incorrect. test_maps and test_progs share the same set of BPF
object files under progs/ so whichever rule is picked first by make
gets to output it's [test_maps] or [test_progs] "badge". Is that a big
deal? Adding this $$(TRUNNER_BINARY) indirection and per-target
private TRUNNER_BINARY envvar is an unnecessary complication of
already complicated Makefile, IMO.

Did you run into any problems with the way Makefile is right now?

>
> Similarly, when we run 'make test_maps', the output is:
>
>   CLNG-BPF [test_maps] atomic_bounds.o
>   ...
>   GEN-SKEL [test_progs] atomic_bounds.skel.h
>   ...
>   TEST-OBJ [test_maps] array_map_batch_ops.test.o
>   ...
>   TEST-HDR [test_maps] tests.h
>   EXT-OBJ  [test_maps] test_maps.o
>   ...
>   BINARY   test_maps
>
> At this time, the TRUNNER_BINARY name in the GEN-SKEL part is wrong.
>
> Again, if we run 'make /full/path/to/selftests/bpf/test_vmlinux.skel.h',
> the output is:
>
>   CLNG-BPF [test_maps] test_vmlinux.o
>   GEN-SKEL [test_progs] test_vmlinux.skel.h
>
> Here, the TRUNNER_BINARY names are inappropriate and meaningless, they
> should be removed.
>
> This patch fixes these and all other similar issues.
>
> With the patch applied, the output becomes:
>
>   $ make test_progs
>
>   CLNG-BPF [test_progs] atomic_bounds.o
>   ...
>   GEN-SKEL [test_progs] atomic_bounds.skel.h
>   ...
>   TEST-OBJ [test_progs] align.test.o
>   ...
>   TEST-HDR [test_progs] tests.h
>   EXT-OBJ  [test_progs] test_progs.o
>   ...
>   BINARY   test_progs
>
>   $ make test_maps
>
>   CLNG-BPF [test_maps] atomic_bounds.o
>   ...
>   GEN-SKEL [test_maps] atomic_bounds.skel.h
>   ...
>   TEST-OBJ [test_maps] array_map_batch_ops.test.o
>   ...
>   TEST-HDR [test_maps] tests.h
>   EXT-OBJ  [test_maps] test_maps.o
>   ...
>   BINARY   test_maps
>
>   $ make /full/path/to/selftests/bpf/test_vmlinux.skel.h
>
>   CLNG-BPF test_vmlinux.o
>   GEN-SKEL test_vmlinux.skel.h
>
> Signed-off-by: Yuntao Wang <ytcoode@...il.com>
> ---
>  tools/testing/selftests/bpf/Makefile | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ