Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jesper Dangaard Brouer and committed by
David S. Miller
13978d1e d35661fc

+5 -5
+5 -5
tools/testing/selftests/bpf/test_xdp_vlan.sh
··· 188 188 # At this point, the hosts cannot reach each-other, 189 189 # because ns2 are using VLAN tags on the packets. 190 190 191 - ip netns exec ns2 sh -c 'ping -W 1 -c 1 100.64.41.1 || echo "Okay ping fails"' 191 + ip netns exec ns2 sh -c 'ping -W 1 -c 1 100.64.41.1 || echo "Success: First ping must fail"' 192 192 193 193 194 194 # Now we can use the test_xdp_vlan.c program to pop/push these VLAN tags ··· 210 210 prio 1 handle 1 bpf da obj $FILE sec tc_vlan_push 211 211 212 212 # Now the namespaces can reach each-other, test with ping: 213 - ip netns exec ns2 ping -W 2 -c 3 $IPADDR1 214 - ip netns exec ns1 ping -W 2 -c 3 $IPADDR2 213 + ip netns exec ns2 ping -i 0.2 -W 2 -c 2 $IPADDR1 214 + ip netns exec ns1 ping -i 0.2 -W 2 -c 2 $IPADDR2 215 215 216 216 # Second test: Replace xdp prog, that fully remove vlan header 217 217 # ··· 224 224 ip netns exec ns1 ip link set $DEVNS1 $XDP_MODE object $FILE section $XDP_PROG 225 225 226 226 # Now the namespaces should still be able reach each-other, test with ping: 227 - ip netns exec ns2 ping -W 2 -c 3 $IPADDR1 228 - ip netns exec ns1 ping -W 2 -c 3 $IPADDR2 227 + ip netns exec ns2 ping -i 0.2 -W 2 -c 2 $IPADDR1 228 + ip netns exec ns1 ping -i 0.2 -W 2 -c 2 $IPADDR2