On 12.11.2006 [11:19:23 +1100], David Gibson wrote: > On Fri, Nov 10, 2006 at 11:43:56AM -0800, Nishanth Aravamudan wrote: > > Fix linkshare testcase to catch the case where the sharing children are > > killed by a signal. Currently, if a child segfaults, we still PASS the > > test, when it clearly should be a FAIL case. > > Um.. yes, we certainly want this.
Yep, and my solution is incomplete -- we actually want a SIGSEGV handler, as that has been (in my testing), the only way to reliably catch this fail-case on x86_64. Would it make sense to globally install one in test_init(), like we do for SIGINT? > > diff --git a/tests/linkshare.c b/tests/linkshare.c > > index 3461a7d..5d174e2 100644 > > --- a/tests/linkshare.c > > +++ b/tests/linkshare.c > > @@ -216,12 +216,18 @@ int main(int argc, char *argv[], char *e > > } > > } > > for (i = 0; i < num_sharings; i++) { > > - ret = waitpid(children[i], NULL, 0); > > + int status; > > + ret = waitpid(children[i], &status, 0); > > if (ret < 0) { > > shmctl(shmid, IPC_RMID, NULL); > > shmdt(shm); > > FAIL("waitpid failed: %s", strerror(errno)); > > } > > + if (WIFEXITED(status)) > > + continue; > > But we should also FAIL() on non-zero return status. Yep, another problem with my patch, I agree. Pending a reply to the above, I've changed my local copy and will resend. Thanks, Nish -- Nishanth Aravamudan <[EMAIL PROTECTED]> IBM Linux Technology Center ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel