diff mbox series

[RFC] find_vma BPF test: increase length CPU computation

Message ID 20240109095637.35934-1-alessandro.carminati@gmail.com (mailing list archive)
State RFC
Delegated to: BPF
Headers show
Series [RFC] find_vma BPF test: increase length CPU computation | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-next-VM_Test-4 success Logs for aarch64-gcc / build / build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-10 success Logs for aarch64-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Unittests
bpf/vmtest-bpf-next-VM_Test-3 success Logs for Validate matrix.py
bpf/vmtest-bpf-next-VM_Test-5 success Logs for aarch64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-0 success Logs for Lint
bpf/vmtest-bpf-next-VM_Test-12 success Logs for s390x-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-11 success Logs for s390x-gcc / build / build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-19 success Logs for x86_64-gcc / build / build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-9 success Logs for aarch64-gcc / test (test_verifier, false, 360) / test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-18 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-22 success Logs for x86_64-gcc / test (test_progs, false, 360) / test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-17 success Logs for s390x-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-8 success Logs for aarch64-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-7 success Logs for aarch64-gcc / test (test_progs, false, 360) / test_progs on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-20 success Logs for x86_64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-23 success Logs for x86_64-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-31 success Logs for x86_64-llvm-17 / veristat
bpf/vmtest-bpf-next-VM_Test-33 fail Logs for x86_64-llvm-18 / build-release / build for x86_64 with llvm-18 and -O2 optimization
bpf/vmtest-bpf-next-VM_Test-21 success Logs for x86_64-gcc / test (test_maps, false, 360) / test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-35 success Logs for x86_64-llvm-18 / veristat
bpf/vmtest-bpf-next-VM_Test-24 success Logs for x86_64-gcc / test (test_progs_no_alu32_parallel, true, 30) / test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-30 success Logs for x86_64-llvm-17 / test
bpf/vmtest-bpf-next-VM_Test-34 success Logs for x86_64-llvm-18 / test
bpf/vmtest-bpf-next-VM_Test-6 success Logs for aarch64-gcc / test (test_maps, false, 360) / test_maps on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-27 success Logs for x86_64-gcc / veristat / veristat on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-32 fail Logs for x86_64-llvm-18 / build / build for x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-25 success Logs for x86_64-gcc / test (test_progs_parallel, true, 30) / test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-28 fail Logs for x86_64-llvm-17 / build / build for x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-26 success Logs for x86_64-gcc / test (test_verifier, false, 360) / test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-16 success Logs for s390x-gcc / test (test_verifier, false, 360) / test_verifier on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-29 fail Logs for x86_64-llvm-17 / build-release / build for x86_64 with llvm-17 and -O2 optimization
bpf/vmtest-bpf-next-VM_Test-15 success Logs for s390x-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on s390x with gcc
bpf/vmtest-bpf-next-VM_Test-14 success Logs for s390x-gcc / test (test_progs, false, 360) / test_progs on s390x with gcc
bpf/vmtest-bpf-next-PR fail PR summary
bpf/vmtest-bpf-next-VM_Test-13 success Logs for s390x-gcc / test (test_maps, false, 360) / test_maps on s390x with gcc

Commit Message

Alessandro Carminati Jan. 9, 2024, 9:56 a.m. UTC
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.

Signed-off-by: Alessandro Carminati (Red Hat) <alessandro.carminati@gmail.com>
---
 tools/testing/selftests/bpf/prog_tests/find_vma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Song Liu Jan. 9, 2024, 5:45 p.m. UTC | #1
On Tue, Jan 9, 2024 at 1:57 AM Alessandro Carminati (Red Hat)
<alessandro.carminati@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Alessandro Carminati (Red Hat) <alessandro.carminati@gmail.com>
> ---
>  tools/testing/selftests/bpf/prog_tests/find_vma.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/find_vma.c b/tools/testing/selftests/bpf/prog_tests/find_vma.c
> index 5165b38f0e59..43d62db8d57b 100644
> --- a/tools/testing/selftests/bpf/prog_tests/find_vma.c
> +++ b/tools/testing/selftests/bpf/prog_tests/find_vma.c
> @@ -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.

>
>         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;

So we will skip this loop. Right?

Thanks,
Song


>
> -       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
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/prog_tests/find_vma.c b/tools/testing/selftests/bpf/prog_tests/find_vma.c
index 5165b38f0e59..43d62db8d57b 100644
--- a/tools/testing/selftests/bpf/prog_tests/find_vma.c
+++ b/tools/testing/selftests/bpf/prog_tests/find_vma.c
@@ -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);