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

Create test suite that works with userspace networking. #2267

Open
alfreb opened this issue Aug 24, 2024 · 2 comments
Open

Create test suite that works with userspace networking. #2267

alfreb opened this issue Aug 24, 2024 · 2 comments

Comments

@alfreb
Copy link
Contributor

alfreb commented Aug 24, 2024

Several tests will work with slirp, but not the UDP test as it stands, because it has an IPv6 part, and there doesn't seem to be a way to forward ports to IPv6 addresses with slirp. For example, hostfwd=udp::4242-:4242 forwards traffic to IPv4 addresses, has no effect on IPv6. See more details here: includeos/vmrunner#31

Ideally we'd find a way to run all the current networking tests with userspace networking, but if not, a subset would be a great start. The value of this would be that we would not require any sudo setup before running a reasonable test suite. If this would let us run tests in e.g. github actions, that's a great benefit. If we still have to maintain our own CI servers, maybe less important, but still nice to not require sudo.

A third alternative is to use the IncludeOS userspace mode to run tests. This will be a great way to test the IP stack against itself, but it won't stress tests the x86 hardware platform, which is hard to get right. So I don't see userspace tests ever displacing tests running in an actual VM (emulated or not).

Acceptance criteria:

  • At least TCP, UDP is tested over IPv4
  • Some aspects of IPv6 is tested
  • No sudo is required either for setup or running of the tests.
  • QUICK_SMOKE=1 ./test.sh will run only network tests that pass in usermode.
@MagnusS
Copy link
Member

MagnusS commented Aug 28, 2024

Perhaps some of the tests could be updated to run with -netdev socket and python scapy: https://john-millikin.com/improved-unix-socket-networking-in-qemu-7.2

@fwsGonzo
Copy link
Member

This is my userspace networking implementation that I used to, among other things, fuzz the network stack with:

https://github.com/fwsGonzo/userspace

It should have a TAP driver for IncludeOS. I don't remember the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants