summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_xdp_vlan.sh
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2019-08-01 20:00:26 +0200
committerDavid S. Miller <davem@davemloft.net>2019-08-05 11:17:40 -0700
commit13978d1e73d2fcfb6addcf3392707ad68fa88ccb (patch)
tree9bd930eacd4e96755e7667ff5d590d2369365c93 /tools/testing/selftests/bpf/test_xdp_vlan.sh
parentd35661fcf95d8818c1f9acc818a1bad23dda4e1c (diff)
downloadlinux-13978d1e73d2fcfb6addcf3392707ad68fa88ccb.tar.gz
linux-13978d1e73d2fcfb6addcf3392707ad68fa88ccb.tar.bz2
linux-13978d1e73d2fcfb6addcf3392707ad68fa88ccb.zip
selftests/bpf: reduce time to execute test_xdp_vlan.sh
Given the increasing number of BPF selftests, it makes sense to reduce the time to execute these tests. The ping parameters are adjusted to reduce the time from measures 9 sec to approx 2.8 sec. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_xdp_vlan.sh')
-rwxr-xr-xtools/testing/selftests/bpf/test_xdp_vlan.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/testing/selftests/bpf/test_xdp_vlan.sh b/tools/testing/selftests/bpf/test_xdp_vlan.sh
index 7348661be815..bb8b0da91686 100755
--- a/tools/testing/selftests/bpf/test_xdp_vlan.sh
+++ b/tools/testing/selftests/bpf/test_xdp_vlan.sh
@@ -188,7 +188,7 @@ ip netns exec ns2 ip link set lo up
# At this point, the hosts cannot reach each-other,
# because ns2 are using VLAN tags on the packets.
-ip netns exec ns2 sh -c 'ping -W 1 -c 1 100.64.41.1 || echo "Okay ping fails"'
+ip netns exec ns2 sh -c 'ping -W 1 -c 1 100.64.41.1 || echo "Success: First ping must fail"'
# Now we can use the test_xdp_vlan.c program to pop/push these VLAN tags
@@ -210,8 +210,8 @@ ip netns exec ns1 tc filter add dev $DEVNS1 egress \
prio 1 handle 1 bpf da obj $FILE sec tc_vlan_push
# Now the namespaces can reach each-other, test with ping:
-ip netns exec ns2 ping -W 2 -c 3 $IPADDR1
-ip netns exec ns1 ping -W 2 -c 3 $IPADDR2
+ip netns exec ns2 ping -i 0.2 -W 2 -c 2 $IPADDR1
+ip netns exec ns1 ping -i 0.2 -W 2 -c 2 $IPADDR2
# Second test: Replace xdp prog, that fully remove vlan header
#
@@ -224,5 +224,5 @@ ip netns exec ns1 ip link set $DEVNS1 $XDP_MODE off
ip netns exec ns1 ip link set $DEVNS1 $XDP_MODE object $FILE section $XDP_PROG
# Now the namespaces should still be able reach each-other, test with ping:
-ip netns exec ns2 ping -W 2 -c 3 $IPADDR1
-ip netns exec ns1 ping -W 2 -c 3 $IPADDR2
+ip netns exec ns2 ping -i 0.2 -W 2 -c 2 $IPADDR1
+ip netns exec ns1 ping -i 0.2 -W 2 -c 2 $IPADDR2