Commit 5a674611 authored by Lorenz Bauer's avatar Lorenz Bauer Committed by Daniel Borkmann
Browse files

selftests/bpf: Fix use of uninitialized op_name in log tests



One of the test assertions uses an uninitialized op_name, which leads
to some headscratching if it fails. Use a string constant instead.

Fixes: b1a7a480 ("selftests/bpf: Add fixed vs rotating verifier log tests")
Signed-off-by: default avatarLorenz Bauer <lmb@isovalent.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230413094740.18041-1-lmb@isovalent.com
parent d319f344
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ static void verif_log_subtest(const char *name, bool expect_load_error, int log_
		}
		if (!ASSERT_EQ(strlen(logs.buf), 24, "log_fixed_25"))
			goto cleanup;
		if (!ASSERT_STRNEQ(logs.buf, logs.reference, 24, op_name))
		if (!ASSERT_STRNEQ(logs.buf, logs.reference, 24, "log_fixed_contents_25"))
			goto cleanup;
	}