<feed xmlns='http://www.w3.org/2005/Atom'>
<title>threadx.git/test/tx/regression/threadx_misra_shim_test.c, branch v6.4.1_cert</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/threadx.git/atom/test/tx/regression/threadx_misra_shim_test.c?h=v6.4.1_cert</id>
<link rel='self' href='http://cgit.235523.xyz/threadx.git/atom/test/tx/regression/threadx_misra_shim_test.c?h=v6.4.1_cert'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/'/>
<updated>2026-09-16T02:43:06Z</updated>
<entry>
<title>Added the MISRA event trace configuration, completing the denominator</title>
<updated>2026-09-16T02:43:06Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-09-16T02:43:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=025ca0b827f7a42da059ad853889c1665ace5930'/>
<id>urn:sha1:025ca0b827f7a42da059ad853889c1665ace5930</id>
<content type='text'>
common/src/tx_misra.c holds a region behind TX_ENABLE_EVENT_TRACE with six
functions in it: the MISRA form of the in-line trace insert and five pointer
conversions the trace sources use. No build configuration compiled it. misra_build
defines TX_MISRA_ENABLE alone and trace_build defines TX_ENABLE_EVENT_TRACE alone,
so the region was absent from the coverage denominator rather than uncovered in
it - which is the reason misra_build was added in the first place.

misra_trace_build defines both. It needs TX_SOURCE_CODE as well, because
tx_misra.c is the only one of the 185 files in common/src that does not define it
for itself and the prototypes for those five conversions sit behind it in
tx_trace.h; without it the file defines five functions with no previous
declaration and the build fails. The define goes on the kernel target rather than
on every target, because TX_SOURCE_CODE also suppresses the public API mappings
that the tests and the sample need. Its empty value matches the plain define the
other 184 files carry, so no object code changes in any configuration. The defect
itself is in the header and is reported upstream as eclipse-threadx/threadx#745.

The existing trace tests drive the region as it stands: all twelve outcomes of the
insert and all but one line arrive covered without new work. The exception is
_tx_misra_entry_to_uchar_pointer_convert, whose macro no kernel source uses at
all, so the MISRA shim test asserts it alongside the conversions it already
covers.

common/src is at 4383/4383 lines and 3140/3168 branches unioned over the seven
configurations, up 44 lines and 12 outcomes on the denominator and covering all
of them. The 28 uncovered outcomes are the same 28 in the same 14 files as before.
111/111 tests pass in each of the seven.

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Covered the MISRA compliance shim's stack check and conversions</title>
<updated>2026-09-15T23:52:09Z</updated>
<author>
<name>Frédéric Desbiens</name>
<email>frederic.desbiens@eclipse-foundation.org</email>
</author>
<published>2026-09-15T23:52:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/threadx.git/commit/?id=b17aad1760dc2557f3f79545f07dfab346d63391'/>
<id>urn:sha1:b17aad1760dc2557f3f79545f07dfab346d63391</id>
<content type='text'>
A MISRA build routes the kernel's pointer conversions, its user timer derivation
and its thread stack check through functions in the compliance shim. Four of
them had no caller in any build configuration: the stack check and the user
timer derivation are only reached from code the shim's own configuration
compiles out, and two of the conversions are only used by the trace sources,
which a MISRA build does not compile either. The shim carried 24 uncovered lines
and 14 uncovered branch outcomes, all of it certified source.

A new regression test drives each of them through the macro the kernel itself
uses, so the shim and the in-line form the other five configurations compile are
asserted to agree. The stack check is the one with logic in it, and it is driven
the way the in-line form is: a scratch thread is created on a buffer of the
test's own with a fence on each side, given one fault at a time, and checked with
the fault in place. The faults reach the stack going deeper than recorded, each
of the two fences overwritten, the lowest recorded pointer dropped below the
stack, the word under that pointer used, a control block that is no longer a
thread, and no thread at all. Nothing is written outside the scratch thread's
control block and its own fenced stack, and the thread is never started, so no
faulted state is ever visible to the scheduler.

The compliance shim is now at 81/81 lines and 18/18 branches. Merged over the
six build configurations: 4338/4339 lines and 4560/4627 branches, up 24 lines
and 14 outcomes, with the gates raised to 99.90 and 98.40 to hold them. 108/108
tests pass in each of the six.

Assisted-by: Claude Code (Opus 5) &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
