On Wed, Oct 08, 2025 at 06:02:56AM -0700, Breno Leitao wrote: > > Note that with the create_netdevsim() helper from > > tools/testing/selftests/net/lib.sh you could create the netdevsim device > > directly in the target namespace and avoid some duplicate code. > > Awesome. I am more than happy to create_netdevsim() in this selftest, > and move the others to use it as well. > > > It would be probably safer to create both rx and tx devices in child > > namespaces. > > Sure, that is doable, but, I need to change a few common helpers, to > start netconsole from inside the "tx namespace" instead of the default > namespace. > > Given all the other netconsole selftest uses TX from the default net > namespace, I would like to move them at all the same time. > > Do you think it is Ok to have this test using TX interfaces from the > main net namespace (as is now), and then I submit a follow patch to > migrate all the netcons tests (including this one) to use a TX > namespace? Then I can change the helpers at the same time, simplifying > the code review.
In fact, I was able to isolate the functions for the isolation in the self test, and now I have a test that relies on create_netdevsim() and have two namespaces, one for TX and one for RX. The problem is that it hits a bug on netdevsim that doesn't allow it to run properly. Basically create_netdevsim() put the interface up, and I need to get the interface down in order to enslaved it, losing the carrier. I've propsoed a fix in here: https://lore.kernel.org/all/[email protected]/ So, I will send a new version for this patchset soon, but, it will probably not pass the CI, given it will not have the fix aboveyet. But I will send it anyway, so, people can further review the patchset. Thanks --breno

