Message ID | 20211006185619.364369-4-fallentree@fb.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | selftests/bpf: Add parallelism to test_progs | expand |
On Wed, Oct 6, 2021 at 11:56 AM Yucong Sun <fallentree@fb.com> wrote: > > When running tests concurrently, perf rate limiting will often cause > some events to be skipped and make some tests flaky, disabling it making > running tests more robust. > > Signed-off-by: Yucong Sun <sunyucong@gmail.com> > --- > tools/testing/selftests/bpf/test_progs.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c > index 4e2028189471..2ac922f8aa2c 100644 > --- a/tools/testing/selftests/bpf/test_progs.c > +++ b/tools/testing/selftests/bpf/test_progs.c > @@ -1376,6 +1376,8 @@ int main(int argc, char **argv) > } > } > > + system("echo 0 > /proc/sys/kernel/perf_cpu_time_max_percent"); I don't think we want to do this outside of QEMU, changing the global state of the real system. I think this might have also been relevant to me waiting for perf_branches test for about 20 seconds or so. I've dropped this patch for now. > + > /* ignore workers if we are just listing */ > if (env.get_test_cnt || env.list_test_names) > env.workers = 0; > -- > 2.30.2 >
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index 4e2028189471..2ac922f8aa2c 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c @@ -1376,6 +1376,8 @@ int main(int argc, char **argv) } } + system("echo 0 > /proc/sys/kernel/perf_cpu_time_max_percent"); + /* ignore workers if we are just listing */ if (env.get_test_cnt || env.list_test_names) env.workers = 0;
When running tests concurrently, perf rate limiting will often cause some events to be skipped and make some tests flaky, disabling it making running tests more robust. Signed-off-by: Yucong Sun <sunyucong@gmail.com> --- tools/testing/selftests/bpf/test_progs.c | 2 ++ 1 file changed, 2 insertions(+)