aboutsummaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-29 21:19:25 -0700
committerSimon Glass <sjg@chromium.org>2020-01-07 16:02:39 -0700
commitdc12ebbbdb765153805d2b17d18edf5fe0813d5a (patch)
tree8f0872ad4ec567e7b5cda4422762289ea904e5ba /include/test
parentcce61fc428700a782f2f76b0f32b6112eeb99dfb (diff)
downloadu-boot-dc12ebbbdb765153805d2b17d18edf5fe0813d5a.zip
u-boot-dc12ebbbdb765153805d2b17d18edf5fe0813d5a.tar.gz
u-boot-dc12ebbbdb765153805d2b17d18edf5fe0813d5a.tar.bz2
dm: test: Add a test driver for devres
Add a driver which does devres allocations so that we can write tests for devres. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/test.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h
index 98fbcd1..5977c59 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -46,5 +46,14 @@ struct unit_test {
.func = _name, \
}
+/* Sizes for devres tests */
+enum {
+ TEST_DEVRES_SIZE = 100,
+ TEST_DEVRES_COUNT = 10,
+ TEST_DEVRES_TOTAL = TEST_DEVRES_SIZE * TEST_DEVRES_COUNT,
+
+ /* A different size */
+ TEST_DEVRES_SIZE2 = 15,
+};
#endif /* __TEST_TEST_H */