find_vma BPF test: increase length CPU computation
Subsystems (3)
RFC PATCH 1/1 find_vma BPF test: increase length CPU computation
Some aarch64 systems running a PREEMPT_RT patched kernel, needs more time to complete the test.
This change mirrors:
commit ba83af059153 ("Improve stability of find_vma BPF test") addressing similar requirements and allowing the QTI SA8775P based systems, and others, to complete the test when running RT kernel.
--- tools/testing/selftests/bpf/prog_tests/find_vma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/bpf/prog_tests/find_vma.c +3 -3
@@ -51,7 +51,7 @@ static void test_find_vma_pe(struct find_vma *skel)struct bpf_link *link =NULL ;volatile int j =0 ;int pfd, i; -const int one_bn =1000000000 ; +const int dummy_wait =2500000000 ; pfd =open_pe ();if (pfd <0 ) {
@@ -68,10 +68,10 @@ static void test_find_vma_pe(struct find_vma *skel)if (!ASSERT_OK_PTR (link,"attach_perf_event" )) goto cleanup; -for (i =0 ; i < one_bn &&find_vma_pe_condition (skel); ++i) +for (i =0 ; i < dummy_wait &&find_vma_pe_condition (skel); ++i) ++j; -test_and_reset_skel (skel, -EBUSY /* in nmi, irq_work is busy */ , i == one_bn); +test_and_reset_skel (skel, -EBUSY /* in nmi, irq_work is busy */ , i == dummy_wait); cleanup:bpf_link__destroy (link);close (pfd);
Signature · 1 line
2.34.1
Song Liu
reviewerQuoted 18 lines · Alessandro Carminati (Red Hat)
Some aarch64 systems running a
PREEMPT_RTpatched kernel, needs more time to complete the test.
This change mirrors:
commitba83af059153("Improve stability offind_vmaBPF test") addressing similar requirements and allowing the QTI SA8775P based systems, and others, to complete the test when running RT kernel.Signed-off-by Alessandro Carminati (Red Hat) <[email protected]>--- tools/testing/selftests/bpf/prog_tests/find_vma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)tools/testing/selftests/bpf/prog_tests/find_vma.c +0
-0
tools/testing/selftests/bpf/prog_tests/find_vma.c static void test_find_vma_pe(struct find_vma *skel) · line 54
Quoted 5 lines
tools/testing/selftests/bpf/prog_tests/find_vma.c +1
-1@@ -51,7 +51,7 @@ static void test_find_vma_pe(struct find_vma *skel)struct bpf_link *link =NULL ;volatile int j =0 ;int pfd, i; -const int one_bn =1000000000 ; +const int dummy_wait =2500000000 ;
2500000000 is bigger than INT_MAX.
tools/testing/selftests/bpf/prog_tests/find_vma.c static void test_find_vma_pe(struct find_vma *skel) · line 72
Quoted 10 lines
tools/testing/selftests/bpf/prog_tests/find_vma.c +1
-1pfd =open_pe ();if (pfd <0 ) {@@ -68,10 +68,10 @@ static void test_find_vma_pe(struct find_vma *skel)if (!ASSERT_OK_PTR (link,"attach_perf_event" )) goto cleanup; -for (i =0 ; i < one_bn &&find_vma_pe_condition (skel); ++i) +for (i =0 ; i < dummy_wait &&find_vma_pe_condition (skel); ++i) ++j;
So we will skip this loop. Right?
Thanks,
Song
Quoted 9 lines
tools/testing/selftests/bpf/prog_tests/find_vma.c +1
-2-test_and_reset_skel (skel, -EBUSY /* in nmi, irq_work is busy */ , i == one_bn); +test_and_reset_skel (skel, -EBUSY /* in nmi, irq_work is busy */ , i == dummy_wait); cleanup:bpf_link__destroy (link);close (pfd); --2.34.1