From 72da85f25cafb59ba220988ab198fc1b829f6090 Mon Sep 17 00:00:00 2001 From: Jiaxing Hu Date: Fri, 30 Oct 2026 19:55:17 +1300 Subject: [PATCH] Make the bad read-back test always differ The production line test changed the image's last byte to 0x01 to fake a bad read-back, but the image ends in random bytes: 1 time in 256 the byte already was 0x01, the read-back matched and the board passed. That failed the Ubuntu 22.04 run on #79. Flip the byte instead. --- tests/smoke.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/smoke.py b/tests/smoke.py index 0da38f4..b0d0397 100644 --- a/tests/smoke.py +++ b/tests/smoke.py @@ -1754,7 +1754,8 @@ def run(self): window.on_device_lost() ran.clear() answers["wl"] = (True, "") - answers["readback"] = data[:-1] + b"\x01" + # Flip the last byte: a fixed value matched the random image 1 time in 256. + answers["readback"] = data[:-1] + bytes([data[-1] ^ 0xFF]) plug() pump(lambda: line.state == production.UNPLUG) if ran != ["db", "rfi", "wl", "rl"] or line.failed != 2: