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 --- Changes in v3: - Limit testing to one program and use a regex to prevent failures across compiler versions. Changes in v2: - Adapted the tests to pass on cpu=v4 and alu32. tools/testing/selftests/bpf/progs/verifier_global_subprogs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c b/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c index 1e08aff7532e..dc09d0e2d8ad 100644 --- a/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c +++ b/tools/testing/selftests/bpf/progs/verifier_global_subprogs.c @@ -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; -- 2.43.0