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]
Date:   Tue, 3 Nov 2020 10:34:02 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Alexander Duyck <alexander.duyck@...il.com>
Cc:     bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin Lau <kafai@...com>,
        john fastabend <john.fastabend@...il.com>,
        Kernel Team <kernel-team@...com>,
        Networking <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Lawrence Brakmo <brakmo@...com>, alexanderduyck@...com
Subject: Re: [bpf-next PATCH v2 1/5] selftests/bpf: Move test_tcppbf_user into test_progs

On Sat, Oct 31, 2020 at 11:52 AM Alexander Duyck
<alexander.duyck@...il.com> wrote:
>
> From: Alexander Duyck <alexanderduyck@...com>
>
> Recently a bug was missed due to the fact that test_tcpbpf_user is not a
> part of test_progs. In order to prevent similar issues in the future move
> the test functionality into test_progs. By doing this we can make certain
> that it is a part of standard testing and will not be overlooked.
>
> As a part of moving the functionality into test_progs it is necessary to
> integrate with the test_progs framework and to drop any redundant code.
> This patch:
> 1. Cleans up the include headers
> 2. Dropped a duplicate definition of bpf_find_map
> 3. Switched over to using test_progs specific cgroup functions
> 4. Replaced printf calls with fprintf to stderr

This is not necessary. test_progs intercept both stdout and stderr, so
you could have kept the code as is and minimize this diff further. But
it also doesn't matter all that much, so:

Acked-by: Andrii Nakryiko <andrii@...nel.org>

> 5. Renamed main to test_tcpbpf_user
> 6. Dropped return value in favor of CHECK_FAIL to check for errors
>
> The general idea is that I wanted to keep the changes as small as possible
> while moving the file into the test_progs framework. The follow-on patches
> are meant to clean up the remaining issues such as the use of CHECK_FAIL.
>
> Signed-off-by: Alexander Duyck <alexanderduyck@...com>
> ---
>  tools/testing/selftests/bpf/.gitignore             |    1
>  tools/testing/selftests/bpf/Makefile               |    3 -
>  .../testing/selftests/bpf/prog_tests/tcpbpf_user.c |   63 ++++++--------------
>  3 files changed, 21 insertions(+), 46 deletions(-)
>  rename tools/testing/selftests/bpf/{test_tcpbpf_user.c => prog_tests/tcpbpf_user.c} (70%)
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ