X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=tests%2Fdata_plane%2Fvpp_lite_topo%2Ftest_driver%2Farp.sh;fp=tests%2Fdata_plane%2Fvpp_lite_topo%2Ftest_driver%2Farp.sh;h=dd6d41f5056f8b2294608a136d874c5586c88484;hb=f20e6999369a2cd951247d4ef1b7a417b6a35566;hp=0000000000000000000000000000000000000000;hpb=0b237f3cd02f6c59252e8270c97c015c7a148cd2;p=one.git 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 +}