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.
This commit is contained in:
pgoyette 2013-02-19 00:54:47 +00:00
parent e9a253f3c1
commit 2fde625529
1 changed files with 2 additions and 1 deletions

View File

@ -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 @@ ATF_TC_BODY(randlock, tc)
break;
}
}
usleep(sleeptime/10);
for (j=0; j<100; j++) {
printf("parent: run %i\n", j+1);
for (i=0; i<nprocs; i++) {