Permalink
Browse files

Consume less random bits, and don't pace after ramp-up

  • Loading branch information...
bsdphk committed Feb 8, 2019
1 parent 832d6da commit bef8b6cf0f1a8887484f1bbaba660478444d206e
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/varnishtest/vtc_main.c
@@ -275,7 +275,6 @@ start_test(void)
assert(jp->buf != MAP_FAILED);
memset(jp->buf, 0, jp->bufsiz);

VRND_SeedAll();
bprintf(tmpdir, "%s/vtc.%d.%08x", tmppath, (int)getpid(),
(unsigned)random());
AZ(mkdir(tmpdir, 0711));
@@ -541,6 +540,7 @@ main(int argc, char * const *argv)
{
int ch, i;
int ntest = 1; /* Run tests this many times */
int nstart = 0;
uintmax_t bufsiz;
const char *p;

@@ -568,6 +568,7 @@ main(int argc, char * const *argv)
if (p != NULL)
vtc_maxdur = atoi(p);

VRND_SeedAll();
setbuf(stdout, NULL);
setbuf(stderr, NULL);
while ((ch = getopt(argc, argv, "b:D:hij:kLln:p:qt:vW")) != -1) {
@@ -660,7 +661,7 @@ main(int argc, char * const *argv)
start_test();
njob++;
/* Stagger ramp-up */
if (njob < npar)
if (nstart++ < npar)
(void)usleep(random() % 100000L);
i = 1;
continue;

0 comments on commit bef8b6c

Please sign in to comment.