newlib: fix qa_exit_translator in qa tests

This commit is contained in:
Giacomo Tesio 2017-05-02 00:18:52 +02:00
parent 8c33c921b4
commit be7c067507
1 changed files with 9 additions and 5 deletions

View File

@ -22,15 +22,19 @@
static char*
qa_exit_translator(int status)
{
if(status == 0){
if(jehanne_getpid() == jehanne_getmainpid()){
if(jehanne_getpid() == jehanne_getmainpid()){
/* the QA test may fork, but only the main process
* should return PASS/FAIL
*/
if(status == 0){
jehanne_print("PASS\n");
return "PASS";
} else {
jehanne_print("FAIL: " __POSIX_EXIT_PREFIX "%d\n", status);
return "FAIL";
}
return nil;
}
jehanne_print("FAIL: " __POSIX_EXIT_PREFIX "%d\n", status);
return "FAIL";
return nil;
}
void