test(core): fix `test_autolock_cancels_ui` on T3W1
What changed, and why it matters
This is a test-only change that adds a device wake-up step for one specific Trezor model (T3W1) in an automated test. It does not modify the firmware or any production code, so it has no direct security impact on users.
No security action needed; this is a routine test fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies tests/device_tests/test_autolock.py to handle the T3W1 model’s suspend-on-autolock behavior during the test_autolock_cancels_ui test. It sends a DebugLink wake-up message before reading the expected Failure response. No firmware, runtime, or cryptographic code is changed.
Changed components
tests/device_tests/test_autolock.pyInspect captured patch +5 / −0
diff --git a/tests/device_tests/test_autolock.py b/tests/device_tests/test_autolock.py
index d62cbb018..d769a9482 100644
--- a/tests/device_tests/test_autolock.py
+++ b/tests/device_tests/test_autolock.py
@@ -130,6 +130,11 @@ def test_autolock_cancels_ui(session: Session):
session._write(messages.ButtonAck())
# sleep more than auto-lock delay
time.sleep(10.5)
+
+ if session.model is models.T3W1:
+ # T3W1 device will suspend - wake it up using a DebugLink message
+ session.debug_client.debug.state(messages.DebugWaitType.IMMEDIATE)
+
resp = session._read()
assert isinstance(resp, messages.Failure)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.