Userland changes for test161/assignment 3.

This commit is contained in:
Scott Haseley
2016-04-06 13:53:21 -04:00
parent 194f76ef70
commit fedf80f599
9 changed files with 180 additions and 83 deletions

View File

@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include <err.h>
#include <test161/test161.h>
/* Larger than physical memory */
#define SIZE (144*1024)
@@ -54,6 +55,8 @@
* Also, quicksort has somewhat more interesting memory usage patterns.
*/
static int iters;
static
void
sort(int *arr, int size)
@@ -64,6 +67,8 @@ sort(int *arr, int size)
if (size<2) {
return;
}
TEST161_LPROGRESS_N(iters, 4000);
++iters;
pivot = size/2;
sort(arr, pivot);
@@ -122,7 +127,7 @@ check(void)
i, A[i], i+1, A[i+1]);
}
}
warnx("Passed.");
success(TEST161_SUCCESS, SECRET, "/testbin/sort");
}
int