diff options
| author | Prankur gupta <[email protected]> | 2020-12-02 21:31:52 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-12-04 01:23:24 +0000 |
| commit | 55144f31f0d2fdd3e74ead67f1649bf577961eaa (patch) | |
| tree | b1c7a0f08e572ddb25c8016d65cb2ee588b1c2ea /tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c | |
| parent | bpf: Adds support for setting window clamp (diff) | |
| download | kernel-55144f31f0d2fdd3e74ead67f1649bf577961eaa.tar.gz kernel-55144f31f0d2fdd3e74ead67f1649bf577961eaa.zip | |
selftests/bpf: Add Userspace tests for TCP_WINDOW_CLAMP
Adding selftests for new added functionality to set TCP_WINDOW_CLAMP
from bpf setsockopt.
Signed-off-by: Prankur gupta <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c b/tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c index ab5281475f44..87923d2865b7 100644 --- a/tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c +++ b/tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c @@ -42,6 +42,10 @@ static void verify_result(struct tcpbpf_globals *result) /* check getsockopt for SAVED_SYN */ ASSERT_EQ(result->tcp_saved_syn, 1, "tcp_saved_syn"); + + /* check getsockopt for window_clamp */ + ASSERT_EQ(result->window_clamp_client, 9216, "window_clamp_client"); + ASSERT_EQ(result->window_clamp_server, 9216, "window_clamp_server"); } static void run_test(struct tcpbpf_globals *result) |
