check_ethernet: add -W 1 to do_ping()

Adding "-W 1" since otherwise ping waits "2x the RTT" which in the
failure case (no RTT) appears to be ~3-4 seconds.
"ping -c9" to a non-responding IP takes ~12 seconds.

Higher levels try up to three different IPs resulting in up to
(3*12 = 36 seconds) to determine we don't have a link.
"ping -c 9 -W 1" takes 9 seconds (or 3*9 = 27 seconds total).

In the unlikely event a DUT has two live NICs (with link),
double the above numbers.

Since all three IPs are "local" (gateway, SSH client, or "neighbor"),
one second is > 100 times more than expected for ICMP RTT.

BUG=none
TEST=manually run ping command

Change-Id: I0b2b8a35b63108e94b4e12540ab58b81383e62e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crostestutils/+/2044952
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Queue: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
1 file changed