Skip to content

Commit

Permalink
selftests: forwarding: mirror_gre_changes: Fix waiting for neighbor
Browse files Browse the repository at this point in the history
When running the test on soft devices, there's no mechanism to
gratuitously start resolving the neighbor for remote tunnel endpoint.
So instead of passively waiting, wait for the device to be up, and then
probe the neighbor with a ping.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Petr Machata authored and David S. Miller committed Jun 30, 2018
1 parent ec9fdc9 commit 4e74cc7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,8 @@ test_span_gre_egress_up()
# After setting the device up, wait for neighbor to get resolved so that
# we can expect mirroring to work.
ip link set dev $swp3 up
while true; do
ip neigh sh dev $swp3 $remote_ip nud reachable |
grep -q ^
if [[ $? -ne 0 ]]; then
sleep 1
else
break
fi
done
setup_wait_dev $swp3
ping -c 1 -I $swp3 $remote_ip &>/dev/null

quick_test_span_gre_dir $tundev ingress
mirror_uninstall $swp1 ingress
Expand Down

0 comments on commit 4e74cc7

Please sign in to comment.