From: Antonio Huete Jimenez Date: Fri, 10 Aug 2012 08:42:07 +0000 (+0200) Subject: tuxload - Minor modifications. X-Git-Tag: v3.2.0~421 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/e3ba86ed190907fe117d6ab3a5d02baab142904d tuxload - Minor modifications. - Add some output. - First create the files, then mmap() them --- diff --git a/test/stress/tuxload.c b/test/stress/tuxload.c index 54b8943b86..522b93da7d 100644 --- a/test/stress/tuxload.c +++ b/test/stress/tuxload.c @@ -41,10 +41,17 @@ main(int argc, char *argv[]) err(1, "open"); randomfill(fd[i]); } - if ((fstat(fd[i], &st[i])) == -1) - err(1, "fstat"); + err(1, "fstat"); + fprintf(stdout, "\rFile creation, random data filled [%d/%d] ", i+1, NFILES); + fflush(stdout); + } + + printf("\n"); + for (i = 0; i < NFILES; i++) { + fflush(stdout); + fprintf(stdout, "\rDoing mmap() + msync() [%d/%d] ", i+1, NFILES); size = st[i].st_size; p[i] = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd[i], 0); if (p[i] == MAP_FAILED)