tests: re-enable large qr code tests for 1.1 devices
What changed, and why it matters
This commit only changes a test file. It removes a workaround that previously skipped large QR code tests on Jade v1.1 hardware because of serial timeouts. The commit message says a separate fix now allows the device to process valid data received after a timeout, so the test skip is no longer needed. There is no change to production firmware or wallet security logic in this commit.
No security action required for this commit. If reviewing the related timeout-handling change, verify that accepting data after a timeout cannot be abused to inject truncated or malicious QR payloads.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in test_jade.py removes the is_v1_1 flag and the conditional skip for QR image files larger than 45 KB. The commit message references an earlier behavioral change: ‘we allow processing of valid data received after a timeout.’ This suggests a firmware-level timeout-handling fix exists elsewhere, but it is not present in this diff. The change itself is purely test coverage re-enablement.
Changed components
test_jade.pyInspect captured patch +0 / −6
diff --git a/test_jade.py b/test_jade.py
index 02dc195..501c34d 100644
--- a/test_jade.py
+++ b/test_jade.py
@@ -2325,18 +2325,12 @@ def test_passphrase(jade):
# Test qr scanning - can be slow as image data large (slow to upload) and
# tests involve starting the camera (and associated tasks).
def test_scan_qr(jadeapi, board_type):
- is_v1_1 = board_type == 'JADE_V1.1'
for qr_data in _get_test_cases(QR_QVGA_SCAN_TESTS):
expected = qr_data['expected_output']
image_filename = qr_data['input']['image']
with open('./test_data/' + image_filename, 'rb') as f:
image_data = f.read()
- if is_v1_1 and len(image_data) > 45 * 1024:
- # Skip large QR tests for v1_1 devices, as they
- # tend to hit the serial timeout
- logger.debug(f'v1.1: skipping large image file ({len(image_data)} bytes)')
- continue
rslt = jadeapi.scan_qr(image_data)
assert rslt
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.