test: dm: eth: Skip timeouts on ping tests

Indicate to the emulated sandbox Ethernet driver when we expect a
timeout and tell it to leap forward.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Joe Hershberger 2015-04-21 13:57:20 -05:00 committed by Simon Glass
parent 6f2707c6b1
commit 172a31bf87

View File

@ -135,6 +135,7 @@ static int dm_test_net_retry(struct dm_test_state *dms)
sandbox_eth_disable_response(1, true);
setenv("ethact", "eth@10004000");
setenv("netretry", "yes");
sandbox_eth_skip_timeout();
ut_assertok(net_loop(PING));
ut_asserteq_str("eth@10002000", getenv("ethact"));
@ -144,6 +145,7 @@ static int dm_test_net_retry(struct dm_test_state *dms)
*/
setenv("ethact", "eth@10004000");
setenv("netretry", "no");
sandbox_eth_skip_timeout();
ut_asserteq(-ETIMEDOUT, net_loop(PING));
ut_asserteq_str("eth@10004000", getenv("ethact"));