Skip to content

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Feb 24, 2025

Introduce helpers for creating a map, program, collection from a spec. Additionally, add helpers which create very common types like arrays or socket filter programs.

This significantly cuts down on boiler plate in unit tests, and ensures that all resources backed by a file descriptor are cleaned up.

It will also allow adding compatibility code for running Linux unit tests on Windows in a central location.

@lmb lmb marked this pull request as ready for review February 24, 2025 21:22
@lmb lmb requested a review from a team as a code owner February 24, 2025 21:23
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack on the concept, left one comment.

@lmb lmb force-pushed the ebpf-clean-up-tests branch from a6d5d62 to 62ec79c Compare March 3, 2025 09:30
Introduce helpers for creating a map, program, collection from a spec.
Additionally, add helpers which create very common types like arrays
or socket filter programs.

This significantly cuts down on boiler plate in unit tests, and ensures
that all resources backed by a file descriptor are cleaned up.

It will also allow adding compatibility code for running Linux unit
tests on Windows in a central location.

Signed-off-by: Lorenz Bauer <[email protected]>
@lmb lmb force-pushed the ebpf-clean-up-tests branch from 62ec79c to 98b49c8 Compare March 3, 2025 09:42
@lmb lmb merged commit 7c0b07d into cilium:main Mar 3, 2025
17 checks passed
@lmb lmb deleted the ebpf-clean-up-tests branch March 3, 2025 10:01
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