On 10/26/23 13:31, Eduard Zingerman wrote:
On Sat, 2023-10-21 at 22:03 -0700, thinker.li@xxxxxxxxx wrote:
From: Kui-Feng Lee <thinker.li@xxxxxxxxx>
Create a new struct_ops type called bpf_testmod_ops within the bpf_testmod
module. When a struct_ops object is registered, the bpf_testmod module will
invoke test_2 from the module.
Signed-off-by: Kui-Feng Lee <thinker.li@xxxxxxxxx>
Hello,
Sorry for the late response, was moving through the patch-set very slowly.
Please note that CI currently fails for this series [0], reported error is:
testing_helpers.c:13:10: fatal error: 'rcu_tasks_trace_gp.skel.h' file not found
13 | #include "rcu_tasks_trace_gp.skel.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
I get the same error when try to run tests locally (after full clean).
On the other hand it looks like `kern_sync_rcu_tasks_trace` changes
are not really necessary, when I undo these changes but keep changes in:
- .../selftests/bpf/bpf_testmod/bpf_testmod.c
- .../selftests/bpf/bpf_testmod/bpf_testmod.h
- .../bpf/prog_tests/test_struct_ops_module.c
- .../selftests/bpf/progs/struct_ops_module.c
struct_ops_module/regular_load test still passes.
Regarding assertion:
+ ASSERT_EQ(skel->bss->test_2_result, 7, "test_2_result");
Could you please leave a comment explaining why the value is 7?
I don't understand what invokes 'test_2' but changing it to 8
forces test to fail, so something does call 'test_2' :)
Also, when running test_maps I get the following error:
libbpf: bpf_map_create_opts has non-zero extra bytes
map_create_opts(317):FAIL:bpf_map_create() error:Invalid argument (name=hash_of_maps)
According to what Andrii Nakryiko said,
once [1] is landed, this error should be fixed.
[1] https://lore.kernel.org/all/20231029011509.2479232-1-andrii@xxxxxxxxxx/
[0] https://patchwork.kernel.org/project/netdevbpf/patch/20231022050335.2579051-11-thinker.li@xxxxxxxxx/
(look for 'Logs for x86_64-gcc / build / build for x86_64 with gcc ')
[...]