@@ -26,12 +26,15 @@ void test_fentry_test(void)
err, errno, retval, duration);
result = (__u64 *)fentry_skel->bss;
- for (i = 0; i < 6; i++) {
+ for (i = 0; i < 8; i++) {
if (CHECK(result[i] != 1, "result",
"fentry_test%d failed err %lld\n", i + 1, result[i]))
goto cleanup;
}
+ ASSERT_EQ(result[8], 8, "result");
+ ASSERT_EQ(result[9], 2, "result");
+
cleanup:
fentry_test__destroy(fentry_skel);
}
@@ -77,3 +77,19 @@ int BPF_PROG(test8, struct bpf_fentry_test_t *arg)
test8_result = 1;
return 0;
}
+
+__u64 test9_result = 0;
+SEC("fentry.ftrace/bpf_fentry_test*")
+int BPF_PROG(test9)
+{
+ test9_result++;
+ return 0;
+}
+
+__u64 test10_result = 0;
+SEC("fentry.ftrace/bpf_fentry_test1|bpf_fentry_test2")
+int BPF_PROG(test10)
+{
+ test10_result++;
+ return 0;
+}
Adding 2 more tests for fentry probe test, to show/test ftrace probe. Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- .../selftests/bpf/prog_tests/fentry_test.c | 5 ++++- tools/testing/selftests/bpf/progs/fentry_test.c | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-)