add test73, debug mode
Change-Id: Ibf0c4cdd56b094cb71f151f1cd652b5a717d5293
This commit is contained in:
parent
26428d4bc6
commit
27da1a3918
2
test/run
2
test/run
|
|
@ -24,7 +24,7 @@ setuids="test11 test33 test43 test44 test46 test56 test60 test61 test65 \
|
||||||
alltests=" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
alltests=" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
||||||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
||||||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
|
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
|
||||||
61 62 63 64 65 66 67 68 69 70 71 72 \
|
61 62 63 64 65 66 67 68 69 70 71 72 73 \
|
||||||
sh1.sh sh2.sh interp.sh"
|
sh1.sh sh2.sh interp.sh"
|
||||||
tests_no=`expr 0`
|
tests_no=`expr 0`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,17 +70,22 @@ main(int argc, char *argv[])
|
||||||
if(system(cmdline) < 0) { e(10); exit(1); }
|
if(system(cmdline) < 0) { e(10); exit(1); }
|
||||||
|
|
||||||
/* don't hang forever if the open or read block */
|
/* don't hang forever if the open or read block */
|
||||||
alarm(big ? 6000 : 600);
|
alarm(big ? 6000 : 800);
|
||||||
|
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
if((pipefd=open(pipefn, O_RDONLY)) < 0) { e(3); exit(1); }
|
if((pipefd=open(pipefn, O_RDONLY)) < 0) { e(3); exit(1); }
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
if((r=read(pipefd, &i, sizeof(i))) != sizeof(i)) {
|
if((r=read(pipefd, &i, sizeof(i))) != sizeof(i)) {
|
||||||
printf("read returned %d\n", r);
|
printf("read returned %d\n", r);
|
||||||
e(12);
|
e(12);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
if(i.result != 0) { e(i.result); }
|
if(i.result != 0) { e(i.result); }
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
quit();
|
quit();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,32 +150,46 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
pipefilename=argv[1];
|
pipefilename=argv[1];
|
||||||
|
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
big = !!strstr(pipefilename, "big");
|
big = !!strstr(pipefilename, "big");
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
info.result = time(NULL);
|
info.result = time(NULL);
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
if(testinit() != OK) { printf("%s: testinit failed\n", progname); return 1; }
|
if(testinit() != OK) { printf("%s: testinit failed\n", progname); return 1; }
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
cachequiet(!big);
|
cachequiet(!big);
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
if(!(bdata = alloc_contig(PAGE_SIZE, 0, NULL))) {
|
if(!(bdata = alloc_contig(PAGE_SIZE, 0, NULL))) {
|
||||||
printf("could not allocate block\n");
|
printf("could not allocate block\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
if(dotest(PAGE_SIZE, 10, 3)) { e(11); exit(1); }
|
if(dotest(PAGE_SIZE, 10, 3)) { e(11); exit(1); }
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
if(dotest(PAGE_SIZE, 1000, 3)) { e(11); exit(1); }
|
if(dotest(PAGE_SIZE, 1000, 3)) { e(11); exit(1); }
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
if(dotest(PAGE_SIZE, 50000, 3)) { e(11); exit(1); }
|
if(dotest(PAGE_SIZE, 50000, 3)) { e(11); exit(1); }
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
if(big) {
|
if(big) {
|
||||||
getmem(&totalmem, &freemem, &cachedmem);
|
getmem(&totalmem, &freemem, &cachedmem);
|
||||||
if(dotest(PAGE_SIZE, totalmem*1.5, 3)) { e(11); exit(1); }
|
if(dotest(PAGE_SIZE, totalmem*1.5, 3)) { e(11); exit(1); }
|
||||||
}
|
}
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
info.result = 0;
|
info.result = 0;
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
writepipe(&info);
|
writepipe(&info);
|
||||||
|
printf("%s:%d\n", __FILE__, __LINE__);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user