]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Test bpf_sk_storage_get in tcp iterators
authorFlorent Revest <revest@chromium.org>
Fri, 4 Dec 2020 11:36:09 +0000 (12:36 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Dec 2020 21:32:40 +0000 (22:32 +0100)
commit167539cf40b9df11a64a4135db5e68b172784a9f
tree8dca2f1c1cfefc0fe847186de2ad1feaf1e420e1
parent2c39969039414997ee96a4350cab60301f1ffad7
selftests/bpf: Test bpf_sk_storage_get in tcp iterators

This extends the existing bpf_sk_storage_get test where a socket is
created and tagged with its creator's pid by a task_file iterator.

A TCP iterator is now also used at the end of the test to negate the
values already stored in the local storage. The test therefore expects
-getpid() to be stored in the local storage.

Signed-off-by: Florent Revest <revest@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20201204113609.1850150-6-revest@google.com
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
tools/testing/selftests/bpf/progs/bpf_iter_bpf_sk_storage_helpers.c