svn commit: r297485 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Fri Apr 1 08:55:44 UTC 2016
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)");
More information about the svn-src-user
mailing list