Re: [PATCH net-next 2/2] selftest: net: add icmp reply address test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/1/19 5:34 PM, Francesco Ruggeri wrote:
> Verify that in this scenario
> 
>                    1.0.3.1/24
> ---- 1.0.1.3/24    1.0.1.1/24 ---- 1.0.2.1/24    1.0.2.4/24 ----
> |H1|--------------------------|R1|--------------------------|H2|
> ----            N1            ----            N2            ----
> 
> where 1.0.3.1/24 and 1.0.1.1/24 are respectively R1's primary and
> secondary address on N1, traceroute from H1 to H2 show 1.0.1.1
> 
> Signed-off-by: Francesco Ruggeri <fruggeri@xxxxxxxxxx>
> ---
>  tools/testing/selftests/net/Makefile          |   2 +-
>  .../testing/selftests/net/icmp_reply_addr.sh  | 106 ++++++++++++++++++
>  2 files changed, 107 insertions(+), 1 deletion(-)
>  create mode 100755 tools/testing/selftests/net/icmp_reply_addr.sh
> 

Hi:

It would be better to combine both of these into a single test script;
the topology and setup are very similar and the scripts share a lot of
common code.

The script can be a generic traceroute.sh and then contain 2 tests:
1. IPv4 - verify reply address test,
2. IPv6 - verify reply address test.

Making 1 script with multiple tests allows other tests to be added in
the future with less overhead. This is how other tests under net are done.

Also, you still have these using macvlan devices. The intent is to use
network namespaces to mimic nodes in a network. As such veth pairs are a
better option for this intent.

There are 2 scripts under net (l2tp.sh and fcnal-test.sh) that contain
functions -- create_ns and connect_ns  -- that really reduce the
overhead of creating tests like this. Actually you could copy l2tp.sh to
traceroute.sh and quickly update it for these tests.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux