]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kunit: Add test for static stub
authorTzung-Bi Shih <tzungbi@kernel.org>
Thu, 12 Jun 2025 08:48:34 +0000 (08:48 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 18 Jun 2025 18:56:18 +0000 (12:56 -0600)
commite42ad39318dffbe46b05337759654c6436f723e8
tree0267aa01cb2f744ccf0ce49fc7296ff01be76ab3
parent76ee96d3d7f1476e9a78a87b536b8c58a81c3552
kunit: Add test for static stub

__kunit_activate_static_stub() works effectively as
kunit_deactivate_static_stub() if `replacement_addr` is NULL.

Add a test case to catch the issue discovered in
commit 772e50a76ee6 ("kunit: Fix wrong parameter to kunit_deactivate_static_stub()").

For running the test:

$ ./tools/testing/kunit/kunit.py run \
        --arch=x86_64 \
        kunit_stub

Fixed change log:
Shuah Khan <skhan@linuxfoundation.org>

Link: https://lore.kernel.org/r/20250612084834.587576-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/kunit-test.c