Beispiel #1
0
int
main(int argc, char *argv[])
{
  printf(1, "usertests starting\n");

  if(open("usertests.ran", 0) >= 0){
    printf(1, "already ran user tests -- rebuild fs.img\n");
    exit();
  }
  close(open("usertests.ran", O_CREATE));

  createdelete();
  linkunlink();
  concreate();
  fourfiles();
  sharedfd();

  bigargtest();
  bigwrite();
  bigargtest();
  bsstest();
  sbrktest();
  validatetest();

  opentest();
  writetest();
  writetest1();
  createtest();

  openiputtest();
  exitiputtest();
  iputtest();

  mem();
  pipe1();
  preempt();
  exitwait();

  rmdot();
  fourteen();
  bigfile();
  subdir();
  linktest();
  unlinkread();
  dirfile();
  iref();
  forktest();
  bigdir(); // slow
  exectest();

  exit();
}
Beispiel #2
0
int main(int argc, char **argv)
{
	int full, np, nth, i, j, val = 0;
	struct args a;

	forktest();	// once to warm up
	const int forkiters = 10000;
	uint64_t ts = bench_time();
	for (i = 0; i < forkiters; i++)
		forktest();
	uint64_t td = (bench_time() - ts) / forkiters;
	printf("proc fork/wait: %lld ns\n", (long long)td);

	for (full = 0; full < 2; full++) {
		for (np = 1; np <= 1024; np *= 2) {
			for (nth = 1; nth <= MAXTHREADS; nth *= 2) {
				a.npages = np;
				a.fullpage = full;
				a.nthreads = nth;
				a.val = val++;
				writetest(&a);		// once to warm up
				const int iters = 10000;
				ts = bench_time();
				for (j = 0; j < iters; j++)
					writetest(&a);
				td = (bench_time() - ts) / iters;
				printf("fork/join x%d, %s %d pages: %lld ns\n",
					nth,
					full ? "scrubbing" : "touching", np,
					(long long)td);
			}
		}
	}

	return 0;
}
Beispiel #3
0
int
main(void)
{
	forktest();
	exit();
}