]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: Make align selftests more robust
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 11 Oct 2023 22:37:26 +0000 (15:37 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 16 Oct 2023 11:49:18 +0000 (13:49 +0200)
commitcde785142885e1fc62a9ae92e7aae90285ed3d79
tree76e6915d8e60cff8dde4f818c88c23fd6e632712
parent08a7078feacf419305d86d36b974c48347f3abb0
selftests/bpf: Make align selftests more robust

Align subtest is very specific and finicky about expected verifier log
output and format. This is often completely unnecessary as in a bunch of
situations test actually cares about var_off part of register state. But
given how exact it is right now, any tiny verifier log changes can lead
to align tests failures, requiring constant adjustment.

This patch tries to make this a bit more robust by making logic first
search for specified register and then allowing to match only portion of
register state, not everything exactly. This will come handly with
follow up changes to SCALAR register output disambiguation.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20231011223728.3188086-4-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/align.c