[LTP] [PATCH 1/3] test_net.sh: fix netns when defined LHOST_IFACES or RHOST_IFACES

Alexey Kodanev alexey.kodanev@oracle.com
Thu Dec 22 18:55:50 CET 2016

On 12/22/2016 06:17 PM, Petr Vorel wrote:
> Hi Alexey,
>>>> Any good reason to do that?
>>> Yes. Currently if you define LHOST_IFACES and/or RHOST_IFACES netns is defined for
>>> ltp_ns_veth2 and ltp_ns_veth1, but then there are used new variables => it's not working.
>>> Or have I overlooked something?
>> I understand, but why do you need to re-define these interface names?
> I don't need that, but if anyone does, it will have to find what's broken. This can happen
> if you migrate from existing config (ssh/rsh) into netns.
> IMHO the logic should be clever enough not to break things just due bad config (or let the
> user to know about it).

Basically, if we set '*_IFACES' variables before the test, we have to 
make sure they contains the names of already existed interfaces. if 
someone moved from rsh config and left eth0 interface names... LTP must 
setup veth pair with this name? More likely the names will be the same 
and veth pair won't be created.

With current configuration, we could create ltp_ns namespace and setup 
our own interface(s) before the test (e.g. veth/br0 -> bond -> vxlan -> 
vlan ... etc), then run the tests with new names set (skipping default 


More information about the ltp mailing list