netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Some suggestions for tc-tests
@ 2018-10-11 21:53 Cong Wang
  2018-10-22 21:54 ` Lucas Bates
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2018-10-11 21:53 UTC (permalink / raw)
  To: Roman Mashak; +Cc: Jamal Hadi Salim, Linux Kernel Network Developers

Hi,

I tried to run tc-tests with some old iproute2 package, it is painful.
I'd suggest the following improvements:

1. Create veth pair devices by its own. The most important thing for
tc-tests is to automate everything, it is not friendly for users to
create their own veth pair named v0p0 to just run the tests. tc-tests
should be able to create a veth pair with random names and clean up
them once it is finished.

2. Test iproute2 version or capability. Apparently my iproute2 doesn't
support tc filter chain yet, this makes many tests failed. Ideally,
each test should be able to check if the iproute2 supports the thing
it wants to test, if not just skip it, at least by default.

3. Is there anything in the tests that can be done only with Python3?
If we could lower the requirement to Python2, then it would be easier
to setup and run these tests.

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Some suggestions for tc-tests
  2018-10-11 21:53 Some suggestions for tc-tests Cong Wang
@ 2018-10-22 21:54 ` Lucas Bates
  0 siblings, 0 replies; 2+ messages in thread
From: Lucas Bates @ 2018-10-22 21:54 UTC (permalink / raw)
  To: Cong Wang; +Cc: Roman Mashak, Jamal Hadi Salim, Linux Kernel Network Developers

Hi Cong,

>
> 1. Create veth pair devices by its own. The most important thing for
> tc-tests is to automate everything, it is not friendly for users to
> create their own veth pair named v0p0 to just run the tests. tc-tests
> should be able to create a veth pair with random names and clean up
> them once it is finished.
You can actually do this automatically in two steps: first, create a
symlink to plugin-lib/nsPlugin.py in the plugins/ directory. Then,
when running tdc, always invoke the '-n' option.  This will execute
all the commands inside a namespace *and* automatically create the
veth pair that get used in the testing.

It's referenced in the readme, but if you think it's useful to make it
a default setup I could add an installation/setup script to tdc to
create the symlink.

> 2. Test iproute2 version or capability. Apparently my iproute2 doesn't
> support tc filter chain yet, this makes many tests failed. Ideally,
> each test should be able to check if the iproute2 supports the thing
> it wants to test, if not just skip it, at least by default.

So is this a version you compile yourself, or is it just the default
/sbin/tc?  Because you can specify the tc executable you want to use
in tdc_config.py...  But yes, we're looking at ways to make sure the
support is there before running tests.  We're hoping to send some patches soon.

> 3. Is there anything in the tests that can be done only with Python3?
> If we could lower the requirement to Python2, then it would be easier
> to setup and run these tests.

I'd have to go back and re-check to see what python 3-specific
features I'm using, but there *are* some.

Do you maybe have the ability to run a VM or Docker container on your
system to run python 3?

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-23  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 21:53 Some suggestions for tc-tests Cong Wang
2018-10-22 21:54 ` Lucas Bates

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).