| 1 |
|
| 2 | |
| 3 | * Declarations for hook implementations.
|
| 4 | *
|
| 5 | * These will be set as the function pointers in struct kunit_hook_table,
|
| 6 | * found in include/kunit/test-bug.h.
|
| 7 | *
|
| 8 | * Copyright (C) 2023, Google LLC.
|
| 9 | * Author: David Gow <[email protected]>
|
| 10 |
|
| 11 |
|
| 12 | #ifndef _KUNIT_HOOKS_IMPL_H
|
| 13 | #define _KUNIT_HOOKS_IMPL_H
|
| 14 |
|
| 15 | #include <kunit/test-bug.h>
|
| 16 |
|
| 17 |
|
| 18 | void __printf(3, 4) __kunit_fail_current_test_impl(const char *file,
|
| 19 | int line,
|
| 20 | const char *fmt, ...);
|
| 21 | void *__kunit_get_static_stub_address_impl(struct kunit *test, void *real_fn_addr);
|
| 22 | bool __kunit_is_suppressed_warning_impl(bool count);
|
| 23 |
|
| 24 |
|
| 25 | static inline void kunit_install_hooks(void)
|
| 26 | {
|
| 27 |
|
| 28 | kunit_hooks.fail_current_test = __kunit_fail_current_test_impl;
|
| 29 | kunit_hooks.get_static_stub_address = __kunit_get_static_stub_address_impl;
|
| 30 | kunit_hooks.is_suppressed_warning = __kunit_is_suppressed_warning_impl;
|
| 31 | }
|
| 32 |
|
| 33 | #endif
|