linux/tools/testing
Prankur Gupta f2a6ee924d selftests/bpf: Add tests for {set|get} socket option from setsockopt BPF
Adding selftests for the newly added functionality to call bpf_setsockopt()
and bpf_getsockopt() from setsockopt BPF programs.

Test Details:

1. BPF Program

   Checks for changes in IPV6_TCLASS(SOL_IPV6) via setsockopt
   If the cca for the socket is not cubic do nothing
   If the newly set value for IPV6_TCLASS is 45 (0x2d) (as per our use-case)
   then change the cc from cubic to reno

2. User Space Program

   Creates an AF_INET6 socket and set the cca for that to be "cubic"
   Attach the program and set the IPV6_TCLASS to 0x2d using setsockopt
   Verify the cca for the socket changed to reno

Signed-off-by: Prankur Gupta <prankgup@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210817224221.3257826-3-prankgup@fb.com
2021-08-20 01:10:01 +02:00
..
fault-injection
ktest bootconfig/tracing/ktest: Add ktest examples of testing bootconfig 2021-06-24 15:34:33 -04:00
kunit kunit: tool: Assert the version requirement 2021-07-12 14:02:32 -06:00
nvdimm ACPI: NFIT: Fix support for variable 'SPA' structure size 2021-05-12 12:38:25 -07:00
radix-tree idr test suite: Improve reporting from idr_find_test_1 2021-04-01 07:50:42 -04:00
scatterlist
selftests selftests/bpf: Add tests for {set|get} socket option from setsockopt BPF 2021-08-20 01:10:01 +02:00
vsock vsock_test: add SOCK_SEQPACKET tests 2021-06-11 13:32:47 -07:00