test_CMsgRecorderReadsLiveMessage
Regression tests for issues #338 and #1433.
A recorder attached to a C module’s C output message must read the module’s
live message data, not a stale snapshot. The C-message read path reaches the
payload by pointer arithmetic from the start of the {type}_C struct, so this
test verifies end-to-end that the recorded payload tracks the values the module
actually writes over time (and is not constant, which would indicate the
recorder is bound to the wrong / a copied address).
The recorder also stores raw pointers into its Msg_C source. It must retain
the object that owns that storage until the recorder is collected, including
when config-owned storage transfers into a C-module wrapper.
- test_CMsgRecorderReadsLiveMessage.test_cMsgRecorderReadsLiveMessage()[source]
The C-message recorder must capture the module’s live, time-varying output.
- test_CMsgRecorderReadsLiveMessage.test_configCMsgRecorderLeaseTransfersToWrapper()[source]
A recorder lease follows config-owned storage into its C-module wrapper.
- test_CMsgRecorderReadsLiveMessage.test_copiedCMsgRecorderKeepsSourceAlive()[source]
A copied recorder inherits the original recorder’s source retention.
- test_CMsgRecorderReadsLiveMessage.test_directCMsgRecorderConstructorKeepsSourceAlive()[source]
The public recorder constructor retains a direct
Msg_Cargument.
- test_CMsgRecorderReadsLiveMessage.test_directCppMsgRecorderConstructorKeepsSourceAlive()[source]
The public recorder constructor retains a direct C++ message argument.