Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2009 10:11:23 +0100
From:      Peter Holm <pho@freebsd.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r187571 - projects/stress2/lib
Message-ID:  <20090122091123.GA335@x2.osted.lan>
In-Reply-To: <20090122085616.GA29791@freebsd.org>
References:  <200901212124.n0LLOaFB091737@svn.freebsd.org> <20090121221258.GA52915@freebsd.org> <20090122065908.GA96726@x2.osted.lan> <20090122085616.GA29791@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 22, 2009 at 09:56:16AM +0100, Roman Divacky wrote:
> On Thu, Jan 22, 2009 at 07:59:08AM +0100, Peter Holm wrote:
> > On Wed, Jan 21, 2009 at 11:12:58PM +0100, Roman Divacky wrote:
> > > On Wed, Jan 21, 2009 at 09:24:36PM +0000, Peter Holm wrote:
> > > > Author: pho
> > > > Date: Wed Jan 21 21:24:36 2009
> > > > New Revision: 187571
> > > > URL: http://svn.freebsd.org/changeset/base/187571
> > > > 
> > > > Log:
> > > >   Attempt to ensure that setup() is called before any system load.
> > > >   
> > > >   Approved by:	kib
> > > > 
> > > > Modified:
> > > >   projects/stress2/lib/main.c
> > > > 
> > > > Modified: projects/stress2/lib/main.c
> > > > ==============================================================================
> > > > --- projects/stress2/lib/main.c	Wed Jan 21 21:01:02 2009	(r187570)
> > > > +++ projects/stress2/lib/main.c	Wed Jan 21 21:24:36 2009	(r187571)
> > > > @@ -106,10 +106,9 @@ run_tests(int i)
> > > >  	signal(SIGHUP, run_test_handler);
> > > >  	signal(SIGINT, exit_handler);
> > > >  	atexit(callcleanup);
> > > > -	arc4random_stir();
> > > > +	setup(i);
> > > >  	if ((strcmp(getprogname(), "run") != 0) && (op->nodelay == 0))
> > > >  		sleep(random_int(1,10));
> > > > -	setup(i);
> > > >  	start = time(NULL);
> > > >  	while (done_testing == 0 &&
> > > >  			(time(NULL) - start) < op->run_time) {
> > > 
> > > are you sure you want to get rid of the arc4random_stir() ?
> > 
> > No, but to quote the man page:
> > 
> > There is no need to call arc4random_stir() before using arc4random(),
> > since arc4random() automatically initializes itself.
> > 
> > Is that wrong?
> 
> no :) but it wasnt mentioned in the commit message so I guessed
> it might have been a mistake

Good point. Thanx :-)

- Peter



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