Skip to content

Add MessageInStream regression coverage and run unit tests in CI build#88

Merged
matt2005 merged 1 commit intodevelopfrom
test/pr86-regression-coverage
Mar 15, 2026
Merged

Add MessageInStream regression coverage and run unit tests in CI build#88
matt2005 merged 1 commit intodevelopfrom
test/pr86-regression-coverage

Conversation

@matt2005
Copy link

Summary

This PR adds regression tests around MessageInStream behavior from recent PR review/debugging work and updates CI Docker build wiring so unit tests run where expected.

Changes

  • Add/adjust MessageInStream unit tests in src/Messenger/MessageInStream.ut.cpp:
    • inactive cryptor + TLS control payload encapsulation path
    • inactive cryptor + non-TLS control payload passthrough path
    • inactive cryptor + TLS non-control payload behavior
    • stabilize intertwined-channel receive expectations to avoid overlapping mock expectation collisions
  • Update test build wiring in CMakeLists.txt for unit test includes/registration updates already on this branch.
  • CI/Docker test wiring:
    • pass RUN_TESTS build arg from workflow to Docker build
    • in Dockerfile, conditionally add test arg to build.sh when RUN_TESTS=true
    • set RUN_TESTS=true for pull_request events and pushes to main/develop

CI behavior after this PR

  • PRs: unit tests run during Docker build
  • main / develop pushes: unit tests run during Docker build
  • other direct branch pushes: tests remain disabled in Docker build by default

Validation

  • Targeted MessageInStreamUnitTest.* suite passes locally after expectation fix.
  • Branch pushed successfully and ready for review.

@matt2005 matt2005 merged commit 3fc5507 into develop Mar 15, 2026
4 checks passed
@matt2005 matt2005 deleted the test/pr86-regression-coverage branch March 15, 2026 08:55
matt2005 added a commit that referenced this pull request Mar 15, 2026
* fix: USB AOAP recovery, TLS bridge guard, SSL decrypt drain, diagnostics (#84)

* Fix SSL decrypt handling and migrate cert install to /etc/aasdk

- handle SSL WANT_READ/WANT_WRITE as partial frame in Cryptor decrypt\n- add richer SSL diagnostics in SSLWrapper/Cryptor\n- move cert/key install path from /etc/openauto to /etc/aasdk\n- add debian postinst migration and permission/ownership fixups

* fix: USB AOAP recovery, TLS bridge, SSL decrypt drain, diagnostics

- AOAPDevice: detect LIBUSB_ERROR_BUSY on claimInterface and attempt
  releaseInterface + retry before throwing to handle stale ownership
  after abrupt transport teardown

- MessageInStream: conditionally inject ENCAPSULATED_SSL prefix (MessageId 3)
  only when the incoming payload looks like a TLS record (content-type
  0x14-0x17, version byte 0x03); plain payloads such as version responses
  are no longer misclassified; promote frame/payload logs to info level

- Cryptor: simplify SSL decrypt drain loop to pure while(true) with
  fixed 2048-byte read chunks; remove overhead/expected-bytes heuristics
  that caused premature loop exit; demote WANT_READ/WANT_WRITE to debug

- ControlServiceChannel: add info-level logs for sendVersionRequest
  (logs major/minor) and sendHandshake (logs payload size); promote
  incoming MessageId log to info for runtime visibility

- USBTransport: add diagnostic logs for doSend submission, sendComplete,
  sendError, enqueueReceive, receiveComplete and receiveError including
  endpoint address, byte count and error code/native code

* Add runtime-toggleable cryptor/message tracing and docs (#85)

* Address Copilot PR review follow-ups (#87)

* Add MessageInStream regression tests and run CI unit tests on PR/main/develop (#88)
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.

1 participant