Merging in 2.0.2.
This commit is contained in:
@@ -39,53 +39,45 @@
|
||||
|
||||
#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)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
tprintf("Entering the huge program - I will stress test your VM\n");
|
||||
printf("Entering the huge program - I will stress test your VM\n");
|
||||
|
||||
/* move number in so that sparse[i][0]=i */
|
||||
for (i=0; i<NumPages; i++) {
|
||||
TEST161_LPROGRESS_N(i, PROGRESS_INTERVAL);
|
||||
sparse[i][0]=i;
|
||||
}
|
||||
|
||||
lsay("\nstage [1] done\n");
|
||||
printf("stage [1] done\n");
|
||||
|
||||
/* increment each location 5 times */
|
||||
for (j=0; j<5; j++) {
|
||||
for (i=0; i<NumPages; i++) {
|
||||
TEST161_LPROGRESS_N(i, PROGRESS_INTERVAL);
|
||||
sparse[i][0]++;
|
||||
}
|
||||
lsay("\nstage [2.%d] done\n", j);
|
||||
printf("stage [2.%d] done\n", j);
|
||||
}
|
||||
|
||||
lsay("\nstage [2] done\n");
|
||||
printf("stage [2] done\n");
|
||||
|
||||
/* check if the numbers are sane */
|
||||
for (i=NumPages-1; i>=0; i--) {
|
||||
TEST161_LPROGRESS_N(i, PROGRESS_INTERVAL);
|
||||
if (sparse[i][0]!=i+5) {
|
||||
lsay("BAD NEWS!!! - your VM mechanism has a bug!\n");
|
||||
success(TEST161_FAIL, SECRET, "/testbin/huge");
|
||||
printf("BAD NEWS!!! - your VM mechanism has a bug!\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
success(TEST161_SUCCESS, SECRET, "/testbin/huge");
|
||||
printf("You passed!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user