summaryrefslogtreecommitdiff
path: root/test/smp/regression/threadx_queue_trace_test.c
AgeCommit message (Collapse)Author
2026-09-19Covered every queue trace insert with a new trace-enabled queue testFrédéric Desbiens
Each of the nine queue services carries one in-line trace insert, and the insert behaves differently according to the system state it runs in, whether its event class is filtered, whether it is the entry that wraps the trace buffer, and whether a buffer-full notification is registered. Exactly one test in the SMP suite enabled event tracing, so at seven of the nine sites the macro body never executed at all and the other two reached five of its twelve outcomes: 91 uncovered branch outcomes in the queue sources, with no test missing for anything else in the subsystem. The new test walks the nine services once per condition, in an order that leaves the system as it found it, so the passes compose and repeat. Two things are specific to SMP. The system state is per core and is normally reached through a function call, so the forced-state passes take the array itself and write the entry of the core they are running on, read rather than assumed. The wrap pass holds the SMP protection across both the positioning and the service call, which makes the boundary entry the service's own by construction: every trace insert in the kernel is written inside that same protection, so nothing else can take the slot in between. Create and delete are driven through their internal entry points in the forced-state passes only, because the error checking shell rejects both from any caller that is not a thread; the shell is covered by its own tests and what is under test here is the insert behind it. Nothing is interposed and no certified source is touched. The queue sources are now at 622 of 622 lines and 394 of 394 branches over the union of the eight build configurations, from 303 of 394. Twelve further branch outcomes and six lines outside the subsystem arrive with it, in the MISRA shim, the trace object registry and the thread suspend and sleep paths. All eight configurations build clean and pass 110 of 110, twice from clean with retries disabled, and the new test is green in 75 consecutive runs across three configurations. Assisted-by: Claude Code (Opus 5) <[email protected]>