netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next v2 2/2] selftests/bpf: test task_file iterator without visiting pthreads
Date: Tue, 1 Sep 2020 19:18:55 -0700	[thread overview]
Message-ID: <3633b57b-dd3e-9cd0-e740-0df2b42458ab@fb.com> (raw)
In-Reply-To: <CAEf4BzbQboQ3uPmXG2HAsv2=S3iJ5-6RQiC8Z8OymnCCyMJ77A@mail.gmail.com>



On 9/1/20 5:41 PM, Andrii Nakryiko wrote:
> On Thu, Aug 27, 2020 at 10:38 PM Yonghong Song <yhs@fb.com> wrote:
>>
>> Modified existing bpf_iter_test_file.c program to check whether
>> all accessed files from the main thread or not.
>>
>> Modified existing bpf_iter_test_file program to check
>> whether all accessed files from the main thread or not.
>>    $ ./test_progs -n 4
>>    ...
>>    #4/7 task_file:OK
>>    ...
>>    #4 bpf_iter:OK
>>    Summary: 1/24 PASSED, 0 SKIPPED, 0 FAILED
>>
>> Signed-off-by: Yonghong Song <yhs@fb.com>
>> ---
> 
> Acked-by: Andrii Nakryiko <andriin@fb.com>
> 
>>   .../selftests/bpf/prog_tests/bpf_iter.c       | 21 +++++++++++++++++++
>>   .../selftests/bpf/progs/bpf_iter_task_file.c  | 10 ++++++++-
>>   2 files changed, 30 insertions(+), 1 deletion(-)
>>
> 
> [...]
> 
>> +       if (CHECK(pthread_join(thread_id, &ret) || ret != NULL,
>> +                 "pthread_join", "pthread_join failed\n"))
>> +               goto done;
>> +
>> +       CHECK(skel->bss->count != 0, "",
> 
> nit: please use non-empty string for second argument

Okay, will change to "check_count" instead of empty string. Thanks!

> 
>> +             "invalid non pthread file visit %d\n", skel->bss->count);
>> +
>> +done:
>>          bpf_iter_task_file__destroy(skel);
>>   }
>>
> 
> [...]
> 

      reply	other threads:[~2020-09-02  2:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  5:38 [PATCH bpf-next v2 0/2] bpf: avoid iterating duplicated files for task_file iterator Yonghong Song
2020-08-28  5:38 ` [PATCH bpf-next v2 1/2] " Yonghong Song
2020-09-01 16:17   ` Josef Bacik
2020-09-01 17:18   ` Josef Bacik
2020-09-01 17:38     ` Yonghong Song
2020-08-28  5:38 ` [PATCH bpf-next v2 2/2] selftests/bpf: test task_file iterator without visiting pthreads Yonghong Song
2020-09-02  0:41   ` Andrii Nakryiko
2020-09-02  2:18     ` Yonghong Song [this message]

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=3633b57b-dd3e-9cd0-e740-0df2b42458ab@fb.com \
    --to=yhs@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).