Skip to content

[cpp-LIN-08] Tests never exercise the committed RELAY vector fixtures and mask the ErrNoResponse gap #38

Description

@SoundMatt

Location: tests/test_relay_adapter.cpp (~lines 24-134); tests/test_lin.cpp (~lines 154-171, 269-271); unused directory testdata/relay-vectors/

Finding: Several test-coverage gaps compound each other: (a) No test loads any file under testdata/relay-vectors/ — every message/frame input used in tests is constructed inline in C++, so the committed golden vectors are never actually exercised, meaning the malformed checksum-type fixture (companion issue) would never be caught by CI even after being fixed on paper. (b) The adapter test that comments 'send_header should return ErrNoResponse' only asserts that some falsy error code is present — it will pass identically whether the code returns the generic timeout sentinel or a real distinct no-response value, so it mirrors rather than catches the ErrNoResponse dead-code issue (companion issue). (c) A separate test 'exercises' the ErrNoResponse type only by manually throwing it in the test itself, which gives the false impression the type has production coverage when no production code path ever produces it. (d) The checksum computation tests only assert relational self-consistency properties (two different inputs produce different checksums, complement sums to 0xFF) rather than checking a computed checksum byte against an independent, known-correct reference value from the LIN 2.2A specification.

Recommendation: Add a fixture-driven test that actually reads testdata/relay-vectors/ and round-trips frames through the serialize/deserialize functions. Once the ErrNoResponse type is properly wired up, assert for that specific error rather than any truthy error code. Add known-answer checksum test vectors sourced independently from the LIN specification.

Filed from the 2026-07-29 ecosystem audit register; independently re-verified against current HEAD before filing.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions