Re: [bpf-next PATCH] bpf, selftests: Use single cgroup helpers for both test_sockmap/progs

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

 



On Fri, Jul 31, 2020 at 3:09 PM John Fastabend <john.fastabend@xxxxxxxxx> wrote:
>
> Nearly every user of cgroup helpers does the same sequence of API calls. So
> push these into a single helper cgroup_setup_and_join. The cases that do
> a bit of extra logic are test_progs which currently uses an env variable
> to decide if it needs to setup the cgroup environment or can use an
> existingi environment. And then tests that are doing cgroup tests
> themselves. We skip these cases for now.
>
> Signed-off-by: John Fastabend <john.fastabend@xxxxxxxxx>
> ---

makes total sense, thanks for the clean up!

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

>  tools/testing/selftests/bpf/cgroup_helpers.c       |   23 ++++++++++++++++++++
>  tools/testing/selftests/bpf/cgroup_helpers.h       |    1 +
>  tools/testing/selftests/bpf/get_cgroup_id_user.c   |   14 ++----------
>  tools/testing/selftests/bpf/test_cgroup_storage.c  |   17 +--------------
>  tools/testing/selftests/bpf/test_dev_cgroup.c      |   15 ++-----------
>  tools/testing/selftests/bpf/test_netcnt.c          |   17 ++-------------
>  .../selftests/bpf/test_skb_cgroup_id_user.c        |    8 +------
>  tools/testing/selftests/bpf/test_sock.c            |    8 +------
>  tools/testing/selftests/bpf/test_sock_addr.c       |    8 +------
>  tools/testing/selftests/bpf/test_sock_fields.c     |   14 +++---------
>  tools/testing/selftests/bpf/test_socket_cookie.c   |    8 +------
>  tools/testing/selftests/bpf/test_sockmap.c         |   18 ++--------------
>  tools/testing/selftests/bpf/test_sysctl.c          |    8 +------
>  tools/testing/selftests/bpf/test_tcpbpf_user.c     |    8 +------
>  tools/testing/selftests/bpf/test_tcpnotify_user.c  |    8 +------
>  15 files changed, 43 insertions(+), 132 deletions(-)
>

[...]



[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