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