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

test: run locally and on github's runner, include eBPF checks #15

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

vjardin
Copy link
Contributor

@vjardin vjardin commented Feb 14, 2024

let's have a simpler workflow and let's have the ability to run the tests on our local setup too.

For the records, see: /~https://github.com/vjardin/gtp-guard/actions/runs/7906617454/job/21581891672#step:4:287

Note: it is broken on the head, since eBPF PPP is having the following issue:
/~https://github.com/vjardin/gtp-guard/actions/runs/7906684774/job/21582126747#step:4:232

[...]
libbpf: map 'teid_ingress': found map_flags = 1.
libbpf: map 'ppp_ingress': at sec_idx 6, offset 120.
libbpf: map 'ppp_ingress': can't determine key size for type [30]: -22.
ERROR: opening BPF object file failed

next: add GTPu ping, enable the gtp_mirror.bpf which is currently disabled.

example of usage:
sudo ./testenv.sh \
  -i /home/vjardin/dev/gtping/src/gtping \
  -g /home/vjardin/dev/gtp-guard/bin/gtp-guard \
  -c /tmp/gtp-guard.conf \
  -f /home/vjardin/dev/gtp-guard/src/bpf/gtp_fwd.bpf \
  -r /home/vjardin/dev/gtp-guard/src/bpf/gtp_route.bpf \
  -m /home/vjardin/dev/gtp-guard/src/bpf/gtp_mirror.bpf \
  -k no

It creates 3 netns and 1 sandbox one.

The sandbox netns is used to check eBPF modules.

The 3 netns are used as a virtual topology in order to have simulated
end to end setup.

This script is designed to be run locally or from github's Actions.
Let's have a simpler pipeline so the same tests can be run locally and
on any github's runner.
If a eBPF check if failing, sandbox is not cleaned: fine since it helps
for debugging but once we need to rerun the test of tests, it shall be
dropped.
@acassen acassen merged commit 7d1ff63 into acassen:main Feb 14, 2024
3 of 4 checks passed
@vjardin vjardin deleted the gtp-guard-bpf branch February 14, 2024 20:35
@vjardin vjardin restored the gtp-guard-bpf branch April 30, 2024 05:59
@vjardin vjardin deleted the gtp-guard-bpf branch April 30, 2024 07:02
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.

2 participants