All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: Andrii Nakryiko <andriin@fb.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, bpf <bpf@vger.kernel.org>
Subject: Re: [bpf-next PATCH] bpf, selftests: Use single cgroup helpers for both test_sockmap/progs
Date: Fri, 31 Jul 2020 20:33:51 -0700	[thread overview]
Message-ID: <CAEf4BzaXsve_=CfEzipd=wRLfDYSUdF6u5Myrd5E=F4qt=hGeg@mail.gmail.com> (raw)
In-Reply-To: <159623335418.30208.15807461815525100199.stgit@john-XPS-13-9370>

On Fri, Jul 31, 2020 at 3:09 PM John Fastabend <john.fastabend@gmail.com> 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@gmail.com>
> ---

makes total sense, thanks for the clean up!

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  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(-)
>

[...]

  reply	other threads:[~2020-08-01  3:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 22:08 [bpf-next PATCH] Consolidate cgroup setup in selftests John Fastabend
2020-07-31 22:09 ` [bpf-next PATCH] bpf, selftests: Use single cgroup helpers for both test_sockmap/progs John Fastabend
2020-08-01  3:33   ` Andrii Nakryiko [this message]
2020-08-02  3:30     ` Alexei Starovoitov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEf4BzaXsve_=CfEzipd=wRLfDYSUdF6u5Myrd5E=F4qt=hGeg@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.