]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add tests for bpf_sk_storage to bpf_tcp_ca
authorMartin KaFai Lau <kafai@fb.com>
Fri, 20 Mar 2020 15:21:07 +0000 (08:21 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 23 Mar 2020 19:51:55 +0000 (20:51 +0100)
commit9b11b562f1afe056dcd15c1476ccd60a8bfb80d7
tree24b2e33e4c91a8e5ca60ad7464adaafcad108e37
parent7162cb1c86b3149a0aba44a14c98395eb6f36518
bpf: Add tests for bpf_sk_storage to bpf_tcp_ca

This patch adds test to exercise the bpf_sk_storage_get()
and bpf_sk_storage_delete() helper from the bpf_dctcp.c.

The setup and check on the sk_storage is done immediately
before and after the connect().

This patch also takes this chance to move the pthread_create()
after the connect() has been done.  That will remove the need of
the "wait_thread" label.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200320152107.2169904-1-kafai@fb.com
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/progs/bpf_dctcp.c