]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: cover UTF-8 trace_printk output
authorYihan Ding <dingyihan@uniontech.com>
Thu, 16 Apr 2026 12:01:42 +0000 (20:01 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 16 Apr 2026 22:53:32 +0000 (15:53 -0700)
commit4198ff31edb193cb11955338ee923d9f842a4fce
treee3e0ca23f368a61a4f9d7497c98b78cb4019356b
parentb960430ea8862ef37ce53c8bf74a8dc79d3f2404
selftests/bpf: cover UTF-8 trace_printk output

Extend trace_printk coverage to verify that UTF-8 literal text is
emitted successfully and that '%' parsing still rejects non-ASCII
bytes once format parsing starts.

Use an explicitly invalid format string for the negative case so the
ASCII-only parser expectation is visible from the test code itself.

Signed-off-by: Yihan Ding <dingyihan@uniontech.com>
Acked-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/r/20260416120142.1420646-3-dingyihan@uniontech.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/trace_printk.c
tools/testing/selftests/bpf/progs/trace_printk.c