Skip to content

test: cover NotePing behavior#241

Merged
zfields merged 1 commit into
blues:ray/autobaudfrom
zakoverflow:fix/pr239-noteping-tests
May 15, 2026
Merged

test: cover NotePing behavior#241
zfields merged 1 commit into
blues:ray/autobaudfrom
zakoverflow:fix/pr239-noteping-tests

Conversation

@zakoverflow
Copy link
Copy Markdown
Contributor

Summary

This is a companion PR for #239.

It adds one commit on top of ray/autobaud that:

NotePing test coverage

NotePing_test covers:

  • successful echo nonce match
  • newline-terminated request and fixed 500 ms timeout
  • no CRC added to the ping request
  • false on nonce mismatch
  • false on response err
  • false on invalid JSON
  • false on transaction error
  • false on missing response
  • no retry on failure
  • no reset even when resetRequired is already set
  • transaction-start failure avoids lock/transaction/stop
  • serial input is drained before the ping transaction

Verification

docker run --rm -v "$PWD":/note-c -w /note-c ghcr.io/blues/note_c_ci:latest bash -lc \
  'cmake --build build --target NotePing_test NoteTransaction_test -j2 >/tmp/build.log && ./build/test/NotePing_test && ./build/test/NoteTransaction_test'

Result:

  • NotePing_test: 30 assertions passed
  • NoteTransaction_test: 124 assertions passed

I tried pushing this commit directly to blues:ray/autobaud, but GitHub rejected zakoverflow with a 403, so this branch is available to merge or cherry-pick into #239.

@zfields zfields merged commit fb82af2 into blues:ray/autobaud May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants