Changes to userland progress to tweak progress output for test161. We needed
more periodic progress in some cases due to the large slow down that happens when swapping is implemented (ASST3.3).
This commit is contained in:
@@ -40,12 +40,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <test161/test161.h>
|
||||
#include <test/test.h>
|
||||
|
||||
#define PageSize 4096
|
||||
#define NumPages 512
|
||||
|
||||
int sparse[NumPages][PageSize]; /* use only the first element in the row */
|
||||
|
||||
#define PROGRESS_INTERVAL 20
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
@@ -55,36 +58,33 @@ main(void)
|
||||
|
||||
/* move number in so that sparse[i][0]=i */
|
||||
for (i=0; i<NumPages; i++) {
|
||||
TEST161_TPROGRESS(i);
|
||||
TEST161_LPROGRESS_N(i, PROGRESS_INTERVAL);
|
||||
sparse[i][0]=i;
|
||||
}
|
||||
|
||||
tprintf("stage [1] done\n");
|
||||
nprintf("\n");
|
||||
lsay("\nstage [1] done\n");
|
||||
|
||||
/* increment each location 5 times */
|
||||
for (j=0; j<5; j++) {
|
||||
for (i=0; i<NumPages; i++) {
|
||||
TEST161_TPROGRESS(i);
|
||||
TEST161_LPROGRESS_N(i, PROGRESS_INTERVAL);
|
||||
sparse[i][0]++;
|
||||
}
|
||||
tprintf("stage [2.%d] done\n", j);
|
||||
nprintf("\n");
|
||||
lsay("\nstage [2.%d] done\n", j);
|
||||
}
|
||||
|
||||
tprintf("stage [2] done\n");
|
||||
lsay("\nstage [2] done\n");
|
||||
|
||||
/* check if the numbers are sane */
|
||||
for (i=NumPages-1; i>=0; i--) {
|
||||
TEST161_TPROGRESS(i);
|
||||
TEST161_LPROGRESS_N(i, PROGRESS_INTERVAL);
|
||||
if (sparse[i][0]!=i+5) {
|
||||
tprintf("BAD NEWS!!! - your VM mechanism has a bug!\n");
|
||||
lsay("BAD NEWS!!! - your VM mechanism has a bug!\n");
|
||||
success(TEST161_FAIL, SECRET, "/testbin/huge");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
nprintf("\n");
|
||||
success(TEST161_SUCCESS, SECRET, "/testbin/huge");
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user