summaryrefslogtreecommitdiff
path: root/test/py/tests/test_mdio.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-07 16:40:02 -0600
committerTom Rini <trini@konsulko.com>2025-04-08 11:43:23 -0600
commitff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch)
treedcfe4bc52848a5637c975a3352b57885e5b8a06d /test/py/tests/test_mdio.py
parent34820924edbc4ec7803eb89d9852f4b870fa760a (diff)
parentf892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff)
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
Diffstat (limited to 'test/py/tests/test_mdio.py')
-rw-r--r--test/py/tests/test_mdio.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/py/tests/test_mdio.py b/test/py/tests/test_mdio.py
index 89711e70b55..5345f1f4c40 100644
--- a/test/py/tests/test_mdio.py
+++ b/test/py/tests/test_mdio.py
@@ -22,8 +22,8 @@ env__mdio_util_test = {
}
"""
-def get_mdio_test_env(u_boot_console):
- f = u_boot_console.config.env.get("env__mdio_util_test", None)
+def get_mdio_test_env(ubman):
+ f = ubman.config.env.get("env__mdio_util_test", None)
if not f or len(f) == 0:
pytest.skip("No PHY device to test!")
else:
@@ -31,9 +31,9 @@ def get_mdio_test_env(u_boot_console):
@pytest.mark.buildconfigspec("cmd_mii")
@pytest.mark.buildconfigspec("phylib")
-def test_mdio_list(u_boot_console):
- f = get_mdio_test_env(u_boot_console)
- output = u_boot_console.run_command("mdio list")
+def test_mdio_list(ubman):
+ f = get_mdio_test_env(ubman)
+ output = ubman.run_command("mdio list")
for dev, val in f.items():
phy_addr = val.get("phy_addr")
dev_name = val.get("device_name")
@@ -43,24 +43,24 @@ def test_mdio_list(u_boot_console):
@pytest.mark.buildconfigspec("cmd_mii")
@pytest.mark.buildconfigspec("phylib")
-def test_mdio_read(u_boot_console):
- f = get_mdio_test_env(u_boot_console)
- output = u_boot_console.run_command("mdio list")
+def test_mdio_read(ubman):
+ f = get_mdio_test_env(ubman)
+ output = ubman.run_command("mdio list")
for dev, val in f.items():
phy_addr = hex(val.get("phy_addr"))
dev_name = val.get("device_name")
reg = hex(val.get("reg"))
reg_val = hex(val.get("reg_val"))
- output = u_boot_console.run_command(f"mdio read {phy_addr} {reg}")
+ output = ubman.run_command(f"mdio read {phy_addr} {reg}")
assert f"PHY at address {int(phy_addr, 16):x}:" in output
assert f"{int(reg, 16):x} - {reg_val}" in output
@pytest.mark.buildconfigspec("cmd_mii")
@pytest.mark.buildconfigspec("phylib")
-def test_mdio_write(u_boot_console):
- f = get_mdio_test_env(u_boot_console)
- output = u_boot_console.run_command("mdio list")
+def test_mdio_write(ubman):
+ f = get_mdio_test_env(ubman)
+ output = ubman.run_command("mdio list")
for dev, val in f.items():
phy_addr = hex(val.get("phy_addr"))
dev_name = val.get("device_name")
@@ -68,12 +68,12 @@ def test_mdio_write(u_boot_console):
reg_val = hex(val.get("reg_val"))
wr_val = hex(val.get("write_val"))
- u_boot_console.run_command(f"mdio write {phy_addr} {reg} {wr_val}")
- output = u_boot_console.run_command(f"mdio read {phy_addr} {reg}")
+ ubman.run_command(f"mdio write {phy_addr} {reg} {wr_val}")
+ output = ubman.run_command(f"mdio read {phy_addr} {reg}")
assert f"PHY at address {int(phy_addr, 16):x}:" in output
assert f"{int(reg, 16):x} - {wr_val}" in output
- u_boot_console.run_command(f"mdio write {phy_addr} {reg} {reg_val}")
- output = u_boot_console.run_command(f"mdio read {phy_addr} {reg}")
+ ubman.run_command(f"mdio write {phy_addr} {reg} {reg_val}")
+ output = ubman.run_command(f"mdio read {phy_addr} {reg}")
assert f"PHY at address {int(phy_addr, 16):x}:" in output
assert f"{int(reg, 16):x} - {reg_val}" in output