from an interrupt context. Where required add flags to functions and check
the values in the case teardowns. This allows validation that the case
callback was invoked without the need for an ASSERT or printf directly in
the callback.
In cases where a printf is still required in a test case but it is unclear
whether the code may or may not get called from interrupt context, a new
printf alternative, utest_printf() should be used instead. This just
checks whether the code is executing in interrupt context and only passes
its arguments to printf if not.