On Thu, Sep 2, 2021 at 10:23 AM Dave Marchevsky <davemarchevsky@xxxxxx> wrote: > > This commit adds a test prog for vprintk which confirms that: > * bpf_trace_vprintk is writing to dmesg But it doesn't write to dmesg, does it? It's writing to /sys/kernel/debug/tracing/trace_pipe, which is a different thing entirely, right? > * __bpf_vprintk macro works as expected > * >3 args are printed > > Approach and code are borrowed from trace_printk test. > > Signed-off-by: Dave Marchevsky <davemarchevsky@xxxxxx> > Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > --- > tools/testing/selftests/bpf/Makefile | 3 +- > .../selftests/bpf/prog_tests/trace_vprintk.c | 65 +++++++++++++++++++ > .../selftests/bpf/progs/trace_vprintk.c | 25 +++++++ > 3 files changed, 92 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/bpf/prog_tests/trace_vprintk.c > create mode 100644 tools/testing/selftests/bpf/progs/trace_vprintk.c > [...]