Re: [PATCH bpf-next v2 2/2] selftests/bpf: test task_file iterator without visiting pthreads

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

 





On 9/1/20 5:41 PM, Andrii Nakryiko wrote:
On Thu, Aug 27, 2020 at 10:38 PM Yonghong Song <yhs@xxxxxx> 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@xxxxxx>
---

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

  .../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);
  }


[...]




[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