]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Correct display of failing test
authorSimon Glass <sjg@chromium.org>
Sat, 2 Nov 2024 19:37:04 +0000 (13:37 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 13 Nov 2024 17:56:02 +0000 (11:56 -0600)
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@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com> # rpi_3, rpi_4, rpi_arm64, am64x_evm_a53, am64-sk
test/test-main.c

index da5b07ce00b63bbb5a1b3be3279d4198789a5969..e4f42689da467bc995d77f5084262fca96e2c8b2 100644 (file)
@@ -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++;