All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 08/40] test: Rename test-main.c to test-dm.c
Date: Sat, 30 Jan 2021 20:32:16 -0700	[thread overview]
Message-ID: <20210131033248.1502385-9-sjg@chromium.org> (raw)
In-Reply-To: <20210131033248.1502385-1-sjg@chromium.org>

This is the main test function for driver model but not for other tests.
Rename the file and the function so this is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/sandbox/cpu/spl.c             | 2 +-
 include/test/test.h                | 4 ++--
 test/dm/Makefile                   | 2 +-
 test/dm/{test-main.c => test-dm.c} | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
 rename test/dm/{test-main.c => test-dm.c} (98%)

diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 9a77da15619..fa5055bb9fc 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -60,7 +60,7 @@ void spl_board_init(void)
 	if (state->run_unittests) {
 		int ret;
 
-		ret = dm_test_main(state->select_unittests);
+		ret = dm_test_run(state->select_unittests);
 		/* continue execution into U-Boot */
 	}
 }
diff --git a/include/test/test.h b/include/test/test.h
index 27585507d8c..d282cb2362d 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -106,7 +106,7 @@ enum {
 struct udevice *testbus_get_clear_removed(void);
 
 /**
- * dm_test_main() - Run driver model tests
+ * dm_test_run() - Run driver model tests
  *
  * Run all the available driver model tests, or a selection
  *
@@ -114,6 +114,6 @@ struct udevice *testbus_get_clear_removed(void);
  *	"fdt_pre_reloc"), or NULL to run all
  * @return 0 if all tests passed, 1 if not
  */
-int dm_test_main(const char *test_name);
+int dm_test_run(const char *test_name);
 
 #endif /* __TEST_TEST_H */
diff --git a/test/dm/Makefile b/test/dm/Makefile
index e70e50f4024..3a85ed8996d 100644
--- a/test/dm/Makefile
+++ b/test/dm/Makefile
@@ -2,7 +2,7 @@
 #
 # Copyright (c) 2013 Google, Inc
 
-obj-$(CONFIG_UT_DM) += test-main.o
+obj-$(CONFIG_UT_DM) += test-dm.o
 
 # Tests for particular subsystems - when enabling driver model for a new
 # subsystem you must add sandbox tests here.
diff --git a/test/dm/test-main.c b/test/dm/test-dm.c
similarity index 98%
rename from test/dm/test-main.c
rename to test/dm/test-dm.c
index 69458d62c86..74e12bd8bcc 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-dm.c
@@ -145,7 +145,7 @@ static bool test_matches(const char *test_name, const char *find_name)
 	return false;
 }
 
-int dm_test_main(const char *test_name)
+int dm_test_run(const char *test_name)
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, dm_test);
 	const int n_ents = ll_entry_count(struct unit_test, dm_test);
@@ -225,5 +225,5 @@ int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	if (argc > 1)
 		test_name = argv[1];
 
-	return dm_test_main(test_name);
+	return dm_test_run(test_name);
 }
-- 
2.30.0.365.g02bc693789-goog

  parent reply	other threads:[~2021-01-31  3:32 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31  3:32 [PATCH v2 00/40] test: Refactor tests to have a single test runner Simon Glass
2021-01-31  3:32 ` [PATCH v2 01/40] doc: Tidy up testing section Simon Glass
2021-01-31  3:32 ` [PATCH v2 02/40] doc: Document make tcheck Simon Glass
2021-01-31  3:32 ` [PATCH v2 03/40] sandbox: Drop the 'starting...' message unless testing Simon Glass
2021-01-31  3:32 ` [PATCH v2 04/40] doc: Explain how to run tests without pytest Simon Glass
2021-01-31  3:32 ` [PATCH v2 05/40] doc: Document how sandbox_spl_tests are run Simon Glass
2021-02-01 15:06   ` Pratyush Yadav
2021-01-31  3:32 ` [PATCH v2 06/40] test: Correct setexpr test prefix Simon Glass
2021-01-31  3:32 ` [PATCH v2 07/40] test: Mark all driver model tests with a flag Simon Glass
2021-01-31  3:32 ` Simon Glass [this message]
2021-01-31  3:32 ` [PATCH v2 09/40] test: Add an overall test runner Simon Glass
2021-01-31  3:32 ` [PATCH v2 10/40] test: Create pre/post-run functions Simon Glass
2021-01-31  3:32 ` [PATCH v2 11/40] test: Call test_pre/post_run() from driver model tests Simon Glass
2021-01-31  3:32 ` [PATCH v2 12/40] test: Move dm_extended_scan() to test_pre_run() Simon Glass
2021-01-31  3:32 ` [PATCH v2 13/40] test: Move do_autoprobe() " Simon Glass
2021-01-31  3:32 ` [PATCH v2 14/40] test: Move dm_scan_plat() " Simon Glass
2021-01-31  3:32 ` [PATCH v2 15/40] test: Drop mallinfo() work-around Simon Glass
2021-01-31  3:32 ` [PATCH v2 16/40] test: Move console silencing to test_pre_run() Simon Glass
2021-01-31  3:32 ` [PATCH v2 17/40] test: Move delay skipping " Simon Glass
2021-01-31  3:32 ` [PATCH v2 18/40] test: Handle driver model reinit in test_pre_run() Simon Glass
2021-01-31  3:32 ` [PATCH v2 19/40] test: Drop struct dm_test_state Simon Glass
2021-01-31  3:32 ` [PATCH v2 20/40] test: Move dm_test_init() into test-main.c Simon Glass
2021-01-31  3:32 ` [PATCH v2 21/40] test: Move dm_test_destroy() " Simon Glass
2021-01-31  3:32 ` [PATCH v2 22/40] test: Move test running into a separate function Simon Glass
2021-01-31  3:32 ` [PATCH v2 23/40] test: Use ut_run_test() to run driver model tests Simon Glass
2021-01-31  3:32 ` [PATCH v2 24/40] test: Drop dm_do_test() Simon Glass
2021-01-31  3:32 ` [PATCH v2 25/40] test: Add ut_run_test_live_flat() to run tests twice Simon Glass
2021-01-31  3:32 ` [PATCH v2 26/40] test: Use a local variable for test state Simon Glass
2021-02-01 16:47   ` Alex G.
2021-01-31  3:32 ` [PATCH v2 27/40] test: Run driver-model tests using ut_run_list() Simon Glass
2021-01-31  3:32 ` [PATCH v2 28/40] test: Use return values in dm_test_run() Simon Glass
2021-01-31  3:32 ` [PATCH v2 29/40] test: Move the devicetree check into ut_run_list() Simon Glass
2021-01-31  3:32 ` [PATCH v2 30/40] test: Move restoring of driver model state to ut_run_list() Simon Glass
2021-01-31  3:32 ` [PATCH v2 31/40] test: log: Rename log main test file to log_ut.c Simon Glass
2021-01-31  3:32 ` [PATCH v2 32/40] test: Add a macros for finding tests in linker_lists Simon Glass
2021-01-31  3:32 ` [PATCH v2 33/40] test: Rename all linker lists to have a ut_ prefix Simon Glass
2021-01-31  3:32 ` [PATCH v2 34/40] test: Allow SPL to run any available test Simon Glass
2021-01-31  3:32 ` [PATCH v2 35/40] sandbox: Update os_find_u_boot() to find the .img file Simon Glass
2021-01-31  3:32 ` [PATCH v2 36/40] spl: Convert spl_fit to work with sandbox Simon Glass
2021-01-31  3:32 ` [PATCH v2 37/40] doc: Move coccinelle into its own section Simon Glass
2021-01-31  3:32 ` [PATCH v2 38/40] spl: test: Add a test for spl_load_simple_fit() Simon Glass
2021-01-31  3:32 ` [PATCH v2 39/40] test: sandbox: Move sandbox test docs into doc/develop Simon Glass
2021-01-31  3:32 ` [PATCH v2 40/40] doc: Explain briefly how to write new tests Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210131033248.1502385-9-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.