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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user