From 1c4a04cd3022ee6b16f9f55c89d084d31c5d880a Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Fri, 11 Aug 2017 02:01:55 +0200 Subject: [PATCH] qa: various fix to tests --- qa/kern/awake.c | 6 ++ qa/kern/awake_note1.c | 1 + qa/kern/build.json | 4 +- qa/kern/nested_note.c | 3 +- qa/lib/c/build.json | 1 + qa/lib/c/longjmp.c | 26 ++++++-- qa/lib/c/qlockt0.c | 7 ++- qa/lib/c/qlockt1.c | 2 +- qa/lib/c/qlockt2.c | 11 ++-- qa/lib/c/rlockt0.c | 9 ++- qa/lib/c/rlockt1.c | 9 ++- qa/lib/c/rlockt2.c | 17 ++++-- qa/lib/c/rsleept0.c | 9 ++- qa/lib/c/rsleept1.c | 9 ++- qa/lib/c/rsleept2.c | 15 +++-- qa/lib/c/rwakeup0.c | 15 +++-- qa/lib/c/rwakeup1.c | 126 +++++++++++++++++++++++++++++++++++++++ qa/lib/c/wlockt0.c | 9 ++- qa/lib/c/wlockt1.c | 9 ++- qa/lib/c/wlockt2.c | 11 ++-- qa/lib/newlib/build.json | 14 ++--- 21 files changed, 253 insertions(+), 60 deletions(-) create mode 100644 qa/lib/c/rwakeup1.c diff --git a/qa/kern/awake.c b/qa/kern/awake.c index 28e3f8c..4a74c13 100644 --- a/qa/kern/awake.c +++ b/qa/kern/awake.c @@ -78,6 +78,7 @@ main(void) print("FAIL: rendezvous\n"); exits("FAIL"); } + forgivewkp(wkup); /* verify that sleeps are NOT interrupted */ fprint(2, "verify that sleeps are NOT interrupted\n", elapsed); @@ -91,6 +92,7 @@ main(void) print("FAIL: sleep\n"); exits("FAIL"); } + forgivewkp(wkup); /* verify that semacquires are interrupted */ fprint(2, "verify that semacquires are interrupted\n", elapsed); @@ -107,6 +109,7 @@ main(void) print("FAIL: semacquire\n"); exits("FAIL"); } + forgivewkp(wkup); /* verify that tsemacquire are NOT interrupted */ fprint(2, "verify that tsemacquire are NOT interrupted\n", elapsed); @@ -120,6 +123,7 @@ main(void) print("FAIL: tsemacquire\n"); exits("FAIL"); } + forgivewkp(wkup); /* verify that reads are interrupted */ fprint(2, "verify that reads are interrupted\n", elapsed); @@ -137,6 +141,7 @@ main(void) print("FAIL: read\n"); exits("FAIL"); } + forgivewkp(wkup); /* verify that writes are interrupted */ fprint(2, "verify that writes are interrupted\n", elapsed); @@ -154,6 +159,7 @@ main(void) print("FAIL: write\n"); exits("FAIL"); } + forgivewkp(wkup); /* do not forgivewkp the awake(100000): the kernel must handle it */ print("PASS\n"); diff --git a/qa/kern/awake_note1.c b/qa/kern/awake_note1.c index b4f5f50..7c7321d 100644 --- a/qa/kern/awake_note1.c +++ b/qa/kern/awake_note1.c @@ -28,6 +28,7 @@ handler(void *v, char *s) print("PASS\n"); exits(nil); } + forgivewkp(wakeup); print("FAIL in note handler\n"); exits("FAIL"); } diff --git a/qa/kern/build.json b/qa/kern/build.json index 4067bb2..3bc6203 100644 --- a/qa/kern/build.json +++ b/qa/kern/build.json @@ -8,9 +8,6 @@ "cp *.rc $JEHANNE/arch/$ARCH/qa/kern/", "cp *.runner $JEHANNE/arch/$ARCH/qa/kern/" ], - "Disabled": [ - "fork_chain.c" - ], "SourceFilesCmd": [ "alarm.c", "args.c", @@ -21,6 +18,7 @@ "execl.c", "float.c", "fork.c", + "fork_chain.c", "frexp.c", "getmainpid.c", "getpid.c", diff --git a/qa/kern/nested_note.c b/qa/kern/nested_note.c index ef72b65..fac5f06 100644 --- a/qa/kern/nested_note.c +++ b/qa/kern/nested_note.c @@ -27,6 +27,7 @@ handler(void *v, char *s) int i; if(strcmp(s, "stop") == 0){ done = 1; + print("stop note received; done = %d\n", done); }else{ print("waiting after %s", s); for(i = 0; i < 1000*1000; ++i) @@ -62,6 +63,6 @@ main(int argc, char**argv) print("PASS\n"); exits("PASS"); } - print("%d notes received\n"); + print("%d notes received\n", waited); exits("FAIL"); } diff --git a/qa/lib/c/build.json b/qa/lib/c/build.json index a4845b7..9a058dd 100644 --- a/qa/lib/c/build.json +++ b/qa/lib/c/build.json @@ -30,6 +30,7 @@ "rsleept1.c", "rsleept2.c", "rwakeup0.c", + "rwakeup1.c", "sleep.c", "sqrt.c", "sysfatal.c", diff --git a/qa/lib/c/longjmp.c b/qa/lib/c/longjmp.c index 2e2fa1b..dab2446 100644 --- a/qa/lib/c/longjmp.c +++ b/qa/lib/c/longjmp.c @@ -2,6 +2,12 @@ #include #include +// from kernel's mem.h +#define MiB (1024*1024) +#define TSTKTOP (0x00007ffffffff000ull) +#define USTKSIZE (16*MiB) /* size of user stack */ +#define USTKTOP (TSTKTOP-USTKSIZE) /* end of new stack in sysexec */ + enum { Njmps = 10000 }; @@ -23,16 +29,26 @@ main(void) fprint(2, "label[%d] = %p\n", i, label[i]); fprint(2, "main: %p foo: %p\n", main, foo); - if(njmp != Njmps) + if(njmp != Njmps){ + print("error: njmp = %d\n", njmp); fail++; - if(label[JMPBUFPC] < (uintptr_t)main) + } + if(label[JMPBUFPC] < (uintptr_t)main){ + print("error: label[JMPBUFPC] = %#p\n", label[JMPBUFPC]); fail++; - if(label[JMPBUFPC] > (uintptr_t)foo) + } + if(label[JMPBUFPC] > (uintptr_t)foo){ + print("error: label[JMPBUFPC] = %#p\n", label[JMPBUFPC]); fail++; - if(label[JMPBUFSP] > (uintptr_t)&label[nelem(label)]) + } + if(label[JMPBUFSP] > (uintptr_t)&label[nelem(label)]){ + print("error: label[JMPBUFSP] (%#p) is greater then &label[nelem(label)] (%#p) \n", label[JMPBUFPC], &label[nelem(label)]); fail++; - if(label[JMPBUFSP] < 0x7fffffd00000) + } + if(label[JMPBUFSP] < USTKTOP-USTKSIZE){ + print("error: label[JMPBUFSP] (%#p) is lower then USTKTOP-USTKSIZE \n", label[JMPBUFSP]); fail++; + } if(fail == 0){ print("PASS\n"); diff --git a/qa/lib/c/qlockt0.c b/qa/lib/c/qlockt0.c index 6c8a721..ccb6ea5 100644 --- a/qa/lib/c/qlockt0.c +++ b/qa/lib/c/qlockt0.c @@ -149,11 +149,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -212,6 +215,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/qlockt1.c b/qa/lib/c/qlockt1.c index 1066051..d7c08b0 100644 --- a/qa/lib/c/qlockt1.c +++ b/qa/lib/c/qlockt1.c @@ -220,6 +220,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/qlockt2.c b/qa/lib/c/qlockt2.c index 052d674..7a0ee04 100644 --- a/qa/lib/c/qlockt2.c +++ b/qa/lib/c/qlockt2.c @@ -70,7 +70,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -150,11 +150,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -205,11 +208,11 @@ main(void) } average = average / NPROC / (1000 * 1000); - if(average < 100) /* we asked for 1ms... we are dumb, after all */ + if(average < 300) /* we asked for 1ms... we are dumb, after all */ { print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rlockt0.c b/qa/lib/c/rlockt0.c index 932037b..8357a25 100644 --- a/qa/lib/c/rlockt0.c +++ b/qa/lib/c/rlockt0.c @@ -71,7 +71,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -150,11 +150,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -212,6 +215,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rlockt1.c b/qa/lib/c/rlockt1.c index 9f82837..0b89c66 100644 --- a/qa/lib/c/rlockt1.c +++ b/qa/lib/c/rlockt1.c @@ -73,7 +73,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -154,11 +154,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average, end; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -222,6 +225,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rlockt2.c b/qa/lib/c/rlockt2.c index 2bf3310..e232574 100644 --- a/qa/lib/c/rlockt2.c +++ b/qa/lib/c/rlockt2.c @@ -71,7 +71,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -126,15 +126,17 @@ waiter(int index) return end != start ? nil : "FAIL"; } +int lastspawn; void spawnWaiter(int index) { - int pid; + int pid, ls = lastspawn; char * res; switch((pid = rfork(RFMEM|RFPROC|RFNOWAIT))) { case 0: + ++lastspawn; res = waiter(index); exits(res); break; @@ -143,6 +145,8 @@ spawnWaiter(int index) exits("rfork fails"); break; default: + while(ls == lastspawn) + ; if(verbose) print("spawn reader %d\n", pid); break; @@ -150,11 +154,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -207,11 +214,11 @@ main(void) } average = average / NPROC / (1000 * 1000); - if(average < 100) /* we asked for 1ms... we are dumb, after all */ + if(average < 300) /* we asked for 1ms... we are dumb, after all */ { print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rsleept0.c b/qa/lib/c/rsleept0.c index 60b475a..3b7e6d1 100644 --- a/qa/lib/c/rsleept0.c +++ b/qa/lib/c/rsleept0.c @@ -71,7 +71,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -152,11 +152,14 @@ spawnsleeper(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -211,6 +214,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rsleept1.c b/qa/lib/c/rsleept1.c index 02d06f4..9810539 100644 --- a/qa/lib/c/rsleept1.c +++ b/qa/lib/c/rsleept1.c @@ -73,7 +73,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -156,11 +156,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i, awakened; int64_t average, end; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -225,6 +228,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rsleept2.c b/qa/lib/c/rsleept2.c index 314b6a1..de351d3 100644 --- a/qa/lib/c/rsleept2.c +++ b/qa/lib/c/rsleept2.c @@ -72,7 +72,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); // printdebugrendezvouslogs(); exits("FAIL"); } @@ -130,15 +130,17 @@ sleeper(int index) return end != start ? nil : "FAIL"; } +int lastspawn; void spawnsleeper(int index) { - int pid; + int pid, ls = lastspawn; char * res; switch((pid = rfork(RFMEM|RFPROC|RFNOWAIT))) { case 0: + ++lastspawn; res = sleeper(index); exits(res); break; @@ -147,6 +149,8 @@ spawnsleeper(int index) exits("rfork fails"); break; default: + while(ls == lastspawn) + ; if(verbose) print("spawn sleeper %d\n", pid); break; @@ -154,11 +158,14 @@ spawnsleeper(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -213,6 +220,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/rwakeup0.c b/qa/lib/c/rwakeup0.c index 1f5e3ee..52f72a3 100644 --- a/qa/lib/c/rwakeup0.c +++ b/qa/lib/c/rwakeup0.c @@ -34,7 +34,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -71,11 +71,14 @@ stopAllAfter(int seconds) } void -main(void) +main(int argc, char* argv[]) { int s, w; - rfork(RFNOTEG); + ARGBEGIN{ + }ARGEND; + + rfork(RFNOTEG|RFREND); if (!atnotify(handletimeout, 1)){ fprint(2, "%r\n"); exits("atnotify fails"); @@ -88,8 +91,8 @@ main(void) switch((s = rfork(RFMEM|RFPROC|RFNOWAIT))) { case 0: - ready = 1; qlock(&l); + ready = 1; rsleep(&r); qunlock(&l); exits(nil); @@ -109,8 +112,8 @@ main(void) case 0: qlock(&l); rwakeup(&r); - ready = 2; qunlock(&l); + ready = 2; exits(nil); break; case -1: @@ -137,6 +140,6 @@ main(void) write(s, "kill", 5); close(s); } - print("FAIL"); + print("FAIL\n"); exits("FAIL"); } diff --git a/qa/lib/c/rwakeup1.c b/qa/lib/c/rwakeup1.c new file mode 100644 index 0000000..decf9b5 --- /dev/null +++ b/qa/lib/c/rwakeup1.c @@ -0,0 +1,126 @@ +/* + * This file is part of Jehanne. + * + * Copyright (C) 2017 Giacomo Tesio + * + * Jehanne is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * Jehanne is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jehanne. If not, see . + */ +#include +#include + +/* verify that rwakeup returns 0 on Rendez that was timedout */ + +Rendez r; +QLock l; +int ready; +int verbose = 0; + +int killerProc; /* pid, will kill the other processes if starved */ + +int +handletimeout(void *v, char *s) +{ + /* just not exit, please */ + if(strcmp(s, "timedout") == 0){ + if(verbose) + print("%d: noted: %s\n", getpid(), s); + print("FAIL: %s timedout\n", argv0); + exits("FAIL"); + } + return 0; +} + +void +killKiller(void) +{ + postnote(PNPROC, killerProc, "interrupt"); +} + +void +stopAllAfter(int seconds) +{ + int pid; + + switch((pid = rfork(RFMEM|RFPROC|RFNOWAIT))) + { + case 0: + if(verbose) + print("killer proc started: pid %d\n", getpid()); + sleep(seconds * 1000); + postnote(PNGROUP, killerProc, "timedout"); + if(verbose) + print("killer proc timedout: pid %d\n", getpid()); + exits("FAIL"); + case -1: + fprint(2, "%r\n"); + exits("rfork fails"); + default: + killerProc = pid; + atexit(killKiller); + } +} + +void +main(int argc, char* argv[]) +{ + int s, w; + + ARGBEGIN{ + }ARGEND; + + rfork(RFNOTEG|RFREND); + if (!atnotify(handletimeout, 1)){ + fprint(2, "%r\n"); + exits("atnotify fails"); + } + + r.l = &l; + + stopAllAfter(30); + /* one process to sleep for 100ms */ + switch((s = rfork(RFMEM|RFPROC|RFNOWAIT))) + { + case 0: + qlock(&l); + rsleept(&r, 100); + qunlock(&l); + ready = 1; + exits(nil); + break; + case -1: + print("rfork: %r\n"); + exits("rfork fails"); + break; + default: + while(ready == 0) + ; + break; + } + /* now, we try to wakeup a free Rendez */ + qlock(&l); + if(rwakeup(&r) == 0){ + qunlock(&l); + print("PASS\n"); + exits("PASS"); + } + if((s = open(smprint("/proc/%d/ctl", s), OWRITE)) >= 0){ + write(s, "kill", 5); + close(s); + } + if((w = open(smprint("/proc/%d/ctl", w), OWRITE)) >= 0){ + write(s, "kill", 5); + close(s); + } + print("FAIL\n"); + exits("FAIL"); +} diff --git a/qa/lib/c/wlockt0.c b/qa/lib/c/wlockt0.c index b7c9115..7803241 100644 --- a/qa/lib/c/wlockt0.c +++ b/qa/lib/c/wlockt0.c @@ -71,7 +71,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -150,11 +150,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -212,6 +215,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/wlockt1.c b/qa/lib/c/wlockt1.c index 3800085..52259ee 100644 --- a/qa/lib/c/wlockt1.c +++ b/qa/lib/c/wlockt1.c @@ -73,7 +73,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -154,11 +154,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average, end; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -222,6 +225,6 @@ main(void) print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/c/wlockt2.c b/qa/lib/c/wlockt2.c index 3151e70..7a792fd 100644 --- a/qa/lib/c/wlockt2.c +++ b/qa/lib/c/wlockt2.c @@ -71,7 +71,7 @@ handletimeout(void *v, char *s) if(strcmp(s, "timedout") == 0){ if(verbose) print("%d: noted: %s\n", getpid(), s); - print("FAIL: timedout\n"); + print("FAIL: %s timedout\n", argv0); exits("FAIL"); } return 0; @@ -150,11 +150,14 @@ spawnWaiter(int index) } void -main(void) +main(int argc, char* argv[]) { int i; int64_t average; + ARGBEGIN{ + }ARGEND; + rfork(RFNOTEG|RFREND); rStart.l = &rl; rCompleted.l = &rl; @@ -207,11 +210,11 @@ main(void) } average = average / NPROC / (1000 * 1000); - if(average < 100) /* we asked for 1ms... we are dumb, after all */ + if(average < 300) /* we asked for 1ms... we are dumb, after all */ { print("PASS\n"); exits("PASS"); } - print("FAIL: average timeout too long %lld ms\n", average); + print("FAIL: %s: average timeout too long %lld ms\n", argv0, average); exits("FAIL"); } diff --git a/qa/lib/newlib/build.json b/qa/lib/newlib/build.json index e6be66a..3abf70d 100644 --- a/qa/lib/newlib/build.json +++ b/qa/lib/newlib/build.json @@ -76,18 +76,18 @@ "SourceFiles": [ "libposix_sigchld.c" ], - "Disabled": [ + "SourceFilesCmd": [ + "000-hello.c", "010-fork.c", "020-waitpid.c", + "100-files.c", + "101-files.c", "200-signals.c", "201-signals.c", "202-signals.c", - "203-signals.c" - ], - "SourceFilesCmd": [ - "000-hello.c", - "100-files.c", - "101-files.c" + "203-signals.c", + "204-signals.c", + "205-signals.c" ] }, "NewlibTestsuite": {