[PATCH v2 19/20] test: Correct display of failing test

Simon Glass sjg at chromium.org
Sat Nov 2 20:37:04 CET 2024


This should show the test name, not the selected name, since the user
may be running all tests, in which case 'select_name' is NULL

Fix it.

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

(no changes since v1)

 test/test-main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test-main.c b/test/test-main.c
index da5b07ce00b..e4f42689da4 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -622,7 +622,7 @@ static int ut_run_tests(struct unit_test_state *uts, const char *prefix,
 		for (i = 0; i < uts->runs_per_test; i++)
 			ret = ut_run_test_live_flat(uts, test);
 		if (uts->fail_count != old_fail_count) {
-			printf("Test %s failed %d times\n", select_name,
+			printf("Test %s failed %d times\n", test_name,
 			       uts->fail_count - old_fail_count);
 		}
 		found++;
-- 
2.43.0



More information about the U-Boot mailing list