1.2 KiB
1.2 KiB
C++ Protocol Core Fragmentation Equivalence Test
Date: 2026-05-16 Host: jp Python environment: rnsenv Repository: /usr/local/src/ble-reticulum
Command
cd /usr/local/src/ble-reticulum
python3 -m pytest migration/tests/test_fragmentation_cpp_equivalence.py -vv
Result
28 tests passed.
Coverage Summary
The C++ implementation was compared against the existing Python implementation for:
BLEFragmenter single-fragment packets
BLEFragmenter multi-fragment packets
MTU boundary sizes: 20, 23, 50, 185
Empty and non-bytes packet errors
BLEReassembler single-fragment reassembly
BLEReassembler multi-fragment reassembly
Out-of-order fragments with start first
Malformed fragments
Duplicate fragments with same data
Duplicate fragments with different data
Stale buffer cleanup
Statistics reset
Internal reassemble behavior
HDLC frame/deframe round trips
Full byte range HDLC round trip
Many HDLC round trips
Invalid HDLC escape sequences and frames
Non-bytes HDLC errors
Raw Result
28 passed, 2 warnings in 0.38s.
Interpretation
This establishes phase-1 behavioral equivalence for the protocol-core fragmentation/reassembly layer. The C++ code is not yet integrated into BLEInterface.py for live Reticulum/BLE traffic.