Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jan 2015 15:02:17 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r277935 - user/pho/stress2/misc
Message-ID:  <201501301502.t0UF2H52081615@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Fri Jan 30 15:02:16 2015
New Revision: 277935
URL: https://svnweb.freebsd.org/changeset/base/277935

Log:
  Fix copy/paste error and add a timeout.
  
  Sponsored by:	 EMC / Isilon storage division

Modified:
  user/pho/stress2/misc/mmap10.sh

Modified: user/pho/stress2/misc/mmap10.sh
==============================================================================
--- user/pho/stress2/misc/mmap10.sh	Fri Jan 30 14:37:59 2015	(r277934)
+++ user/pho/stress2/misc/mmap10.sh	Fri Jan 30 15:02:16 2015	(r277935)
@@ -126,8 +126,7 @@ tmmap(void *arg __unused)
 	len = 1LL * 1024 * 1024 * 1024;
 
 	for (i = 0; i < 100; i++) {
-		if ((fd = open("/dev/zero", O_CREAT | O_TRUNC | O_RDWR,
-		    0622)) == -1)
+		if ((fd = open("/dev/zero", O_RDWR)) == -1)
 			err(1,"open()");
 
 		if ((p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE,
@@ -254,6 +253,7 @@ main(void)
 	for (i = 0; i < N; i++)
 		r[i] = arc4random();
 
+	alarm(1200);
 	for (i = 0; i < LOOPS; i++) {
 		for (j = 0; j < PARALLEL; j++) {
 			if (fork() == 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501301502.t0UF2H52081615>