llvm-project/lldb
Jordan Rupprecht dd67581407 [lldb/test] Enable faulthandler in dotest
Register the `faulthandler` module so we can see what lldb tests are doing when they misbehave (e.g. run under a test runner that sets a timeout). This will print a stack trace for the following signals:

- `SIGSEGV`, `SIGFPE`, `SIGABRT`, `SIGBUS`, and `SIGILL` (via `faulthandler.enable()`)
- `SIGTERM` (via `faulthandler.register(SIGTERM)`) [This is what our test runners sends when it times out].

The only signal we currently handle is `SIGINT` (via `unittest2.signals.installHandler()`) so there should be no overlap added by this patch.

Because this import is not available until python3, and the `register()` method is not available on Windows, this is enabled defensively.

This should have absolutely no effect when tests are passing (or even normally failing), but can be observed by running this while ninja is running:

```
kill -s SIGTERM $(ps aux | grep dotest.py | head -1 | awk '{print $2}')
```

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D87637
2020-09-16 14:26:40 -07:00
..
bindings [lldb/API] Add Breakpoint::SerializeToStructuredData to SBAPI 2020-09-11 20:09:55 +02:00
cmake [lldb] Remove redundant call to FindBacktrace (NFC) 2020-08-20 22:41:49 -07:00
docs [lldb/Docs] Correct LLDB_ENABLE_TESTS to LLDB_INCLUDE_TESTS 2020-09-09 11:07:57 -07:00
examples Harmonize Python shebang 2020-07-16 21:53:45 +02:00
include/lldb [lldb] Reword CompilerType docstring to not say "generic type" 2020-09-15 22:14:57 -07:00
packages/Python [lldb/test] Enable faulthandler in dotest 2020-09-16 14:26:40 -07:00
resources
scripts Harmonize Python shebang 2020-07-16 21:53:45 +02:00
source Add '<' meta command to read in code from external file 2020-09-16 11:36:54 -07:00
test [lldb] Add -l/--language option to script command 2020-09-15 09:40:17 -07:00
third_party/Python/module Revert "[lldb] temporary commit to see why a test is failing only on lldb-aarch64-ubuntu" 2020-08-05 11:55:02 +02:00
tools Fix 132e57bc59 2020-09-14 10:54:17 -07:00
unittests Fix .debug_aranges parsing. 2020-09-15 11:50:57 -07:00
utils [lldb, tests] Correctly configure the yaml2obj paths 2020-09-10 10:10:28 -07:00
.clang-format
.clang-tidy [lldb] Add .clang-tidy with customization to disable readability-identifier-naming 2020-03-09 12:50:28 -07:00
.gitignore
CMakeLists.txt Create ${swig_target}-scripts target instead of lldb-python-scripts 2020-08-22 19:36:37 -07:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT
use_lldb_suite_root.py