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

Add tests #7

Open
vadorovsky opened this issue Jun 4, 2021 · 2 comments
Open

Add tests #7

vadorovsky opened this issue Jun 4, 2021 · 2 comments
Assignees
Labels
help wanted Extra attention is needed priority/high

Comments

@vadorovsky
Copy link
Member

For now my suggestion would be to have two kinds of tests

  • unit tests (with some mocks, to not have to load actual BPF programs when running as user)
  • integration tests with runc/podman, something local and lightweight (requiring root, doing actual BPF operations)

For future we might consider also some E2E tests with Kubernetes.

@briandowns
Copy link
Collaborator

Unity for C is a really nice and easy to use unit testing library. Not sure if you've used it. If not, here's an example. https://github.com/briandowns/libspinner/blob/master/tests/tests.c

@vadorovsky vadorovsky added help wanted Extra attention is needed priority/high labels Jun 4, 2021
@vadorovsky
Copy link
Member Author

I didn't. I only used https://developer.gnome.org/glib/stable/glib-Testing.html once and had a look at the selftests in the Linux kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority/high
Projects
None yet
Development

No branches or pull requests

3 participants