selftests: forwarding: vxlan_bridge_1d: Add ping test
authorPetr Machata <petrm@mellanox.com>
Mon, 19 Nov 2018 16:11:15 +0000 (16:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Nov 2018 01:59:44 +0000 (17:59 -0800)
Test end-to-end reachability between local and remote endpoints.

Note that because learning is disabled on the VXLAN device, the ICMP
requests will end up being flooded to all remotes.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh

index af88e1c146a714f0a33aad71b88d06091dcd925b..0e3d7abc70d3313f79809f1cfc8077492740310e 100755 (executable)
@@ -65,6 +65,7 @@
 export VXPORT
 
 : ${ALL_TESTS:="
+       ping_ipv4
     "}
 
 NUM_NETIFS=6
@@ -281,6 +282,13 @@ cleanup()
        vrf_cleanup
 }
 
+ping_ipv4()
+{
+       ping_test $h1 192.0.2.2 ": local->local"
+       ping_test $h1 192.0.2.3 ": local->remote 1"
+       ping_test $h1 192.0.2.4 ": local->remote 2"
+}
+
 test_all()
 {
        echo "Running tests with UDP port $VXPORT"