Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/kernel Create a variable for max number of passes to m...



details:   https://anonhg.NetBSD.org/src/rev/ae717b2893b8
branches:  trunk
changeset: 785030:ae717b2893b8
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Feb 19 03:22:54 2013 +0000

description:
Create a variable for max number of passes to make.  While we're here,
reduce the pass-count from 100 to 50;  this is more than enough to prove
that the test is working, and helps reduce the ever-increasing time it's
taking to run the entire test suite.

diffstat:

 tests/kernel/t_lockf.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 659c292117bd -r ae717b2893b8 tests/kernel/t_lockf.c
--- a/tests/kernel/t_lockf.c    Tue Feb 19 02:30:55 2013 +0000
+++ b/tests/kernel/t_lockf.c    Tue Feb 19 03:22:54 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_lockf.c,v 1.3 2013/02/19 00:54:47 pgoyette Exp $     */
+/*     $NetBSD: t_lockf.c,v 1.4 2013/02/19 03:22:54 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -55,6 +55,7 @@
 
 int nlocks = 500;              /* number of locks per thread */
 int nprocs = 10;               /* number of processes to spawn */
+int npasses = 50;              /* number of passes to make over the children */
 int sleeptime = 150000;                /* sleep time between locks, usec */
 off_t size = 8192;             /* size of file to lock */
 
@@ -149,7 +150,7 @@
                }
        }
        usleep(sleeptime/10);
-       for (j=0; j<100; j++) {
+       for (j = 0; j < npasses; j++) {
                printf("parent: run %i\n", j+1);
                for (i=0; i<nprocs; i++) {
                        ATF_REQUIRE_MSG(ptrace(PT_ATTACH, pid[i], 0, 0) >= 0,



Home | Main Index | Thread Index | Old Index