selftests/bpf: Double the size of test_loader log
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 2 Jan 2024 19:30:36 +0000 (20:30 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 4 Jan 2024 22:35:35 +0000 (14:35 -0800)
Testing long jumps requires having >32k instructions. That many
instructions require the verifier log buffer of 2 megabytes.

The regular test_progs run doesn't need an increased buffer, since
gotol test with 40k instructions doesn't request a log,
but test_progs -v will set the verifier log level.
Hence to avoid breaking gotol test with -v increase the buffer size.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/r/20240102193531.3169422-3-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_loader.c

index 74ceb7877ae220cc9d05d88e9b5121455f0360f9..f01391021218db0b921fbec531a0d2679617fdf1 100644 (file)
@@ -12,7 +12,7 @@
 #define str_has_pfx(str, pfx) \
        (strncmp(str, pfx, __builtin_constant_p(pfx) ? sizeof(pfx) - 1 : strlen(pfx)) == 0)
 
-#define TEST_LOADER_LOG_BUF_SZ 1048576
+#define TEST_LOADER_LOG_BUF_SZ 2097152
 
 #define TEST_TAG_EXPECT_FAILURE "comment:test_expect_failure"
 #define TEST_TAG_EXPECT_SUCCESS "comment:test_expect_success"