Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/atf/dist/atf-run Pull up revision 3dd2481ec97b2...



details:   https://anonhg.NetBSD.org/src/rev/20266febca52
branches:  trunk
changeset: 763356:20266febca52
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Thu Mar 17 19:45:36 2011 +0000

description:
Pull up revision 3dd2481ec97b2fde76521939b6451d03ce989745 from upstream:

Really kill subprocesses of a test case before waiting for its completion

Before waiting for any leftover output of the test case after it terminates,
we must ensure that all of its subprocess are really, really dead.  Otherwise,
these subprocesses may be sharing the stdout of the test case, in which case
our wait will block (potentially indefinitely).

This finally (well, hopefully) fixes some random lockups exposed by the
NetBSD test suite.  Reported by Antti Kantee after
tests/fs/vfs/t_full:p2k_ffs_fillfs was exposing this problem in a pretty
reproducible manner.

diffstat:

 external/bsd/atf/dist/atf-run/test-program.cpp |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r ae01ec387c2f -r 20266febca52 external/bsd/atf/dist/atf-run/test-program.cpp
--- a/external/bsd/atf/dist/atf-run/test-program.cpp    Thu Mar 17 19:43:34 2011 +0000
+++ b/external/bsd/atf/dist/atf-run/test-program.cpp    Thu Mar 17 19:45:36 2011 +0000
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -724,10 +724,9 @@
         UNREACHABLE;
     }
 
-    ::killpg(child_pid, SIGTERM);
+    ::killpg(child_pid, SIGKILL);
     mux.flush();
     atf::process::status status = child.wait();
-    ::killpg(child_pid, SIGKILL);
 
     std::string reason;
 



Home | Main Index | Thread Index | Old Index