ANDROID: Add padding to kunit structures exposed on the KMI
This is ensure that these are picked up for the next Android release. Bug: 361584207 Change-Id: I4c7e3ed0a70e096c79d0dae8b660b6f5889e5343 Signed-off-by: Sid Nayyar <sidnayyar@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
2cdc3da728
commit
5677cab2b2
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
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,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
struct kunit_resource;
|
||||
|
||||
@@ -89,6 +90,8 @@ struct kunit_resource {
|
||||
struct kref refcount;
|
||||
struct list_head node;
|
||||
bool should_kfree;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <linux/jump_label.h> /* For static branch */
|
||||
#include <linux/sched.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
/* 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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
#include <asm/rwonce.h>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define _KUNIT_TRY_CATCH_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user