test: Fix the return value when a test fails

When a unit test fails, it returns the error code, which results in a
warning:

   exit not allowed from main input shell.

Fix it by returning a failure code instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-05 09:37:21 -06:00
parent 5814f040a7
commit c1949994d3

View File

@@ -314,7 +314,7 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
show_stats(&uts);
if (ret)
return ret;
return CMD_RET_FAILURE;
ut_uninit_state(&uts);
return 0;