add test73, debug mode
Change-Id: Ibf0c4cdd56b094cb71f151f1cd652b5a717d5293
This commit is contained in:
parent
26428d4bc6
commit
a87ff8c0c0
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 \
|
||||
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 \
|
||||
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"
|
||||
tests_no=`expr 0`
|
||||
|
||||
|
|
|
|||
|
|
@ -69,18 +69,25 @@ main(int argc, char *argv[])
|
|||
_PATH_SERVICE, cwd, cwd, pipefn, cwd);
|
||||
if(system(cmdline) < 0) { e(10); exit(1); }
|
||||
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
/* 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); }
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
if((r=read(pipefd, &i, sizeof(i))) != sizeof(i)) {
|
||||
printf("read returned %d\n", r);
|
||||
e(12);
|
||||
exit(1);
|
||||
}
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
if(i.result != 0) { e(i.result); }
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
quit();
|
||||
|
||||
|
|
|
|||
|
|
@ -150,32 +150,46 @@ main(int argc, char *argv[])
|
|||
|
||||
pipefilename=argv[1];
|
||||
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
big = !!strstr(pipefilename, "big");
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
init();
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
info.result = time(NULL);
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
if(testinit() != OK) { printf("%s: testinit failed\n", progname); return 1; }
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
cachequiet(!big);
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
if(!(bdata = alloc_contig(PAGE_SIZE, 0, NULL))) {
|
||||
printf("could not allocate block\n");
|
||||
exit(1);
|
||||
}
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
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); }
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
if(dotest(PAGE_SIZE, 50000, 3)) { e(11); exit(1); }
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
if(big) {
|
||||
getmem(&totalmem, &freemem, &cachedmem);
|
||||
if(dotest(PAGE_SIZE, totalmem*1.5, 3)) { e(11); exit(1); }
|
||||
}
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
info.result = 0;
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
writepipe(&info);
|
||||
printf("%s:%d\n", __FILE__, __LINE__);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user