1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2013 Google, Inc.
12 * struct unit_test_state - Entire state of test system
14 * @fail_count: Number of tests that failed
15 * @start: Store the starting mallinfo when doing leak test
16 * @priv: A pointer to some other info some suites want to track
17 * @of_root: Record of the livetree root node (used for setting up tests)
19 struct unit_test_state {
21 struct mallinfo start;
23 struct device_node *of_root;
27 * struct unit_test - Information about a unit test
30 * @func: Function to call to perform test
31 * @flags: Flags indicated pre-conditions for test
36 int (*func)(struct unit_test_state *state);
40 /* Declare a new unit test */
41 #define UNIT_TEST(_name, _flags, _suite) \
42 ll_entry_declare(struct unit_test, _name, _suite) = { \
49 /* Sizes for devres tests */
51 TEST_DEVRES_SIZE = 100,
52 TEST_DEVRES_COUNT = 10,
53 TEST_DEVRES_TOTAL = TEST_DEVRES_SIZE * TEST_DEVRES_COUNT,
55 /* A few different sizes */
56 TEST_DEVRES_SIZE2 = 15,
57 TEST_DEVRES_SIZE3 = 37,
60 #endif /* __TEST_TEST_H */