diff --git a/include/kunit/assert.h b/include/kunit/assert.h index bb879389f11d..28cb4d019480 100644 --- a/include/kunit/assert.h +++ b/include/kunit/assert.h @@ -11,6 +11,7 @@ #include #include +#include struct kunit; struct string_stream; @@ -36,6 +37,8 @@ enum kunit_assert_type { struct kunit_loc { int line; const char *file; + + ANDROID_KABI_RESERVE(1); }; #define KUNIT_CURRENT_LOC { .file = __FILE__, .line = __LINE__ } @@ -46,7 +49,9 @@ struct kunit_loc { * Represents a failed expectation/assertion. Contains all the data necessary to * format a string to a user reporting the failure. */ -struct kunit_assert {}; +struct kunit_assert { + ANDROID_KABI_RESERVE(1); +}; typedef void (*assert_format_t)(const struct kunit_assert *assert, const struct va_format *message, diff --git a/include/kunit/resource.h b/include/kunit/resource.h index 4ad69a2642a5..eff916fc8068 100644 --- a/include/kunit/resource.h +++ b/include/kunit/resource.h @@ -15,6 +15,7 @@ #include #include #include +#include struct kunit_resource; @@ -89,6 +90,8 @@ struct kunit_resource { struct kref refcount; struct list_head node; bool should_kfree; + + ANDROID_KABI_RESERVE(1); }; /** diff --git a/include/kunit/test-bug.h b/include/kunit/test-bug.h index 47aa8f21ccce..c74f0bbe0276 100644 --- a/include/kunit/test-bug.h +++ b/include/kunit/test-bug.h @@ -15,6 +15,7 @@ #include /* For static branch */ #include +#include /* Static key if KUnit is running any tests. */ DECLARE_STATIC_KEY_FALSE(kunit_running); @@ -23,6 +24,8 @@ DECLARE_STATIC_KEY_FALSE(kunit_running); extern struct kunit_hooks_table { __printf(3, 4) void (*fail_current_test)(const char*, int, const char*, ...); void *(*get_static_stub_address)(struct kunit *test, void *real_fn_addr); + + ANDROID_KABI_RESERVE(1); } kunit_hooks; /** diff --git a/include/kunit/test.h b/include/kunit/test.h index e2a1f0928e8b..aca9b6cacaa4 100644 --- a/include/kunit/test.h +++ b/include/kunit/test.h @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -82,6 +83,8 @@ enum kunit_speed { /* Holds attributes for each test case and suite */ struct kunit_attributes { enum kunit_speed speed; + + ANDROID_KABI_RESERVE(1); }; /** @@ -132,6 +135,8 @@ struct kunit_case { enum kunit_status status; char *module_name; struct string_stream *log; + + ANDROID_KABI_RESERVE(1); }; static inline char *kunit_status_to_ok_not_ok(enum kunit_status status) @@ -254,6 +259,8 @@ struct kunit_suite { struct string_stream *log; int suite_init_err; bool is_init; + + ANDROID_KABI_RESERVE(1); }; /* Stores an array of suites, end points one past the end */ @@ -303,6 +310,8 @@ struct kunit { char status_comment[KUNIT_STATUS_COMMENT_SIZE]; /* Saves the last seen test. Useful to help with faults. */ struct kunit_loc last_seen; + + ANDROID_KABI_RESERVE(1); }; static inline void kunit_set_failure(struct kunit *test) diff --git a/include/kunit/try-catch.h b/include/kunit/try-catch.h index 7c966a1adbd3..b98cbc92c8e7 100644 --- a/include/kunit/try-catch.h +++ b/include/kunit/try-catch.h @@ -11,6 +11,7 @@ #define _KUNIT_TRY_CATCH_H #include +#include typedef void (*kunit_try_catch_func_t)(void *); @@ -48,6 +49,8 @@ struct kunit_try_catch { kunit_try_catch_func_t try; kunit_try_catch_func_t catch; void *context; + + ANDROID_KABI_RESERVE(1); }; void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context);