From: Yang Xiwen <forbidden...@outlook.com>

add unittests for the newly introduced helper functions.

Signed-off-by: Yang Xiwen <forbidden...@outlook.com>
---
 test/dm/phy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/dm/phy.c b/test/dm/phy.c
index 0cf3689fde..cb16844a0a 100644
--- a/test/dm/phy.c
+++ b/test/dm/phy.c
@@ -159,6 +159,8 @@ static int dm_test_phy_bulk(struct unit_test_state *uts)
        ut_asserteq(0, generic_phy_power_on_bulk(&phys));
        ut_asserteq(0, generic_phy_power_off_bulk(&phys));
        ut_asserteq(0, generic_phy_exit_bulk(&phys));
+       ut_asserteq(0, generic_setup_phy_bulk(parent, &phys));
+       ut_asserteq(0, generic_shutdown_phy_bulk(&phys));
 
        /* has a known problem phy */
        ut_assertok(uclass_get_device_by_name(UCLASS_SIMPLE_BUS,
@@ -171,6 +173,8 @@ static int dm_test_phy_bulk(struct unit_test_state *uts)
        ut_asserteq(-EIO, generic_phy_power_on_bulk(&phys));
        ut_asserteq(-EIO, generic_phy_power_off_bulk(&phys));
        ut_asserteq(0, generic_phy_exit_bulk(&phys));
+       ut_asserteq(-EIO, generic_setup_phy_bulk(parent, &phys));
+       ut_asserteq(-EIO, generic_shutdown_phy_bulk(&phys));
 
        return 0;
 }

-- 
2.43.0

Reply via email to