Replies: 1 comment 1 reply
-
Clean way is to have condition to while loop mockable, so that you can either inject custom fuction calls when false, and/or break the loop to test execution after the loop. The tools for async events usually need to be dynamic (runtime) but you have few static analysis like Polyspace Bugfinder or Synopsys Coverity, which check also locking of your shared variables and memory space (one bombards code with isr, other does statistical checkup- you locked once, but not other times). |
Beta Was this translation helpful? Give feedback.
-
I'd like to fake an ISR that my UART is transmit is complete. I have a interrupt driven UART that sets a tx_busy flag cleared in the ISR on complete. This all works fine, but I'm having trouble simulating this for testing and coverage.
What I think I want is a function I can call saying in n milliseconds, call this callback (my ISR). This wouldn't be in any way real, but would let me get into my blocking section and then in some time have the callback fire and release the blocking.
Is there a clean way to get this done without some large co-routine dependency?
Beta Was this translation helpful? Give feedback.
All reactions