Files
clang-p2996/lldb/test/Shell/Reproducer/TestCrash.test
Jonas Devlieghere 10aa9e19fa [LLDB/Reproducers] Add flag to avoid installing the signal handler.
There are bugs where you don't want the signal handler to trigger, most
notably when that will cause another crash. Examples of this are lldb
running out of memory or a bug in the reproducer generation code. This
adds an escape hatch trough a (developer oriented) flag to not install
the signal handler.

rdar://problem/65149595

Differential revision: https://reviews.llvm.org/D83496
2020-07-09 11:50:45 -07:00

18 lines
653 B
Plaintext

# This tests that a reproducer is generated when LLDB crashes.
# Start clean.
# RUN: rm -rf %t.repro
# RUN: %lldb -b --capture --capture-path %t.repro -o 'reproducer xcrash -s SIGSEGV' | FileCheck %s
# RUN: %lldb -b --capture --capture-path %t.repro -o 'reproducer xcrash -s SIGILL' | FileCheck %s
# CHECK: ********************
# CHECK: Crash reproducer for
# CHECK: Reproducer written to
# CHECK: ********************
# RUN: %lldb -b --capture --capture-path %t.repro --reproducer-no-generate-on-signal -o 'reproducer xcrash -s SIGSEGV' | FileCheck %s --check-prefix NOHANDLER
# NOHANDLER-NOT: Crash reproducer
# NOHANDLER-NOT: Reproducer written