Re: [PATCH v2 2/2] kunit: Add example of kunit_activate_static_stub() with pointer-to-function

From: David Gow
Date: Fri Dec 22 2023 - 03:39:30 EST


On Thu, 21 Dec 2023 at 18:39, Richard Fitzgerald
<rf@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Adds a variant of example_static_stub_test() that shows use of a
> pointer-to-function with kunit_activate_static_stub().
>
> A const pointer to the add_one() function is declared. This
> pointer-to-function is passed to kunit_activate_static_stub() and
> kunit_deactivate_static_stub() instead of passing add_one directly.
>
> Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: David Gow <davidgow@xxxxxxxxxx>

Thanks,
-- David

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature