]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
veristat: Report program type guess results to sdterr
authorEduard Zingerman <eddyz87@gmail.com>
Sat, 1 Mar 2025 00:01:47 +0000 (16:01 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Mar 2025 18:48:26 +0000 (11:48 -0700)
In order not to pollute CSV output, e.g.:

  $ ./veristat -o csv exceptions_ext.bpf.o > test.csv
  Using guessed program type 'sched_cls' for exceptions_ext.bpf.o/extension...
  Using guessed program type 'sched_cls' for exceptions_ext.bpf.o/throwing_extension...

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>
Link: https://lore.kernel.org/bpf/20250301000147.1583999-4-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/veristat.c

index 41dfcb6f569037e67d85e573dc203cb151a5dced..a18972ffdeb6f2291613af2b0561e05b7015f7a7 100644 (file)
@@ -1234,13 +1234,13 @@ static void fixup_obj(struct bpf_object *obj, struct bpf_program *prog, const ch
                        bpf_program__set_expected_attach_type(prog, attach_type);
 
                        if (!env.quiet) {
-                               printf("Using guessed program type '%s' for %s/%s...\n",
+                               fprintf(stderr, "Using guessed program type '%s' for %s/%s...\n",
                                        libbpf_bpf_prog_type_str(prog_type),
                                        filename, prog_name);
                        }
                } else {
                        if (!env.quiet) {
-                               printf("Failed to guess program type for freplace program with context type name '%s' for %s/%s. Consider using canonical type names to help veristat...\n",
+                               fprintf(stderr, "Failed to guess program type for freplace program with context type name '%s' for %s/%s. Consider using canonical type names to help veristat...\n",
                                        ctx_name, filename, prog_name);
                        }
                }