dm: test: Add a new test case for dm_test_eth_rotate

Add one more ethernet device node in the sandbox test device tree,
with name 'sbe5'. This is to support a new test case for testing
network device rotation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Bin Meng
2015-08-27 22:25:53 -07:00
committed by Simon Glass
parent d8f79afa03
commit 71d7971fac
3 changed files with 14 additions and 1 deletions

View File

@@ -106,6 +106,11 @@ static int _dm_test_eth_rotate2(struct unit_test_state *uts)
ut_assertok(net_loop(PING));
ut_asserteq_str("eth@10004000", getenv("ethact"));
/* Make sure we can handle device name which is not eth# */
setenv("ethact", "sbe5");
ut_assertok(net_loop(PING));
ut_asserteq_str("sbe5", getenv("ethact"));
return 0;
}