Source-Changes-HG archive

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

[src/trunk]: src/tests/kernel Wait a little bit after fork()ing the lockers t...



details:   https://anonhg.NetBSD.org/src/rev/17ce2dc94233
branches:  trunk
changeset: 785023:17ce2dc94233
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Feb 19 00:54:47 2013 +0000

description:
Wait a little bit after fork()ing the lockers to give them a chance to
get started before trying to ptrace(ATTACH).  Otherwise, the traced
process doesn't seem to resume properly upon ptrace(DETACH) and on the
next pass the ptrace(ATTACH) just hangs forever, causing the test to
time-out.

XXX The failure-to-resume-properly might actually be a kernel bug that
we need to follow up on.  But for now, let's make the test work as
intended.

diffstat:

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

diffs (17 lines):

diff -r 7e1ee0692c4f -r 17ce2dc94233 tests/kernel/t_lockf.c
--- a/tests/kernel/t_lockf.c    Mon Feb 18 23:09:20 2013 +0000
+++ b/tests/kernel/t_lockf.c    Tue Feb 19 00:54:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_lockf.c,v 1.2 2013/02/18 20:59:19 pgoyette Exp $     */
+/*     $NetBSD: t_lockf.c,v 1.3 2013/02/19 00:54:47 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -148,6 +148,7 @@
                        break;
                }
        }
+       usleep(sleeptime/10);
        for (j=0; j<100; j++) {
                printf("parent: run %i\n", j+1);
                for (i=0; i<nprocs; i++) {



Home | Main Index | Thread Index | Old Index