diff options
author | Pavel Labath <labath@google.com> | 2018-03-21 15:29:32 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-03-21 15:29:32 +0000 |
commit | 292178e10463ad40c73bd86c6783180ddf351586 (patch) | |
tree | 11335b95d4c7d492d038f4f1ca860a7201ac2220 /lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new | |
parent | bab6ce018fde9a0a9d720b5d0660022bf782e526 (diff) | |
download | bcm5719-llvm-292178e10463ad40c73bd86c6783180ddf351586.tar.gz bcm5719-llvm-292178e10463ad40c73bd86c6783180ddf351586.zip |
Last batch of test-tree cleaning changes
- postmortem tests: make sure the core files are created in the build
folder
- TestSourceManager: copy the .c file into the build dir before
modifying it
- TestLogging: create log files in the build folder
After these changes I get a clean test run (on linux) even if I set the
source tree to be read only. It's possible some of the skipped/xfailed
tests are still creating files in the source tree, but at the moment, I
don't have plans to go hunting for those.
llvm-svn: 328106
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py index 4e587b92c1d..18c4c348aa4 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py @@ -162,32 +162,25 @@ class MiniDumpNewTestCase(TestBase): def test_deeper_stack_in_minidump_with_same_pid_running(self): """Test that we read the information from the core correctly even if we have a running process with the same PID""" - try: - self.do_change_pid_in_minidump("linux-x86_64_not_crashed.dmp", - "linux-x86_64_not_crashed-pid.dmp", - self._linux_x86_64_not_crashed_pid_offset, - str(self._linux_x86_64_not_crashed_pid), - str(os.getpid())) - self.do_test_deeper_stack("linux-x86_64_not_crashed", - "linux-x86_64_not_crashed-pid.dmp", - os.getpid()) - finally: - self.RemoveTempFile("linux-x86_64_not_crashed-pid.dmp") + new_core = self.getBuildArtifact("linux-x86_64_not_crashed-pid.dmp") + self.do_change_pid_in_minidump("linux-x86_64_not_crashed.dmp", + new_core, + self._linux_x86_64_not_crashed_pid_offset, + str(self._linux_x86_64_not_crashed_pid), + str(os.getpid())) + self.do_test_deeper_stack("linux-x86_64_not_crashed", new_core, os.getpid()) def test_two_cores_same_pid(self): """Test that we handle the situation if we have two core files with the same PID """ - try: - self.do_change_pid_in_minidump("linux-x86_64_not_crashed.dmp", - "linux-x86_64_not_crashed-pid.dmp", - self._linux_x86_64_not_crashed_pid_offset, - str(self._linux_x86_64_not_crashed_pid), - str(self._linux_x86_64_pid)) - self.do_test_deeper_stack("linux-x86_64_not_crashed", - "linux-x86_64_not_crashed-pid.dmp", - self._linux_x86_64_pid) - self.test_stack_info_in_minidump() - finally: - self.RemoveTempFile("linux-x86_64_not_crashed-pid.dmp") + new_core = self.getBuildArtifact("linux-x86_64_not_crashed-pid.dmp") + self.do_change_pid_in_minidump("linux-x86_64_not_crashed.dmp", + new_core, + self._linux_x86_64_not_crashed_pid_offset, + str(self._linux_x86_64_not_crashed_pid), + str(self._linux_x86_64_pid)) + self.do_test_deeper_stack("linux-x86_64_not_crashed", + new_core, self._linux_x86_64_pid) + self.test_stack_info_in_minidump() def test_local_variables_in_minidump(self): """Test that we can examine local variables in a Minidump.""" |