Open vadorovsky opened 2 years ago
Don't use veths, use dummy interfaces. ip link add dummy0 type dummy
Hi, I have gone through the previous PRs and it seems the pain point is that building up a network env is the most annoying part for this issue (although I am not pretty sure). If that's the case, do we consider building up an integration environment using docker compose? By doing so, we can leverage the network settings to handle this issue.
Currently, integration tests are attaching XDP programs to
lo
inteface:https://github.com/aya-rs/aya/blob/f3262e87bd6ff895537df47fcf5d17c598e564cc/test/integration-test/src/tests/load.rs#L24
That's not a good approach, it's too intrusive, especially if the test fails or if for some reason the XDP program doesn't get unloaded.
lo
, as well as any already existing NICs, shouldn't be touched.To test XDP, we should rather create some new, fake veth interfaces, which then we remove after running a test. Such interfaces should be also safe to remove manually if anything goes wrong with cleaning up after the test.