Skip to content

Commit 582eb3a

Browse files
Kemeng Shishuahkh
Kemeng Shi
authored andcommitted
kunit: replace KUNIT_TRIGGER_STATIC_STUB maro with KUNIT_STATIC_STUB_REDIRECT
We mix up KUNIT_TRIGGER_STATIC_STUB and KUNIT_STATIC_STUB_REDIRECT in static_stub header. Just correct KUNIT_TRIGGER_STATIC_STUB to KUNIT_STATIC_STUB_REDIRECT which is documented. Signed-off-by: Kemeng Shi <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent b67abaa commit 582eb3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/kunit/static_stub.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#if !IS_ENABLED(CONFIG_KUNIT)
1212

1313
/* If CONFIG_KUNIT is not enabled, these stubs quietly disappear. */
14-
#define KUNIT_TRIGGER_STATIC_STUB(real_fn_name, args...) do {} while (0)
14+
#define KUNIT_STATIC_STUB_REDIRECT(real_fn_name, args...) do {} while (0)
1515

1616
#else
1717

@@ -30,7 +30,7 @@
3030
* This is a function prologue which is used to allow calls to the current
3131
* function to be redirected by a KUnit test. KUnit tests can call
3232
* kunit_activate_static_stub() to pass a replacement function in. The
33-
* replacement function will be called by KUNIT_TRIGGER_STATIC_STUB(), which
33+
* replacement function will be called by KUNIT_STATIC_STUB_REDIRECT(), which
3434
* will then return from the function. If the caller is not in a KUnit context,
3535
* the function will continue execution as normal.
3636
*
@@ -87,7 +87,7 @@ void __kunit_activate_static_stub(struct kunit *test,
8787
* When activated, calls to real_fn_addr from within this test (even if called
8888
* indirectly) will instead call replacement_addr. The function pointed to by
8989
* real_fn_addr must begin with the static stub prologue in
90-
* KUNIT_TRIGGER_STATIC_STUB() for this to work. real_fn_addr and
90+
* KUNIT_STATIC_STUB_REDIRECT() for this to work. real_fn_addr and
9191
* replacement_addr must have the same type.
9292
*
9393
* The redirection can be disabled again with kunit_deactivate_static_stub().

0 commit comments

Comments
 (0)