test: point the Verifies trace at the symbol that exists - #253
Open
kutsibalci wants to merge 1 commit into
Open
Conversation
The RecordProperty("Verifies", ...) record for
GetOppositeLinearControlBlockShallReturnkBlockEvenAsDefaultValue names
score::mw::log::detail::wait_free_producer_queue::alternating_control_block_test::GetOppositeLinearControlBlock
Two components of that path are not namespaces. wait_free_producer_queue is
the directory, and alternating_control_block_test is this file's own name;
neither appears in a namespace declaration anywhere in the repository.
The function is declared in alternating_control_block.h inside
score -> mw -> log -> detail, so the trace is written to match the form the
other Verifies records in the repository use, with the leading :: and the
trailing ().
Signed-off-by: Huseyin Kutsi Balci <balcihkutsi@gmail.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.
The
RecordProperty("Verifies", ...)record inalternating_control_block_test.cpp:95names a symbol that does not exist:Two components of that path are not namespaces:
wait_free_producer_queueis the directory.grep -rn "namespace *wait_free_producer_queue"over the repository returns nothing.alternating_control_block_testis this test file's own basename. Same result — it is never declared as a namespace.GetOppositeLinearControlBlockis declared inalternating_control_block.h:75, insidescore→mw→log→detail(opened at lines 19–25, closed at 78–81). So the qualified name is:Why it matters here rather than being cosmetic
Verifiesis the trace from a test to the unit under test, and this test is markedASIL B. The record is traceability evidence: it builds, the test passes, and the link points at nothing. Nothing catches it either — clang-tidy sees a string literal, and the string is only ever read by whatever consumes the test report.Form
The other twenty
Verifiesrecords in the repository, all inscore/datarouter/test/ut/ut_logging/test_socketserver.cpp, are written with a leading::and a trailing():so this one is written the same way rather than only having the two bogus components removed.
How this was found, and what I did not touch
I extracted every
RecordProperty("Verifies", ...)value in the repository — 21 sites, which matchesgrep -cexactly, so the extraction is complete — and resolved each named symbol against the declarations in the tree. This is the only one that does not resolve.Something I noticed but deliberately left alone:
Verifiescoverage inscore/mw/log/detail/wait_free_producer_queue/is sparse — 1 record across 22 tests in 5 files, and this was that one record.alternating_control_block_test.cpplinear_control_block_test.cpplinear_reader_test.cppwait_free_alternating_writer_test.cppwait_free_linear_writer_test.cppAdding the missing ones would mean deciding what each test actually verifies, which is a call for whoever owns that component, so this PR only corrects the record that is wrong. Happy to follow up if that is wanted.
Checks
.h,.hppand.cppin the repository.namespaceblocks inalternating_control_block.h, not inferred from the directory layout.Signed-off-by.AI disclosure
AI-assisted (Claude Code). The extraction and this description were produced with the tool, and I checked the result before opening: I confirmed the extraction found every
RecordProperty("Verifies", ...)in the tree by comparing againstgrep -c, read the namespace nesting in the header rather than assuming it from the path, searched for both suspect components as namespace declarations and found neither, and compared against the twenty existing records to match their form.Worth stating, because it nearly cost me this finding: my first pass validated each claimed symbol against the set of identifiers appearing anywhere in the repository — which included the claim string itself, so
alternating_control_block_test"existed" and the record looked fine. A claim cannot be checked against a corpus that contains the claim. I have reviewed and understood the change and take responsibility for it.