public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: fix use of uninitialized op_name in log tests
@ 2023-04-13  9:47 Lorenz Bauer
  2023-04-13 12:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenz Bauer @ 2023-04-13  9:47 UTC (permalink / raw)
  To: Andrii Nakryiko, Mykola Lysenko, Alexei Starovoitov,
	Daniel Borkmann, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Shuah Khan, Lorenz Bauer
  Cc: bpf, linux-kselftest, linux-kernel

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

Fixes: b1a7a480a112 ("selftests/bpf: Add fixed vs rotating verifier log tests")
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
---
 tools/testing/selftests/bpf/prog_tests/verifier_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/verifier_log.c b/tools/testing/selftests/bpf/prog_tests/verifier_log.c
index 475092a78deb..8337c6bc5b95 100644
--- a/tools/testing/selftests/bpf/prog_tests/verifier_log.c
+++ b/tools/testing/selftests/bpf/prog_tests/verifier_log.c
@@ -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;
 	}
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: fix use of uninitialized op_name in log tests
  2023-04-13  9:47 [PATCH bpf-next] selftests/bpf: fix use of uninitialized op_name in log tests Lorenz Bauer
@ 2023-04-13 12:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-13 12:30 UTC (permalink / raw)
  To: Lorenz Bauer
  Cc: andrii, mykolal, ast, daniel, martin.lau, song, yhs,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah, bpf,
	linux-kselftest, linux-kernel

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Thu, 13 Apr 2023 10:47:40 +0100 you wrote:
> One of the test assertions uses an uninitialized op_name, which leads
> to some headscratching if it fails. Use a string constant instead.
> 
> Fixes: b1a7a480a112 ("selftests/bpf: Add fixed vs rotating verifier log tests")
> Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
> ---
>  tools/testing/selftests/bpf/prog_tests/verifier_log.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [bpf-next] selftests/bpf: fix use of uninitialized op_name in log tests
    https://git.kernel.org/bpf/bpf-next/c/5a674611d116

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-13 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13  9:47 [PATCH bpf-next] selftests/bpf: fix use of uninitialized op_name in log tests Lorenz Bauer
2023-04-13 12:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox