]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/bpf: Fix verifier_arena_large/big_alloc3 test
authorPuranjay Mohan <puranjay@kernel.org>
Tue, 30 Dec 2025 19:51:32 +0000 (11:51 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Dec 2025 20:35:23 +0000 (12:35 -0800)
The big_alloc3() test tries to allocate 2051 pages at once in
non-sleepable context and this can fail sporadically on resource
contrained systems, so skip this test in case of such failures.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20251230195134.599463-1-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_arena_large.c

index 4ca491cbe8d15dbce029b04760d2f99b3a77b4cf..5f7e7afee169edb83a095fd7115f8d73c9671360 100644 (file)
@@ -300,7 +300,7 @@ int big_alloc3(void *ctx)
         */
        pages = bpf_arena_alloc_pages(&arena, NULL, 2051, NUMA_NO_NODE, 0);
        if (!pages)
-               return -1;
+               return 0;
 
        bpf_for(i, 0, 2051)
                        pages[i * PAGE_SIZE] = 123;