Even when a test times out, an "ERROR:" message should be printed so that the OE selftest parser knows the test has failed.
Signed-off-by: Joshua Watt <[email protected]> --- utils.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/utils.c b/utils.c index d0e6a99..aacf123 100644 --- a/utils.c +++ b/utils.c @@ -575,23 +575,20 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, entime = time(NULL); duration = entime - sttime; - int exit_code = 0; - - if (!_child_reader.timeouted) { - if (WIFEXITED(status)) { - exit_code = WEXITSTATUS(status); - if (exit_code) { - fprintf(fp, "\nERROR: Exit status is %d\n", exit_code); - rc += 1; - } - } else if (WIFSIGNALED(status)) { - int signal = WTERMSIG(status); - fprintf(fp, "\nERROR: Exited from signal %s (%d)\n", strsignal(signal), signal); - rc += 1; - } else { - fprintf(fp, "\nERROR: Exited for unknown reason (%d)\n", status); + int exit_code = -1; + if (WIFEXITED(status)) { + exit_code = WEXITSTATUS(status); + if (exit_code) { + fprintf(fp, "\nERROR: Exit status is %d\n", exit_code); rc += 1; } + } else if (WIFSIGNALED(status)) { + int signal = WTERMSIG(status); + fprintf(fp, "\nERROR: Exited from signal %s (%d)\n", strsignal(signal), signal); + rc += 1; + } else { + fprintf(fp, "\nERROR: Exited for unknown reason (%d)\n", status); + rc += 1; } fprintf(fp, "DURATION: %d\n", (int) duration); if (_child_reader.timeouted) { -- 2.33.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#60608): https://lists.yoctoproject.org/g/yocto/message/60608 Mute This Topic: https://lists.yoctoproject.org/mt/100220152/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
