[Lldb-commits] [PATCH] D13124: test runner: switch to pure-Python timeout mechanism

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Sun Sep 27 23:28:03 PDT 2015

Will test this out tomorrow

On Sun, Sep 27, 2015 at 10:28 PM Todd Fiala <todd.fiala at gmail.com> wrote:

> tfiala updated this revision to Diff 35829.
> tfiala added a comment.
> Tests added.  Ready for review.
> The change now has two levels of terminate:
> - soft terminate, which uses a signal or process control mechanism to tell
> the process to end.  It optionally can use a mechanism that triggers a core
> dump / crashlog / minidump if supported by the underlying platform.  RIght
> now, only Linux of the Posix-y platforms requests the core (via SIGQUIT).
> I will plumb through an option for that later (as mentioned in prior
> comments in this review).  But I'm now at max time I can spend on this
> right now and this'll need to do.  There is also a timeout on how long the
> process driver will allow the soft timeout to take to wrap up.  This is
> relevant for core dumps that might have a huge amount of memory to dump to
> disk.  It defaults to 10 seconds, but can be overridden by an environment
> variable, LLDB_TEST_SOFT_TERMINATE_TIMEOUT.  That env var will be converted
> to a float from whatever text is in it.  It represents the number of
> seconds within which any soft terminate option must wrap up.  If a process
> is actively blocking/ignoring that termination signal, then this represents
> the total time that will be "wasted" waiting to figure this out.
> - hard terminate: after the soft terminate attempt is made, plus the soft
> terminate timeout, then if the process is still not eliminated, the hard
> terminate mechanism will be used.  On Posix-y systems, this is a SIGKILL.
> @zturner, you will want to run the tests in lldb/test/test_runner/test.
> Do that with:
> cd lldb/test/test_runner/test
> python process_control_tests.py
> In some cases where docs were clear, I did the bit that seemed to make
> sense on the Windows side.  In others, I left it for you to fill in.  Feel
> free to skip some/any tests that don't make sense if, for example, you only
> end up wanting to support one level of killing on Windows.  (We can
> probably work in a "has soft terminate mechanism" query into the
> process_control.ProcessHelper class, which has per-platform derived
> classes, if we want to go that way).
> Also note I will start migrating test infrastructure bits into the
> lldb/test/test_runner/lib directory over time.  The two new files from this
> change are going in there.
> I'd like to get this in sooner than later as it resolves numerous hangs on
> OS X where we don't have a timeout guard.  I've tried it on Linux (4, 8 and
> 24 core machines) as well as OS X (8 core MBPs), and have run the
> process_control_tests on them without issue.
> http://reviews.llvm.org/D13124
> Files:
>   test/dosep.py
>   test/test_runner/README.txt
>   test/test_runner/lib/lldb_utils.py
>   test/test_runner/lib/process_control.py
>   test/test_runner/test/inferior.py
>   test/test_runner/test/process_control_tests.py
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150928/cc34ff27/attachment.html>

More information about the lldb-commits mailing list