summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2017-08-10 13:47:17 +0000
committerEd Maste <emaste@freebsd.org>2017-08-10 13:47:17 +0000
commit5e82ca353df1ce08974ab7cd5a9c29b0e742bb7a (patch)
tree2b6a2516521042ee116474a83b709b29cba71f3c /lldb/packages/Python/lldbsuite/test
parentfa66a340eb750bc72a813d92d6c6898c091c07cb (diff)
downloadbcm5719-llvm-5e82ca353df1ce08974ab7cd5a9c29b0e742bb7a.tar.gz
bcm5719-llvm-5e82ca353df1ce08974ab7cd5a9c29b0e742bb7a.zip
Report inferior signals as signals, not exceptions, on FreeBSD
This is the FreeBSD equivalent of r238549. This serves 2 purposes: * LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/ SIGFPE the way it is suppose to be handled. Prior to this fix these signals will neither create a coredump, nor exit from the debugger or work for signal handling scenario. * eInvalidCrashReason need not report "unknown crash reason" if we have a valid si_signo llvm.org/pr23699 Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D35223 llvm-svn: 310591
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py3
3 files changed, 4 insertions, 13 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
index d058b1cac56..b233d2f768e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -17,9 +17,6 @@ class CrashingInferiorTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll(
- oslist=['freebsd'],
- bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
- @expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24778, This actually works, but the test relies on the output format instead of the API")
def test_inferior_crashing(self):
@@ -60,7 +57,6 @@ class CrashingInferiorTestCase(TestBase):
self.build()
self.inferior_crashing_step()
- @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr24939')
@expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24778, This actually works, but the test relies on the output format instead of the API")
@@ -76,6 +72,7 @@ class CrashingInferiorTestCase(TestBase):
# Inferior exits after stepping after a segfault. This is working as
# intended IMHO.
@skipIfLinux
+ @skipIfFreeBSD
def test_inferior_crashing_expr_step_and_expr(self):
"""Test that lldb expressions work before and after stepping after a crash."""
self.build()
@@ -110,7 +107,7 @@ class CrashingInferiorTestCase(TestBase):
# The exact stop reason depends on the platform
if self.platformIsDarwin():
stop_reason = 'stop reason = EXC_BAD_ACCESS'
- elif self.getPlatform() == "linux":
+ elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
stop_reason = 'stop reason = signal SIGSEGV'
else:
stop_reason = 'stop reason = invalid address'
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
index f04173a3e8d..9987377a83e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -16,9 +16,6 @@ class CrashingRecursiveInferiorTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureAll(
- oslist=['freebsd'],
- bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_recursive_inferior_crashing(self):
"""Test that lldb reliably catches the inferior crashing (command)."""
@@ -50,7 +47,6 @@ class CrashingRecursiveInferiorTestCase(TestBase):
self.build()
self.recursive_inferior_crashing_step()
- @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr24939')
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
@skipIfTargetAndroid() # debuggerd interferes with this test on Android
def test_recursive_inferior_crashing_step_after_break(self):
@@ -61,6 +57,7 @@ class CrashingRecursiveInferiorTestCase(TestBase):
# Inferior exits after stepping after a segfault. This is working as
# intended IMHO.
@skipIfLinux
+ @skipIfFreeBSD
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_recursive_inferior_crashing_expr_step_and_expr(self):
"""Test that lldb expressions work before and after stepping after a crash."""
@@ -94,7 +91,7 @@ class CrashingRecursiveInferiorTestCase(TestBase):
# The exact stop reason depends on the platform
if self.platformIsDarwin():
stop_reason = 'stop reason = EXC_BAD_ACCESS'
- elif self.getPlatform() == "linux":
+ elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
stop_reason = 'stop reason = signal SIGSEGV'
else:
stop_reason = 'stop reason = invalid address'
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py b/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
index 16681fdbcde..97de99640f5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
@@ -18,9 +18,6 @@ class HandleSegvTestCase(TestBase):
@skipIfWindows # signals do not exist on Windows
@skipIfDarwin
- @expectedFailureAll(
- oslist=['freebsd'],
- bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
def test_inferior_handle_sigsegv(self):
self.build()
exe = os.path.join(os.getcwd(), "a.out")
OpenPOWER on IntegriCloud