selftests: bpf: introduce __stderr and __stdout
authorPuranjay Mohan <puranjay@kernel.org>
Thu, 11 Sep 2025 14:58:03 +0000 (14:58 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 11 Sep 2025 20:00:44 +0000 (13:00 -0700)
commit744eeb2b27c29a61ad13b6b6367636b233e32336
treef2333ce720132416513cca90cb8cb51531d6c26c
parent5c5240d020615f13331f4e2c559186125eddc7d3
selftests: bpf: introduce __stderr and __stdout

Add __stderr and __stdout to validate the output of BPF streams for bpf
selftests. Similar to __xlated, __jited, etc., __stderr/out can be used
in the BPF progs to compare a string (regex supported) to the output in
the bpf streams.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250911145808.58042-5-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/bpf_misc.h
tools/testing/selftests/bpf/test_loader.c