Repository navigation
Shared HDLC and OverAscii test vectors made from the firmware's framing code - #54
Merged
Merged
Conversation
scripts/tests/hdlc_vectors.json and overascii_vectors.json give CRCs, encoded frames, decoded byte streams (shared flags, junk, bad CRC, a stray escape before a flag, the frame length limit) and serial console streams (text and protocol bytes interleaved), all made from MiniHDLC and ProtocolOverAscii. Client libraries (raftjs, raftpy) test their framing against them. test_comms_framing_vectors makes them again in "make check" and fails if they differ, and checks the RICRESTProtocol wiki examples; --write updates them after an intended change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shared HDLC and OverAscii test vectors, made from the firmware's own framing code (MiniHDLC and ProtocolOverAscii), so the client libraries can check their framing against them.
scripts/tests/hdlc_vectors.jsonandoverascii_vectors.json: CRCs, encoded frames, decoded byte streams (shared flags, junk, bad CRC, a stray escape before a flag, the frame length limit) and serial console streams (text and protocol bytes interleaved)linux_unit_tests/test_comms_framing_vectors.cpp: makes the vectors again inmake checkand fails if they differ; also checks the RICRESTProtocol wiki examples.--writeupdates the files after an intended change.raftjs's
feature/comms-framing-vectorsbranch tests against these vectors, and raftpy'ssync_vectorspicks them up.🤖 Generated with Claude Code