Date: Fri, 1 Apr 2016 08:55:42 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r297485 - user/pho/stress2/misc Message-ID: <201604010855.u318tgPG060793@repo.freebsd.org>
index | next in thread | raw e-mail
Author: pho Date: Fri Apr 1 08:55:42 2016 New Revision: 297485 URL: https://svnweb.freebsd.org/changeset/base/297485 Log: Fix typo and limit runtime. Sponsored by: EMC / Isilon Storage Division Modified: user/pho/stress2/misc/rename12.sh user/pho/stress2/misc/rename5.sh Modified: user/pho/stress2/misc/rename12.sh ============================================================================== --- user/pho/stress2/misc/rename12.sh Fri Apr 1 08:47:23 2016 (r297484) +++ user/pho/stress2/misc/rename12.sh Fri Apr 1 08:55:42 2016 (r297485) @@ -57,7 +57,7 @@ for i in `jot $loops`; do for j in `jot $parallel`; do mkdir -p $mntpoint/d$j/dir1 mkdir -p $mntpoint/d$j/dir2 - (cd $mntpoint/d$j; /tmp/rename12 $((inodes/N)) ) & + (cd $mntpoint/d$j; /tmp/rename12 $((inodes/parallel)) ) & done wait for j in `jot $parallel`; do Modified: user/pho/stress2/misc/rename5.sh ============================================================================== --- user/pho/stress2/misc/rename5.sh Fri Apr 1 08:47:23 2016 (r297484) +++ user/pho/stress2/misc/rename5.sh Fri Apr 1 08:55:42 2016 (r297485) @@ -70,15 +70,18 @@ checkfs /dev/md${mdstart}$part mdconfig -d -u $mdstart exit 0 EOF +#include <sys/stat.h> +#include <sys/wait.h> + #include <err.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> -#include <sys/stat.h> -#include <sys/wait.h> +#include <time.h> #include <unistd.h> #define N 1000 +#define RUNTIME (5 * 60) void @@ -100,10 +103,12 @@ test(void) int main() { - int fd, i, j; + time_t start; + int fd, i; char dir[128], file[128]; - for (j = 0; j < 50; j++) { + start = time(NULL); + while (time(NULL) - start < RUNTIME) { if (mkdir("src", 0700) == -1) err(1, "mkdir(src)");home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604010855.u318tgPG060793>
