All of lore.kernel.org
 help / color / mirror / Atom feed
* [ptest-runner 1/8] Corrected return code interpreter
@ 2017-09-29  2:09 Jiwei Sun
  2017-09-29  2:09 ` [ptest-runner 2/8] Add missing stdint.h Jiwei Sun
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Jiwei Sun @ 2017-09-29  2:09 UTC (permalink / raw)
  To: yocto; +Cc: anibal.limon

Signed-off-by: Jiwei Sun <jiwei.sun@windriver.com>
---
 utils.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/utils.c b/utils.c
index 6d65388..a07faec 100644
--- a/utils.c
+++ b/utils.c
@@ -300,9 +300,19 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid,
 	}
 
 	if (status) {
-		fprintf(fps[0], "\nERROR: Exit status is %d\n", status);
 		if (timeouted)
-			fprintf(fps[0], "TIMEOUT: %s\n", ptest_dir);
+			fprintf(fps[0], "TIMEOUT: %s ", ptest_dir);
+
+		if(WIFEXITED(status)) {
+			fprintf(fps[0], "\nERROR: Exit status is %d\n", WEXITSTATUS(status));
+			return WEXITSTATUS(status);
+		}
+		else if(WIFSIGNALED(status)) {
+			fprintf(fps[0], " Killed by signal\n");
+			return 127;
+		}
+		else
+			fprintf(fps[0], "\nERROR: Exit status is %d\n", status);
 	}
 
 	return status;
-- 
1.8.3.1



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

end of thread, other threads:[~2017-10-03 15:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29  2:09 [ptest-runner 1/8] Corrected return code interpreter Jiwei Sun
2017-09-29  2:09 ` [ptest-runner 2/8] Add missing stdint.h Jiwei Sun
2017-09-29  2:09 ` [ptest-runner 3/8] Fix linker order for libcheck Jiwei Sun
2017-09-29  2:09 ` [ptest-runner 4/8] Add version(-v) since we change return code ABI Jiwei Sun
2017-09-29  2:09 ` [ptest-runner 5/8] Add parallelism to TC execution Jiwei Sun
2017-10-03 15:31   ` Joshua Lock
2017-09-29  2:09 ` [ptest-runner 6/8] Add <system-out></system-out> to XML when tests fail Jiwei Sun
2017-10-03 15:31   ` Joshua Lock
2017-09-29  2:09 ` [ptest-runner 7/8] Introduce a ret-code for timeouts Jiwei Sun
2017-09-29  2:09 ` [ptest-runner 8/8] Added <system-err></system-err> to XML Jiwei Sun
2017-10-03 15:31   ` Joshua Lock
2017-10-03 15:31 ` [ptest-runner 1/8] Corrected return code interpreter Joshua Lock

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.