Do not reset error counter before each test
PATCH 1/1 Do not reset error counter before each test
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 <[email protected]>
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.
--- utils.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
utils.c +5 -3
@@ -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 ; }
Signature · 1 line
2.39.2
LGTM
Quoted 20 lines · Christian Hohnstaedt
Hi,
Commit
56ed1082c4914c0ef3c72bfd609d68cc850557f1moved 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.-=-=-=-=-=-=-=-=-=-=-=-
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/3616693
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi all,
Joshua: I'm doing an integration branch
Christian: adding this patch.
Regards!,
Anibal
Quoted 32 lines · Joshua Watt
LGTM
Reviewed-by Joshua Watt <[email protected]>Quoted 14 lines · Christian Hohnstaedt
Hi,
Commit
56ed1082c4914c0ef3c72bfd609d68cc850557f1moved 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.-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62419):
https://lists.yoctoproject.org/g/yocto/message/62419
Mute This Topic: https://lists.yoctoproject.org/mt/102730915/8181911
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-