kern: fix compilation warning; raise qa timeouts
This commit is contained in:
parent
7385e37b13
commit
bb2a39cc74
|
@ -210,7 +210,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average > 900 && average < 1300) /* 30% error on timeout is acceptable */
|
||||
if(average > 900 && average < 3000)
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -111,7 +111,7 @@ waiter(int index)
|
|||
if(verbose)
|
||||
print("waiter %d: got the qlock in %lld ms\n", getpid(), (end - start) / (1000*1000));
|
||||
qunlock(&afterAWhile);
|
||||
if((end - start) / (1000*1000) > 1500)
|
||||
if((end - start) / (1000*1000) > 3000)
|
||||
postnote(PNGROUP, getpid(), smprint("fail: waiter %d got the qlock after %lld ms", getpid(), (end - start) / (1000*1000)));
|
||||
} else {
|
||||
if(verbose)
|
||||
|
|
|
@ -208,7 +208,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average < 1000) /* we asked for 1ms... we are dumb, after all */
|
||||
if(average < 3000) /* we asked for 1ms... we are dumb, after all */
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -210,7 +210,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average > 900 && average < 1300) /* 30% error on timeout is acceptable */
|
||||
if(average > 900 && average < 3000)
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -112,7 +112,7 @@ waiter(int index)
|
|||
if(verbose)
|
||||
print("reader %d: got the rlock in %lld ms\n", getpid(), (end - start) / (1000*1000));
|
||||
runlock(&afterAWhile);
|
||||
if((end - start) / (1000*1000) > 2000)
|
||||
if((end - start) / (1000*1000) > 3000)
|
||||
postnote(PNGROUP, getpid(), smprint("fail: reader %d got the rlock after %lld ms", getpid(), (end - start) / (1000*1000)));
|
||||
} else {
|
||||
if(verbose)
|
||||
|
@ -127,7 +127,7 @@ waiter(int index)
|
|||
rwakeup(&rCompleted);
|
||||
qunlock(&rl);
|
||||
|
||||
return (end - start) / (1000*1000) < 2000 ? nil : "FAIL";
|
||||
return (end - start) / (1000*1000) < 3000 ? nil : "FAIL";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -214,7 +214,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average < 800) /* we asked for 1ms... we are dumb, after all */
|
||||
if(average < 2000) /* we asked for 1ms... we are dumb, after all */
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -209,7 +209,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average > 900 && average < 1300) /* 30% error on timeout is acceptable */
|
||||
if(average > 900 && average < 3000)
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -197,7 +197,7 @@ main(int argc, char* argv[])
|
|||
qunlock(&rl);
|
||||
|
||||
/* wait for ~1 sec */
|
||||
do { sleep(100); } while(nsec() < end);
|
||||
do { sleep(1000); } while(nsec() < end);
|
||||
|
||||
qlock(&l);
|
||||
awakened = rwakeupall(&afterAWhile);
|
||||
|
|
|
@ -215,7 +215,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average < 1000) /* we asked for 1ms... we are dumb, after all */
|
||||
if(average < 2000) /* we asked for 1ms... we are dumb, after all */
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -210,7 +210,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average > 900 && average < 1300) /* 30% error on timeout is acceptable */
|
||||
if(average > 900 && average < 3000)
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -210,7 +210,7 @@ main(int argc, char* argv[])
|
|||
}
|
||||
average = average / NPROC / (1000 * 1000);
|
||||
|
||||
if(average < 1000) /* we asked for 1ms... we are dumb, after all */
|
||||
if(average < 2000) /* we asked for 1ms... we are dumb, after all */
|
||||
{
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
|
|
|
@ -17,7 +17,7 @@ void parent_read(int p[])
|
|||
char buf[MSGSIZE];
|
||||
|
||||
// write link
|
||||
sys_close(p[1]);
|
||||
close(p[1]);
|
||||
|
||||
while (1) {
|
||||
|
||||
|
@ -45,7 +45,7 @@ void parent_read(int p[])
|
|||
printf("End of conversation\n");
|
||||
|
||||
// read link
|
||||
sys_close(p[0]);
|
||||
close(p[0]);
|
||||
|
||||
exit(0);
|
||||
default:
|
||||
|
@ -62,7 +62,7 @@ void child_write(int p[])
|
|||
int i;
|
||||
|
||||
// read link
|
||||
sys_close(p[0]);
|
||||
close(p[0]);
|
||||
|
||||
// write 3 times "hello" in 3 second interval
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -74,7 +74,7 @@ void child_write(int p[])
|
|||
write(p[1], msg2, MSGSIZE);
|
||||
|
||||
// here after write all bytes then write end
|
||||
// doesn't sys_close so read end block but
|
||||
// doesn't close so read end block but
|
||||
// because of fcntl block doesn't happen..
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
@ -32,18 +32,18 @@ main(int argc, char *argv[])
|
|||
|
||||
pipe(sync);
|
||||
outfd = dup(1);
|
||||
nullfd = sys_open("/dev/null", O_WRONLY);
|
||||
nullfd = open("/dev/null", O_WRONLY);
|
||||
tmp = fcntl(sync[0], F_DUPFD_CLOEXEC, 1);
|
||||
sys_close(sync[0]);
|
||||
close(sync[0]);
|
||||
sync[0] = tmp;
|
||||
tmp = fcntl(sync[1], F_DUPFD_CLOEXEC, 1);
|
||||
sys_close(sync[1]);
|
||||
close(sync[1]);
|
||||
sync[1] = tmp;
|
||||
tmp = fcntl(outfd, F_DUPFD_CLOEXEC, 1);
|
||||
sys_close(outfd);
|
||||
close(outfd);
|
||||
outfd = tmp;
|
||||
tmp = fcntl(nullfd, F_DUPFD_CLOEXEC, 1);
|
||||
sys_close(nullfd);
|
||||
close(nullfd);
|
||||
nullfd = tmp;
|
||||
|
||||
eargv[0] = argv[0];
|
||||
|
|
|
@ -59,8 +59,8 @@ main() {
|
|||
|
||||
printf("\nChild going to loop...\n\n");
|
||||
write(p[1], "", 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
for(;;); /* loop for ever */
|
||||
}
|
||||
else /* parent */
|
||||
|
@ -70,8 +70,8 @@ main() {
|
|||
printf("sync read");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
printf("\nPARENT: sending SIGHUP\n\n");
|
||||
kill(pid,SIGHUP);
|
||||
sleep(3); /* pause for 3 secs */
|
||||
|
|
|
@ -27,8 +27,8 @@ main() {
|
|||
if (pid == 0) {
|
||||
printf("\nI am the new child!\n\n");
|
||||
write(p[1], "", 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
for(;;){
|
||||
/* loop for ever */
|
||||
printf(".");
|
||||
|
@ -41,8 +41,8 @@ main() {
|
|||
printf("sync read");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
printf("\nPARENT: sending SIGINT\n\n");
|
||||
kill(pid,SIGINT);
|
||||
do {
|
||||
|
|
|
@ -29,8 +29,8 @@ main() {
|
|||
signal(SIGCONT,sigcont); /* set function calls */
|
||||
printf("Child going to loop...\n");
|
||||
write(p[1], "", 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
for(;;){
|
||||
/* loop for ever */
|
||||
printf(".");
|
||||
|
@ -40,8 +40,8 @@ main() {
|
|||
else /* parent */
|
||||
{
|
||||
read(p[0], &dummy, 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
printf("PARENT: sending SIGCONT\n\n");
|
||||
kill(pid,SIGCONT);
|
||||
child = wait(&cstatus);
|
||||
|
|
|
@ -24,8 +24,8 @@ void childloop(void)
|
|||
signal(SIGSTOP,sigstop); /* set function calls */
|
||||
printf("Child %d going to loop...\n", getpid());
|
||||
write(p[1], "", 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
for(;;){
|
||||
/* loop for ever */
|
||||
printf(".");
|
||||
|
@ -56,8 +56,8 @@ main() {
|
|||
else /* parent */
|
||||
{
|
||||
read(p[0], &dummy, 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
sleep(2);
|
||||
printf("PARENT: sending SIGSTOP\n");
|
||||
kill(pid,SIGSTOP);
|
||||
|
|
|
@ -48,16 +48,16 @@ main() {
|
|||
|
||||
printf("Child going to loop...\n");
|
||||
write(p[1], "", 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
for(;;); /* loop for ever */
|
||||
}
|
||||
else /* parent */
|
||||
{
|
||||
signal(SIGCHLD,sigchld);
|
||||
read(p[0], &dummy, 1);
|
||||
sys_close(p[1]);
|
||||
sys_close(p[0]);
|
||||
close(p[1]);
|
||||
close(p[0]);
|
||||
printf("PARENT: sending SIGHUP\n");
|
||||
kill(pid,SIGHUP);
|
||||
sleep(3); /* pause for 3 secs */
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"/arch/$ARCH/include/cflags.json"
|
||||
],
|
||||
"Cflags": [
|
||||
"-isystem", "/posix/lib/gcc/x86_64-jehanne/9.2.0/include",
|
||||
"-fstack-check",
|
||||
"-fstack-protector-all",
|
||||
"/pkgs/newlib/x86_64-jehanne/lib/libc.a",
|
||||
|
@ -15,8 +16,7 @@
|
|||
],
|
||||
"Oflags": [
|
||||
"-static",
|
||||
"-lposix",
|
||||
"-lc"
|
||||
"-lposix"
|
||||
],
|
||||
"Install": "/arch/$ARCH/qa/lib/newlib",
|
||||
"Post": [
|
||||
|
@ -71,6 +71,7 @@
|
|||
"/arch/$ARCH/include/cflags.json"
|
||||
],
|
||||
"Cflags": [
|
||||
"-isystem", "/posix/lib/gcc/x86_64-jehanne/9.2.0/include",
|
||||
"-fstack-check",
|
||||
"-fstack-protector-all",
|
||||
"/pkgs/newlib/x86_64-jehanne/lib/libc.a",
|
||||
|
@ -83,8 +84,7 @@
|
|||
],
|
||||
"Oflags": [
|
||||
"-static",
|
||||
"-lposix",
|
||||
"-lc"
|
||||
"-lposix"
|
||||
],
|
||||
"Install": "/arch/$ARCH/qa/lib/newlib/sigchld",
|
||||
"Post": [
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"/arch/$ARCH/include/cflags.json"
|
||||
],
|
||||
"Cflags": [
|
||||
"-isystem", "/posix/lib/gcc/x86_64-jehanne/9.2.0/include",
|
||||
"-iquote", "/hacking/cross/pkgs/newlib/src/newlib/testsuite/include/",
|
||||
"-fstack-check",
|
||||
"-Wno-unused-variable",
|
||||
|
@ -18,8 +19,7 @@
|
|||
],
|
||||
"Oflags": [
|
||||
"-static",
|
||||
"-lposix",
|
||||
"-lc"
|
||||
"-lposix"
|
||||
],
|
||||
"Post": [
|
||||
"mkdir -p $JEHANNE/arch/$ARCH/qa/lib/newlib/testsuite",
|
||||
|
|
|
@ -1178,7 +1178,7 @@ qhinterrupt(Ctlr * _, Ep *ep, Qio *io, Td *td, int __)
|
|||
td->ctrl &= ~(Tdccmask << Tdccshift);
|
||||
break;
|
||||
}
|
||||
/* else fall; it's an error */
|
||||
/* Else falls through */ /* it's an error */
|
||||
case Tdcrc:
|
||||
case Tdbitstuff:
|
||||
case Tdbadtog:
|
||||
|
|
Loading…
Reference in New Issue