mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
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: b1a7a480a1
("selftests/bpf: Add fixed vs rotating verifier log tests")
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230413094740.18041-1-lmb@isovalent.com
This commit is contained in:
parent
d319f34456
commit
5a674611d1
1 changed files with 1 additions and 1 deletions
|
@ -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"))
|
if (!ASSERT_EQ(strlen(logs.buf), 24, "log_fixed_25"))
|
||||||
goto cleanup;
|
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;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue