diff options
author | Tatyana Krasnukha <tatyana@synopsys.com> | 2019-09-26 10:57:11 +0000 |
---|---|---|
committer | Tatyana Krasnukha <tatyana@synopsys.com> | 2019-09-26 10:57:11 +0000 |
commit | a11668e87b9096c821ee9fd213e398e909b92965 (patch) | |
tree | d319bd616dade59fd7ee452b8523707d354722d7 /lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py | |
parent | 6b794dfd3d9fc836bddba939d6631aa7b2607caa (diff) | |
download | bcm5719-llvm-a11668e87b9096c821ee9fd213e398e909b92965.tar.gz bcm5719-llvm-a11668e87b9096c821ee9fd213e398e909b92965.zip |
Don't stop execution in batch mode when process stops with SIGINT or SIGSTOP
Summary: Usually, SIGINT and SIGSTOP don't imply a crash, e.g. SIGSTOP is sent on process launch and attach on some platforms.
Differential Revision: https://reviews.llvm.org/D67776
llvm-svn: 372961
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py b/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py index 01e11fc096c..41c6019adfb 100644 --- a/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py +++ b/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py @@ -78,6 +78,35 @@ class DriverBatchModeTest(PExpectTest): import pexpect child.expect(pexpect.EOF) + @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot") + def test_batch_mode_launch_stop_at_entry(self): + """Test that the lldb driver's batch mode works correctly for process launch.""" + self.build() + + exe = self.getBuildArtifact("a.out") + + # Launch with the option '--stop-at-entry' stops with a signal (usually SIGSTOP) + # that should be suppressed since it doesn't imply a crash and + # this is not a reason to exit batch mode. + extra_args = ['-b', + '-o', 'process launch --stop-at-entry', + '-o', 'continue', + ] + self.launch(executable=exe, extra_args=extra_args) + child = self.child + + # Check that the process has been launched: + child.expect("Process ([0-9]+) launched:") + # We should have continued: + child.expect_exact("continue") + # The App should have not have crashed: + child.expect_exact("Got there on time and it did not crash.") + + # Then lldb should exit. + child.expect_exact("exited") + import pexpect + child.expect(pexpect.EOF) + def closeVictim(self): if self.victim is not None: self.victim.close() |