From 90a9901764d71308192c96ecd7d735531fe9cc30 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 1 Nov 2020 14:15:35 -0700 Subject: test: Add some tests for setexpr This command currently has no tests. Add some for basic assignment and the integer operations. Note that the default size for setexpr is ulong, which varies depending on the build machine. So for sandbox on a 64-bit host, this means that the default size is 64 bits. Signed-off-by: Simon Glass --- include/test/suites.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/test') diff --git a/include/test/suites.h b/include/test/suites.h index ab7b3bd9cad..5c97846e7f5 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -38,6 +38,8 @@ int do_ut_mem(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ut_setexpr(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]); int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_time(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc, -- cgit v1.2.3 From f158ba15ee0f9f756193b60420adfdc0a9c1eb96 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Nov 2020 10:33:38 -0700 Subject: bootm: Add tests for fixup_silent_linux() This function currently has no tests. Export it so that we can implement a simple test on sandbox. Use IS_ENABLED() to remove the unused code, instead #ifdef. Signed-off-by: Simon Glass --- include/test/suites.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/test') diff --git a/include/test/suites.h b/include/test/suites.h index 5c97846e7f5..52e8fc8155a 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -26,6 +26,7 @@ int cmd_ut_category(const char *name, const char *prefix, struct unit_test *tests, int n_ents, int argc, char *const argv[]); +int do_ut_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc, -- cgit v1.2.3 From 079ac59586fa1e0c69020e74e4f16cbfdf82232d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 23 Dec 2020 08:11:18 -0700 Subject: test: Move some test drivers into their own file At present several test drivers are part of the test file itself. Some of these are useful for of-platdata tests. Separate them out so we can use them for other things also. A few adjustments are needed so this driver can build for sandbox_spl as well. Signed-off-by: Simon Glass --- include/test/test.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/test') diff --git a/include/test/test.h b/include/test/test.h index 03e29290bf4..3fdaa2b5e51 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -94,6 +94,15 @@ enum { TEST_DEVRES_SIZE3 = 37, }; +/** + * testbus_get_clear_removed() - Test function to obtain removed device + * + * This is used in testbus to find out which device was removed. Calling this + * function returns a pointer to the device and then clears it back to NULL, so + * that a future test can check it. + */ +struct udevice *testbus_get_clear_removed(void); + /** * dm_test_main() - Run driver model tests * -- cgit v1.2.3