From 4f570b36aa00fe094af9107b50fa60083cf765ab Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 2 Nov 2024 13:37:04 -0600 Subject: [PATCH] test: Correct display of failing test 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 Tested-by: Tom Rini # rpi_3, rpi_4, rpi_arm64, am64x_evm_a53, am64-sk --- 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 da5b07ce00..e4f42689da 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.39.5