aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/phy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/dm/phy.c b/test/dm/phy.c
index 4da4841f40f..4f91abca3a0 100644
--- a/test/dm/phy.c
+++ b/test/dm/phy.c
@@ -255,6 +255,11 @@ static int dm_test_phy_setup(struct unit_test_state *uts)
ut_asserteq(-EIO, generic_setup_phy(parent, &phy, 2));
ut_assertok(generic_shutdown_phy(&phy));
+ /* generic_phy_get_by_index fail with -ENOENT */
+ ut_asserteq(-ENOENT, generic_phy_get_by_index(parent, 3, &phy));
+ ut_assertok(generic_setup_phy(parent, &phy, 3));
+ ut_assertok(generic_shutdown_phy(&phy));
+
return 0;
}
DM_TEST(dm_test_phy_setup, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);