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

An error message is required when detecting one or more
ptest are not launched.

Signed-off-by: Edwin Plauchu <edwin.plauchu.cama...@linux.intel.com>
---
 utils.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/utils.c b/utils.c
index 6991af1..d1b5139 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) {
@@ -350,9 +351,10 @@ 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)
+                               if (status) {
+                                       fprintf(stderr, "ERROR: Program child 
error\n");
                                        rc += 1;
-
+                               }
                                fprintf(fp, "END: %s\n", ptest_dir);
                                fprintf(fp, "%s\n", get_stime(stime, 
GET_STIME_BUF_SIZE));
                        }
-- 
2.9.3

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to