diff options
author | Kui-Feng Lee <thinker.li@gmail.com> | 2023-06-24 04:46:00 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-06-30 17:09:27 +0300 |
commit | 539c7e67aa4a170eea9a401464ec72a18a795a30 (patch) | |
tree | 495adb20014b9ddafef1f27fe5029d614e035ac9 /tools/testing/selftests/bpf/cgroup_helpers.h | |
parent | 223f5f79f2ce8facd9d77dd44e9f403343630bfc (diff) | |
download | linux-539c7e67aa4a170eea9a401464ec72a18a795a30.tar.xz |
selftests/bpf: Verify that the cgroup_skb filters receive expected packets.
This test case includes four scenarios:
1. Connect to the server from outside the cgroup and close the connection
from outside the cgroup.
2. Connect to the server from outside the cgroup and close the connection
from inside the cgroup.
3. Connect to the server from inside the cgroup and close the connection
from outside the cgroup.
4. Connect to the server from inside the cgroup and close the connection
from inside the cgroup.
The test case is to verify that cgroup_skb/{egress, ingress} filters
receive expected packets including SYN, SYN/ACK, ACK, FIN, and FIN/ACK.
Signed-off-by: Kui-Feng Lee <kuifeng@meta.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230624014600.576756-3-kuifeng@meta.com
Diffstat (limited to 'tools/testing/selftests/bpf/cgroup_helpers.h')
-rw-r--r-- | tools/testing/selftests/bpf/cgroup_helpers.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/cgroup_helpers.h b/tools/testing/selftests/bpf/cgroup_helpers.h index f099a166c94d..5c2cb9c8b546 100644 --- a/tools/testing/selftests/bpf/cgroup_helpers.h +++ b/tools/testing/selftests/bpf/cgroup_helpers.h @@ -22,6 +22,7 @@ void remove_cgroup(const char *relative_path); unsigned long long get_cgroup_id(const char *relative_path); int join_cgroup(const char *relative_path); +int join_root_cgroup(void); int join_parent_cgroup(const char *relative_path); int setup_cgroup_environment(void); |