summaryrefslogtreecommitdiffstats
path: root/include/dm/test.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm/test.h')
-rw-r--r--include/dm/test.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/dm/test.h b/include/dm/test.h
index 409f1a3667..235d728bfb 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -82,6 +82,17 @@ struct dm_test_uclass_priv {
int total_add;
};
+/**
+ * struct dm_test_parent_data - parent's information on each child
+ *
+ * @sum: Test value used to check parent data works correctly
+ * @flag: Used to track calling of parent operations
+ */
+struct dm_test_parent_data {
+ int sum;
+ int flag;
+};
+
/*
* Operation counts for the test driver, used to check that each method is
* called correctly
@@ -100,6 +111,7 @@ extern struct dm_test_state global_test_state;
* @fail_count: Number of tests that failed
* @force_fail_alloc: Force all memory allocs to fail
* @skip_post_probe: Skip uclass post-probe processing
+ * @removed: Used to keep track of a device that was removed
*/
struct dm_test_state {
struct udevice *root;
@@ -107,6 +119,7 @@ struct dm_test_state {
int fail_count;
int force_fail_alloc;
int skip_post_probe;
+ struct udevice *removed;
};
/* Test flags for each test */
@@ -156,6 +169,15 @@ int dm_check_operations(struct dm_test_state *dms, struct udevice *dev,
uint32_t base, struct dm_test_priv *priv);
/**
+ * dm_check_devices() - check the devices respond to operations correctly
+ *
+ * @dms: Overall test state
+ * @num_devices: Number of test devices to check
+ * @return 0 if OK, -ve on error
+ */
+int dm_check_devices(struct dm_test_state *dms, int num_devices);
+
+/**
* dm_test_main() - Run all the tests
*
* This runs all available driver model tests
OpenPOWER on IntegriCloud