All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sun Jian <sun.jian.kdev@gmail.com>
To: andrii@kernel.org, eddyz87@gmail.com
Cc: ast@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
	song@kernel.org, yonghong.song@linux.dev,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, jolsa@kernel.org, shuah@kernel.org,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Sun Jian <sun.jian.kdev@gmail.com>
Subject: [PATCH] selftests/bpf: skip verif_scale_pyperf600 on -E2BIG jump complexity limit
Date: Mon,  2 Mar 2026 15:14:34 +0800	[thread overview]
Message-ID: <20260302071434.311395-1-sun.jian.kdev@gmail.com> (raw)

verif_scale_pyperf600 loads pyperf600.bpf.o, a large scale case produced
by partial LLVM unrolling.

On some kernel/toolchain combinations, the verifier rejects it with -E2BIG:

  The sequence of 8193 jumps is too complex.

This hits the verifier jump sequence complexity limit (8192).

Treat -E2BIG for this test as SKIP rather than FAIL. Other pyperf600
variants are unaffected.

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
---
 .../bpf/prog_tests/bpf_verif_scale.c          | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c b/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
index 73f669014b69..181acdddea1c 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
@@ -112,13 +112,33 @@ void test_verif_scale_pyperf180()
 
 void test_verif_scale_pyperf600()
 {
+	libbpf_print_fn_t old_print_fn = NULL;
+	int err;
+
 	/* partial unroll. llvm will unroll loop ~150 times.
 	 * C loop count -> 600.
 	 * Asm loop count -> 4.
 	 * 16k insns in loop body.
 	 * Total of 5 such loops. Total program size ~82k insns.
 	 */
-	scale_test("pyperf600.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT, false);
+
+	if (env.verifier_stats) {
+		test__force_log();
+		old_print_fn = libbpf_set_print(libbpf_debug_print);
+	}
+
+	err = check_load("pyperf600.bpf.o", BPF_PROG_TYPE_RAW_TRACEPOINT);
+
+	if (env.verifier_stats)
+		libbpf_set_print(old_print_fn);
+
+	if (err == -E2BIG) {
+		test__skip();
+		return;
+	}
+
+	ASSERT_OK(err, "expect_success");
+
 }
 
 void test_verif_scale_pyperf600_bpf_loop(void)

base-commit: 11439c4635edd669ae435eec308f4ab8a0804808
-- 
2.43.0


             reply	other threads:[~2026-03-02  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02  7:14 Sun Jian [this message]
2026-03-04 11:24 ` [PATCH] selftests/bpf: skip verif_scale_pyperf600 on -E2BIG jump complexity limit Paul Chaignon
2026-03-05  0:49   ` sun jian
2026-03-06  1:14     ` Alexei Starovoitov
2026-03-06  2:08       ` sun jian
2026-03-06 12:08         ` sun jian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260302071434.311395-1-sun.jian.kdev@gmail.com \
    --to=sun.jian.kdev@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.