(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/bpf: Skip compare_text subtest when stdout is not saved

stdio_hijack_init() does not set subtest_state->stdout_saved when running with -v in non-parallel mode, since output goes straight to stdout. In that case subtest_state->log_buf is left NULL, so the compare_text_mismatch subtest crashes when inspecting it. Skip it when stdout was not saved. Fixes: bd71904697c6 ("selftests/bpf: Add compare_text_to_expected() helper") Signed-off-by: KaFai Wan <kafai.wan@linux.dev> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261012140202.2754552-4-kafai.wan@linux.dev


Author KaFai Wan Committer Alexei Starovoitov Date Commit Parent cc4b1c16
+11 -7
1 changed file
+11 -7
1 changed file