summaryrefslogtreecommitdiffstats
path: root/tests/data_plane/vpp_lite_topo/test_driver
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-05-25 12:37:32 +0200
committerFilip Tehlar <ftehlar@cisco.com>2017-05-26 08:58:02 +0200
commitf20e6999369a2cd951247d4ef1b7a417b6a35566 (patch)
tree59a06ba1360d2b6e9471d2feb4202ad554955df6 /tests/data_plane/vpp_lite_topo/test_driver
parent0b237f3cd02f6c59252e8270c97c015c7a148cd2 (diff)
Add L2 ARP test
Change-Id: Ib8cc113a5de812697ea4d927bce5c9ac77fffac1 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/test_driver')
-rw-r--r--tests/data_plane/vpp_lite_topo/test_driver/arp.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/data_plane/vpp_lite_topo/test_driver/arp.sh b/tests/data_plane/vpp_lite_topo/test_driver/arp.sh
new file mode 100644
index 0000000..dd6d41f
--- /dev/null
+++ b/tests/data_plane/vpp_lite_topo/test_driver/arp.sh
@@ -0,0 +1,32 @@
+source config.sh
+source odl_utils.sh
+source topologies/3_node_star.sh
+
+if [ "$1" == "clean" ] ; then
+ 3_node_star_topo_clean no_odl
+ exit 0
+fi
+
+if [[ $(id -u) != 0 ]]; then
+ echo "Error: run this as root."
+ exit 1
+fi
+
+function send_icmp_from_namespace
+{
+ ip netns exec "$1" "$2" -w 15 -c 1 "$3"
+}
+
+function test_arp_resolution
+{
+ 3_node_star_topo_setup no_odl no_arp
+
+ maybe_pause
+ send_icmp_from_namespace vpp-ns5 "$1" "$2"
+ rc=$?
+
+ maybe_pause
+ 3_node_star_topo_clean no_odl
+ print_status $rc "No ICMP response!"
+ exit $test_result
+}