On Thu, Mar 17, 2022 at 9:13 PM David Gow davidgow@google.com wrote:
+/** KUNIT_STUBBABLE - marks a function as stubbable when stubbing support is
- enabled.
- Stubbing uses ftrace internally, so we can only stub out functions when they
- are not inlined. This macro eavlautes to noinline when stubbing support is
Just noting a couple typos lest they be forgotten: *evaluates
- enabled to thus make it safe.
<snip>
void replacement_func(int n)
{
pr_info("replacement_func() called with %d", n);
return 42;
}
void example_test(struct kunit *test)
{
kunit_active_ftrace_stub(test, real_func, replacement_func);
*activate