diff options
| author | Jacob Lalonde <jalalonde@fb.com> | 2024-08-05 10:17:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-05 10:17:25 -0700 |
| commit | accf5c9bb3b5fe88628a44062a5c0c2f903fca2c (patch) | |
| tree | f2d30eaa9311ef7117662cf743c0b186c28c0a33 /lldb/test/API/python_api | |
| parent | 0319711f89ed815b92ab581ed98cc4ace5178135 (diff) | |
| download | llvm-accf5c9bb3b5fe88628a44062a5c0c2f903fca2c.zip llvm-accf5c9bb3b5fe88628a44062a5c0c2f903fca2c.tar.gz llvm-accf5c9bb3b5fe88628a44062a5c0c2f903fca2c.tar.bz2 | |
Revert "[LLDB][SBSaveCore] Implement a selectable threadlist for Core… (#102018)
… Options. (#100443)"
This reverts commit 3e4af616334eae532f308605b89ff158dd195180.
@adrian-prantl FYI
Reverts #100443
Diffstat (limited to 'lldb/test/API/python_api')
3 files changed, 1 insertions, 106 deletions
diff --git a/lldb/test/API/python_api/sbsavecoreoptions/TestSBSaveCoreOptions.py b/lldb/test/API/python_api/sbsavecoreoptions/TestSBSaveCoreOptions.py index 40d0cc7..c509e81 100644 --- a/lldb/test/API/python_api/sbsavecoreoptions/TestSBSaveCoreOptions.py +++ b/lldb/test/API/python_api/sbsavecoreoptions/TestSBSaveCoreOptions.py @@ -4,26 +4,8 @@ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * -class SBSaveCoreOptionsAPICase(TestBase): - basic_minidump = "basic_minidump.yaml" - basic_minidump_different_pid = "basic_minidump_different_pid.yaml" - - def get_process_from_yaml(self, yaml_file): - minidump_path = self.getBuildArtifact(os.path.basename(yaml_file) + ".dmp") - print ("minidump_path: " + minidump_path) - self.yaml2obj(yaml_file, minidump_path) - self.assertTrue(os.path.exists(minidump_path), "yaml2obj did not emit a minidump file") - target = self.dbg.CreateTarget(None) - process = target.LoadCore(minidump_path) - self.assertTrue(process.IsValid(), "Process is not valid") - return process - - def get_basic_process(self): - return self.get_process_from_yaml(self.basic_minidump) - - def get_basic_process_different_pid(self): - return self.get_process_from_yaml(self.basic_minidump_different_pid) +class SBSaveCoreOptionsAPICase(TestBase): def test_plugin_name_assignment(self): """Test assignment ensuring valid plugin names only.""" options = lldb.SBSaveCoreOptions() @@ -44,38 +26,3 @@ class SBSaveCoreOptionsAPICase(TestBase): """Test that the default core style is unspecified.""" options = lldb.SBSaveCoreOptions() self.assertEqual(options.GetStyle(), lldb.eSaveCoreUnspecified) - - def test_adding_and_removing_thread(self): - """Test adding and removing a thread from save core options.""" - self.assertTrue(self.dbg) - options = lldb.SBSaveCoreOptions() - process = self.get_basic_process() - self.assertTrue(process.IsValid(), "Process is not valid") - thread = process.GetThreadAtIndex(0) - error = options.AddThread(thread) - self.assertTrue(error.Success(), error.GetCString()) - removed_success = options.RemoveThread(thread) - self.assertTrue(removed_success) - removed_success = options.RemoveThread(thread) - self.assertFalse(removed_success) - - - def test_adding_thread_different_process(self): - """Test adding and removing a thread from save core options.""" - options = lldb.SBSaveCoreOptions() - process = self.get_basic_process() - process_2 = self.get_basic_process_different_pid() - thread = process.GetThreadAtIndex(0) - error = options.AddThread(thread) - self.assertTrue(error.Success()) - thread_2 = process_2.GetThreadAtIndex(0) - error = options.AddThread(thread_2) - self.assertTrue(error.Fail()) - options.Clear() - error = options.AddThread(thread_2) - self.assertTrue(error.Success()) - options.SetProcess(process) - error = options.AddThread(thread_2) - self.assertTrue(error.Fail()) - error = options.AddThread(thread) - self.assertTrue(error.Success()) diff --git a/lldb/test/API/python_api/sbsavecoreoptions/basic_minidump.yaml b/lldb/test/API/python_api/sbsavecoreoptions/basic_minidump.yaml deleted file mode 100644 index 993c7da..0000000 --- a/lldb/test/API/python_api/sbsavecoreoptions/basic_minidump.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- !minidump -Streams: - - Type: SystemInfo - Processor Arch: AMD64 - Processor Level: 6 - Processor Revision: 15876 - Number of Processors: 40 - Platform ID: Linux - CSD Version: 'Linux 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64' - CPU: - Vendor ID: GenuineIntel - Version Info: 0x00000000 - Feature Info: 0x00000000 - - Type: LinuxProcStatus - Text: | - Name: test-yaml - Umask: 0002 - State: t (tracing stop) - Pid: 8567 - - Type: ThreadList - Threads: - - Thread Id: 0x000074DD - Context: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B0010000000000033000000000000000000000002020100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040109600000000000100000000000000000000000000000068E7D0C8FF7F000068E7D0C8FF7F000097E6D0C8FF7F000010109600000000000000000000000000020000000000000088E4D0C8FF7F0000603FFF85C77F0000F00340000000000080E7D0C8FF7F000000000000000000000000000000000000E0034000000000007F0300000000000000000000000000000000000000000000801F0000FFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF252525252525252525252525252525250000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - Stack: - Start of Memory Range: 0x00007FFFC8D0E000 - Content: 'DEADBEEF' diff --git a/lldb/test/API/python_api/sbsavecoreoptions/basic_minidump_different_pid.yaml b/lldb/test/API/python_api/sbsavecoreoptions/basic_minidump_different_pid.yaml deleted file mode 100644 index 7393f1f..0000000 --- a/lldb/test/API/python_api/sbsavecoreoptions/basic_minidump_different_pid.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- !minidump -Streams: - - Type: SystemInfo - Processor Arch: AMD64 - Processor Level: 6 - Processor Revision: 15876 - Number of Processors: 40 - Platform ID: Linux - CSD Version: 'Linux 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64' - CPU: - Vendor ID: GenuineIntel - Version Info: 0x00000000 - Feature Info: 0x00000000 - - Type: LinuxProcStatus - Text: | - Name: test-yaml - Umask: 0002 - State: t (tracing stop) - Pid: 1967 - - Type: ThreadList - Threads: - - Thread Id: 0x000074DD - Context: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B0010000000000033000000000000000000000002020100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040109600000000000100000000000000000000000000000068E7D0C8FF7F000068E7D0C8FF7F000097E6D0C8FF7F000010109600000000000000000000000000020000000000000088E4D0C8FF7F0000603FFF85C77F0000F00340000000000080E7D0C8FF7F000000000000000000000000000000000000E0034000000000007F0300000000000000000000000000000000000000000000801F0000FFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF252525252525252525252525252525250000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - Stack: - Start of Memory Range: 0x00007FFFC8D0E000 - Content: 'DEADBEEF' |
