All of lore.kernel.org
 help / color / mirror / Atom feed
* [ptest-runner][PATCH] Added error coverage to support when launching child process fails.
@ 2016-09-20 16:02 Edwin Plauchu
  0 siblings, 0 replies; 2+ messages in thread
From: Edwin Plauchu @ 2016-09-20 16:02 UTC (permalink / raw)
  To: yocto; +Cc: Edwin Plauchu

From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>

[YOCTO #9752]

Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
---
 utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index 6991af1..2ebfb04 100644
--- a/utils.c
+++ b/utils.c
@@ -249,7 +249,7 @@ run_child(char *run_ptest, int fd_stdout, int fd_stderr)
 	dup2(fd_stderr, STDERR_FILENO);
 	execv(run_ptest, argv);
 
-	exit(0);
+	exit(1);
 }
 
 static inline int
@@ -336,6 +336,7 @@ run_ptests(struct ptest_list *head, int timeout, const char *progname,
 
 			child = fork();
 			if (child == -1) {
+				fprintf(stderr, "ERROR: Fork fatal\n");
 				rc = -1;
 				break;
 			} else if (child == 0) {
@@ -351,6 +352,7 @@ run_ptests(struct ptest_list *head, int timeout, const char *progname,
 				status = wait_child(ptest_dir, p->run_ptest, child,
 						timeout, fds, fps);
 				if (status)
+					fprintf(stderr, "ERROR: Program child error\n");
 					rc += 1;
 
 				fprintf(fp, "END: %s\n", ptest_dir);
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [ptest-runner][PATCH] Added error coverage to support when launching child process fails.
@ 2016-09-20 15:59 Edwin Plauchu
  0 siblings, 0 replies; 2+ messages in thread
From: Edwin Plauchu @ 2016-09-20 15:59 UTC (permalink / raw)
  To: yocto; +Cc: Edwin Plauchu

From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>

[YOCTO #9752]

Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
---
 utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index 6991af1..2ebfb04 100644
--- a/utils.c
+++ b/utils.c
@@ -249,7 +249,7 @@ run_child(char *run_ptest, int fd_stdout, int fd_stderr)
 	dup2(fd_stderr, STDERR_FILENO);
 	execv(run_ptest, argv);
 
-	exit(0);
+	exit(1);
 }
 
 static inline int
@@ -336,6 +336,7 @@ run_ptests(struct ptest_list *head, int timeout, const char *progname,
 
 			child = fork();
 			if (child == -1) {
+				fprintf(stderr, "ERROR: Fork fatal\n");
 				rc = -1;
 				break;
 			} else if (child == 0) {
@@ -351,6 +352,7 @@ run_ptests(struct ptest_list *head, int timeout, const char *progname,
 				status = wait_child(ptest_dir, p->run_ptest, child,
 						timeout, fds, fps);
 				if (status)
+					fprintf(stderr, "ERROR: Program child error\n");
 					rc += 1;
 
 				fprintf(fp, "END: %s\n", ptest_dir);
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-20 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 16:02 [ptest-runner][PATCH] Added error coverage to support when launching child process fails Edwin Plauchu
  -- strict thread matches above, loose matches on Subject: below --
2016-09-20 15:59 Edwin Plauchu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.