-
Notifications
You must be signed in to change notification settings - Fork 286
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: add the possibility to run a test inside a network namespace #696
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! A couple of nits, but excited to get this merged.
@tamird I'll remove that script function. Something more ad-hoc will be added in the future when needed (even in my xdp maps pr I don't need it). Good idea for the netns crate. Especially since it handles the rollback to the original netns, it'll remove the thread we spawn. As for userspace, I think that |
@tamird last comments taken into account. I squashed all commits in a single one (it ends up pretty short, to not pollute the log with useless commits) and rebased on Thanks for the swift reviews! |
For tests that do networking operations, this allows to have a clean-state network namespace and interfaces for each test. Mainly, this avoids "device or resource busy" errors when reusing the loopback interface across tests.
@alessandrod PTAL since this technically affects public API. |
Per discord discussion we don't need API review here. |
For tests that do networking operations, this allows to have a clean-state network namespace and interfaces for each test. Mainly, this avoids "device or resource busy" errors when reusing the loopback interface across tests.