Skip to content

Commit 05ae9ec

Browse files
committed
test(hw, adrv9371): poll for JESD relock after ensm_mode=radio_on
Empirical evidence from CI run 24722162544: ``echo radio_on`` successfully latches ``ensm_mode`` but bounces JESD204 RX (Mykonos re-runs part of ARM init on first radio_on, same symptom as ``profile_config`` write). A 1-second sleep catches the link mid-retrain, so the existing ``assert_jesd_links_data`` call fails. Poll for both RX + TX to return to DATA, up to 30 s, before re-verifying — same pattern the reverted commit 5222208 tried for ``profile_config``. For ENSM it may converge; the 30 s budget is the empirical test. If the link still doesn't come back the assertion will fail with the "(up to 30 s)" suffix, pointing at a genuinely different Mykonos behaviour rather than an undercooked timeout.
1 parent 459b47d commit 05ae9ec

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

test/hw/test_adrv9371_zc706_hw.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,24 @@ def test_adrv9371_zc706_xsa_hw(board, built_kernel_image_zynq, tmp_path):
185185
)
186186
print(f"post-write ensm_mode: {post_ensm}")
187187

188-
# ENSM transition should not disturb the link — the Mykonos ARM
189-
# just starts streaming. Re-verify JESD + dmesg stayed clean.
190-
assert_jesd_links_data(shell, context="after ensm_mode=radio_on")
188+
# Empirically the ENSM radio_on transition bounces the JESD204
189+
# RX link (Mykonos re-runs ARM init as part of entering radio_on
190+
# for the first time). Poll for both links to return to DATA,
191+
# up to 30 s, before re-verifying dmesg health.
192+
from test.hw.hw_helpers import read_jesd_status # noqa: PLC0415
193+
194+
deadline = time.time() + 30.0
195+
while True:
196+
time.sleep(2.0)
197+
rx_status, tx_status = read_jesd_status(shell)
198+
if (
199+
"Link status: DATA" in rx_status
200+
and "Link status: DATA" in tx_status
201+
):
202+
break
203+
if time.time() > deadline:
204+
break
205+
assert_jesd_links_data(shell, context="after ensm_mode=radio_on (up to 30 s)")
191206
post_ensm_dmesg = shell_out(shell, "dmesg")
192207
assert_no_kernel_faults(post_ensm_dmesg)
193208
assert_no_probe_errors(post_ensm_dmesg)

0 commit comments

Comments
 (0)