aboutsummaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorSimon Glass2021-03-07 17:34:57 -0700
committerTom Rini2021-03-12 09:57:30 -0500
commit4a467c6de6765a9685d1e3ced95ce141a14dfcf3 (patch)
tree9a6bc1cf452761b933013192ee8eb638cfe98ece /include/test
parent72b524cf426697e764c9c63611d0f6743f50f0f5 (diff)
test: Drop struct dm_test_state
Driver model is a core part of U-Boot. We don't really need to have a separate test structure for the driver model tests and it makes it harder to write a test if you have to think about which type of test it is. Subsume the fields from struct dm_test_state into struct unit_test_state and delete the former. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/test.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/test/test.h b/include/test/test.h
index 6997568cc07..5eeec35f525 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -14,18 +14,24 @@
*
* @fail_count: Number of tests that failed
* @start: Store the starting mallinfo when doing leak test
- * @priv: A pointer to some other info some suites want to track
* @of_live: true to use livetree if available, false to use flattree
* @of_root: Record of the livetree root node (used for setting up tests)
+ * @root: Root device
+ * @testdev: Test device
+ * @force_fail_alloc: Force all memory allocs to fail
+ * @skip_post_probe: Skip uclass post-probe processing
* @expect_str: Temporary string used to hold expected string value
* @actual_str: Temporary string used to hold actual string value
*/
struct unit_test_state {
int fail_count;
struct mallinfo start;
- void *priv;
struct device_node *of_root;
bool of_live;
+ struct udevice *root;
+ struct udevice *testdev;
+ int force_fail_alloc;
+ int skip_post_probe;
char expect_str[256];
char actual_str[256];
};