selftests: bpf: Add helper to compare socket cookies
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 28 Sep 2020 09:08:03 +0000 (10:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 28 Sep 2020 23:47:58 +0000 (16:47 -0700)
commit26c3270ddb4955be358c888766ad1a6105dd7469
tree9ea18ffe910e17564f444f886b56a691a0b970fd
parent6550f2dddfab02a5b948369eeeaedfbc4ae3cc16
selftests: bpf: Add helper to compare socket cookies

We compare socket cookies to ensure that insertion into a sockmap worked.
Pull this out into a helper function for use in other tests.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200928090805.23343-3-lmb@cloudflare.com
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c