test: dm: eth: Skip timeouts on ping tests
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 21 Apr 2015 18:57:20 +0000 (13:57 -0500)
committerSimon Glass <sjg@chromium.org>
Wed, 6 May 2015 02:58:18 +0000 (20:58 -0600)
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>
test/dm/eth.c

index 4891f3ad34f7eb028fed60831c31e62a15520417..196eba85a2bbc860ce3ded5bf94ed1c7a7f4305b 100644 (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"));