summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/perf_link.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-03-08 17:39:29 -0800
committerAndrii Nakryiko <andrii@kernel.org>2022-03-08 17:39:29 -0800
commit3399dd9f372bf0f4f3fb1fb11eb60ebd7b52d79c (patch)
tree57ffe5074f8f389437e8ea468731b0b3f2e599e1 /tools/testing/selftests/bpf/prog_tests/perf_link.c
parent7fd9fd46a459272e641be78c1cc36baab1921fa1 (diff)
parentba83af059153441d77bc2dbb4cd22421b8a34107 (diff)
Merge branch 'BPF test_progs tests improvement'
Mykola Lysenko says: ==================== First patch reduces the sample_freq to 1000 to ensure test will work even when kernel.perf_event_max_sample_rate was reduced to 1000. Patches for send_signal and find_vma tune the test implementation to make sure needed thread is scheduled. Also, both tests will finish as soon as possible after the test condition is met. ==================== Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_link.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/perf_link.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/perf_link.c b/tools/testing/selftests/bpf/prog_tests/perf_link.c
index ede07344f264..224eba6fef2e 100644
--- a/tools/testing/selftests/bpf/prog_tests/perf_link.c
+++ b/tools/testing/selftests/bpf/prog_tests/perf_link.c
@@ -39,7 +39,7 @@ void serial_test_perf_link(void)
attr.type = PERF_TYPE_SOFTWARE;
attr.config = PERF_COUNT_SW_CPU_CLOCK;
attr.freq = 1;
- attr.sample_freq = 4000;
+ attr.sample_freq = 1000;
pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC);
if (!ASSERT_GE(pfd, 0, "perf_fd"))
goto cleanup;