All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: add tests for target information in bpf_link info queries
Date: Tue, 13 Apr 2021 11:07:47 +0200	[thread overview]
Message-ID: <87blaio8m4.fsf@toke.dk> (raw)
In-Reply-To: <CAEf4BzaZ8nAAqs8twnqCtSvmxsDvKBDUaYw+s+CcOnZyYo=0Vw@mail.gmail.com>

Andrii Nakryiko <andrii.nakryiko@gmail.com> writes:

> On Thu, Apr 8, 2021 at 12:57 PM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>>
>> Extend the fexit_bpf2bpf test to check that the info for the bpf_link
>> returned by the kernel matches the expected values.
>>
>> While we're updating the test, change existing uses of CHEC() to use the
>> much easier to read ASSERT_*() macros.
>>
>> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
>> ---
>
> Just a minor nit below. Looks good, thanks.
>
> Acked-by: Andrii Nakryiko <andrii@kernel.org>
>
>>  .../selftests/bpf/prog_tests/fexit_bpf2bpf.c  | 50 +++++++++++++++----
>>  1 file changed, 39 insertions(+), 11 deletions(-)
>>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c b/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
>> index 5c0448910426..019a46d8e98e 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
>> @@ -57,11 +57,13 @@ static void test_fexit_bpf2bpf_common(const char *obj_file,
>>                                       bool run_prog,
>>                                       test_cb cb)
>>  {
>> +       __u32 duration = 0, retval, tgt_prog_id, info_len;
>
> if not CHECK() is used, duration shouldn't be needed anymore

Oh, and duration is still needed for bpf_prog_test_run(), so I'll keep
that; but removing it did make the compiler point out that I missed one
CHECK() at the beginning of the function when converting, so will fix
that instead :)

-Toke


  parent reply	other threads:[~2021-04-13  9:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 19:57 [PATCH bpf-next 1/2] bpf: return target info when a tracing bpf_link is queried Toke Høiland-Jørgensen
2021-04-08 19:57 ` [PATCH bpf-next 2/2] selftests/bpf: add tests for target information in bpf_link info queries Toke Høiland-Jørgensen
2021-04-13  3:46   ` Andrii Nakryiko
2021-04-13  8:52     ` Toke Høiland-Jørgensen
2021-04-13  9:07     ` Toke Høiland-Jørgensen [this message]
2021-04-13  9:16       ` Toke Høiland-Jørgensen
2021-04-13  3:41 ` [PATCH bpf-next 1/2] bpf: return target info when a tracing bpf_link is queried Andrii Nakryiko

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=87blaio8m4.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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.