Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sock addr hook callout test #922

Merged
merged 24 commits into from
Apr 12, 2022

Conversation

shankarseal
Copy link
Collaborator

Description

Adds tests for sock_addr hook. This fixes #871 .

  • Refactored common socket related classes from xdp_tests.cpp to a new socket_helper.cpp module.
  • Fix some WFP related bugs in bind and xdp hooks. The callouts were doing "soft block".
  • Remove unit_tests.exe from selfhost runner tests as it was redundant.

Testing

Added tests for eBPF programs handling TCP v4, v6 and UDP v4. v6 egress/ingress connections.

Documentation

Minor documentation changes.

@codecov
Copy link

codecov bot commented Apr 9, 2022

Codecov Report

Merging #922 (cb2c7e5) into main (63ed183) will decrease coverage by 39.55%.
The diff coverage is n/a.

❗ Current head cb2c7e5 differs from pull request most recent head 20d208b. Consider uploading reports for the commit 20d208b to get more accurate results

@@             Coverage Diff             @@
##             main     #922       +/-   ##
===========================================
- Coverage   82.89%   43.34%   -39.56%     
===========================================
  Files          86       54       -32     
  Lines       15122    10168     -4954     
===========================================
- Hits        12535     4407     -8128     
- Misses       2587     5761     +3174     
Impacted Files Coverage Δ
include/tlv.h 0.00% <0.00%> (-100.00%) ⬇️
libs/platform/ebpf_platform.h 0.00% <0.00%> (-100.00%) ⬇️
include/ebpf_utilities.h 12.30% <0.00%> (-87.70%) ⬇️
libs/platform/ebpf_bitmap.c 0.00% <0.00%> (-83.34%) ⬇️
libs/api/libbpf_map.cpp 8.48% <0.00%> (-80.00%) ⬇️
libs/execution_context/ebpf_maps.c 11.81% <0.00%> (-73.28%) ⬇️
libs/platform/ebpf_async.c 17.91% <0.00%> (-71.65%) ⬇️
libs/api/libbpf_internal.h 0.00% <0.00%> (-66.67%) ⬇️
libs/platform/ebpf_ring_buffer.c 0.00% <0.00%> (-66.67%) ⬇️
libs/platform/ebpf_program_types.c 10.63% <0.00%> (-63.83%) ⬇️
... and 62 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11c7721...20d208b. Read the comment docs.

@shankarseal shankarseal force-pushed the sock_addr_hook_callout_test branch from a2d29c8 to ef1795c Compare April 9, 2022 09:34
docs/GettingStarted.md Outdated Show resolved Hide resolved
docs/GettingStarted.md Outdated Show resolved Hide resolved
netebpfext/net_ebpf_ext.c Outdated Show resolved Hide resolved
netebpfext/net_ebpf_ext_hook_provider.h Outdated Show resolved Hide resolved
netebpfext/net_ebpf_ext_sock_addr.c Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Show resolved Hide resolved
scripts/run_tests.psm1 Show resolved Hide resolved
scripts/run_tests.psm1 Show resolved Hide resolved
docs/GettingStarted.md Outdated Show resolved Hide resolved
netebpfext/net_ebpf_ext.h Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.h Outdated Show resolved Hide resolved
tests/libs/util/socket_helper.cpp Outdated Show resolved Hide resolved
@shankarseal shankarseal force-pushed the sock_addr_hook_callout_test branch from cb2c7e5 to 20d208b Compare April 12, 2022 05:03
dthaler
dthaler previously approved these changes Apr 12, 2022
docs/GettingStarted.md Outdated Show resolved Hide resolved
@shankarseal shankarseal merged commit 745bac2 into microsoft:main Apr 12, 2022
@shankarseal shankarseal deleted the sock_addr_hook_callout_test branch May 17, 2022 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants