Properly handle out of order read fragments

This commit is contained in:
Lucian Petrut
2026-09-07 12:10:03 +00:00
parent 1e9c2816ef
commit c590089866
3 changed files with 33 additions and 18 deletions
+2 -1
View File
@@ -227,7 +227,8 @@ What that comparison showed:
VDDK repeats the byte length there.
- Zeros on the wire are real transferred zeros, not a sparse skip.
Replay: `NfcDisk.read` loops on fragments until `length` bytes arrive.
Replay: `NfcDisk.read` places fragments at the byte offset in the
reply (they may arrive out of order) until `length` bytes are filled.
Proof: `tests/integration/test_nfc_read_write.py` writes a known pattern
(including a 129-sector read that must assemble two fragments) and
checks the bytes that came back.