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

End-to-end testing of matchers #153

Open
qdeslandes opened this issue Oct 29, 2024 · 0 comments
Open

End-to-end testing of matchers #153

qdeslandes opened this issue Oct 29, 2024 · 0 comments

Comments

@qdeslandes
Copy link
Contributor

qdeslandes commented Oct 29, 2024

More and more matchers are added to bpfilter (15 and counting!), each of them supporting different operators and interacting differently which each BPF flavour (XDP, TC, BPF_NETFILTER, CGroup).

All the matchers are manually tested, but as the number of matchers grows, it's becoming more and more difficult to avoid issues when the code generation logic is modified. Thus, we need an easy-to-use, deterministic way of testing all the matchers.

A solution would be to reuse the logic implemented in the benchmark, minus the numerous iterations of BPF_PROG_TEST_RUN:

  • Start the daemon
  • Use bfcli to create the filtering chain, using a specific matcher
  • Use BPF_PROG_TEST_RUN once and validate the result of the program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant