Hi, Commit 56ed1082c4914c0ef3c72bfd609d68cc850557f1 moved the pipe-creation into the loop and resetted rc before each test, such that only the result code of the last test was taken into account for the final verdict.
Only set rc = -1 if pipe() fails to keep collected test-errors.
>From 1de2f110c94c27a903e3576ae5dc87992de92560 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt <christ...@hohnstaedt.de> Date: Tue, 21 Nov 2023 16:07:22 +0100 Subject: [PATCH] Do not reset error counter before each test Commit 56ed1082c4914c0ef3c72bfd609d68cc850557f1 moved the pipe-creation into the loop and resetted rc before each test, such that only the result code of the last test was taken into account for the final verdict. Only set rc = -1 if pipe() fails to keep collected test-errors. Signed-off-by: Christian Hohnstaedt <christ...@hohnstaedt.de> --- utils.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils.c b/utils.c index 59b8b77..616e9db 100644 --- a/utils.c +++ b/utils.c @@ -415,12 +415,14 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, int pipefd_stderr[2] = {-1, -1}; int pgid = -1; - if ((rc = pipe2(pipefd_stdout, 0)) == -1) + if (pipe2(pipefd_stdout, 0) == -1) { + rc = -1; break; - - if ((rc = pipe2(pipefd_stderr, 0)) == -1) { + } + if (pipe2(pipefd_stderr, 0) == -1) { close(pipefd_stdout[PIPE_READ]); close(pipefd_stdout[PIPE_WRITE]); + rc = -1; break; } -- 2.39.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61726): https://lists.yoctoproject.org/g/yocto/message/61726 Mute This Topic: https://lists.yoctoproject.org/mt/102730915/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-