]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Wed, 20 Nov 2024 07:43:12 +0000 (08:43 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 2 Dec 2024 16:41:16 +0000 (08:41 -0800)
commit3fed5d084fb36365ccf06b6fe20d19e0e672a47d
tree9c97d3e2104b6e3084db73312a2a60cf46a0bef3
parent2fe34a116c707821c99bb352cb33be277c99d491
selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys

The flow_dissector program currently compares flow keys returned by bpf
program with the expected one thanks to a custom macro using memcmp.

Use the new ASSERT_MEMEQ macro to perform this comparision. This update
also allows to get rid of the unused bpf_test_run_opts variable in
run_tests_skb_less (it was only used by the CHECK macro for its duration
field)

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-2-45b46494f937@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/flow_dissector.c