]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/bpf: Test insns processed breakdown
authorPaul Chaignon <paul.chaignon@gmail.com>
Thu, 30 Apr 2026 08:45:24 +0000 (10:45 +0200)
committerKumar Kartikeya Dwivedi <memxor@gmail.com>
Thu, 30 Apr 2026 11:18:48 +0000 (13:18 +0200)
This patch covers in global subprog selftests the new verifier log with
the breakdown of instructions processed by global subprogs. The test
ensures the log line is present and that it has the right number of
subcounts.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/bpf/3a5157f4573edaa8846f6fc4041f715136f693b1.1777538384.git.paul.chaignon@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
tools/testing/selftests/bpf/progs/verifier_global_subprogs.c

index 1e08aff7532e36317d92dfd889d2e24c008d8fe8..dc09d0e2d8adf576ad4c5ead477a068535dedec3 100644 (file)
@@ -46,12 +46,13 @@ __noinline long global_dead(void)
 }
 
 SEC("?raw_tp")
-__success __log_level(2)
+__success __log_level(6)
 /* main prog is validated completely first */
 __msg("('global_calls_good_only') is global and assumed valid.")
 /* eventually global_good() is transitively validated as well */
 __msg("Validating global_good() func")
 __msg("('global_good') is safe for any args that match its prototype")
+__msg("insns processed {{[0-9]+\\+[0-9]+\\+[0-9]+$}}")
 int chained_global_func_calls_success(void)
 {
        int sum = 0;