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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user