Revert "[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)"

This reverts commit cc9ad72713 since it
breaks some tests upstream:

https://lab.llvm.org/buildbot/#/builders/68/builds/63112

********************
Failed Tests (4):
  lldb-api :: functionalities/gdb_remote_client/TestThreadSelectionBug.py
  lldb-api :: functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
  lldb-api :: functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
  lldb-api :: functionalities/postmortem/mach-core/TestMachCore.py
This commit is contained in:
Med Ismail Bennani
2023-11-07 13:04:01 -08:00
parent c43e627457
commit c2ad9f8b60
14 changed files with 29 additions and 251 deletions

View File

@@ -60,55 +60,6 @@ class ScriptedProcesTestCase(TestBase):
)
shutil.copy(blueprint_origin_path, blueprint_destination_path)
def test_missing_methods_scripted_register_context(self):
"""Test that we only instanciate scripted processes if they implement
all the required abstract methods."""
self.build()
os.environ["SKIP_SCRIPTED_PROCESS_LAUNCH"] = "1"
def cleanup():
del os.environ["SKIP_SCRIPTED_PROCESS_LAUNCH"]
self.addTearDownHook(cleanup)
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
self.assertTrue(target, VALID_TARGET)
log_file = self.getBuildArtifact("script.log")
self.runCmd("log enable lldb script -f " + log_file)
self.assertTrue(os.path.isfile(log_file))
script_path = os.path.join(
self.getSourceDir(), "missing_methods_scripted_process.py"
)
self.runCmd("command script import " + script_path)
launch_info = lldb.SBLaunchInfo(None)
launch_info.SetProcessPluginName("ScriptedProcess")
launch_info.SetScriptedProcessClassName(
"missing_methods_scripted_process.MissingMethodsScriptedProcess"
)
error = lldb.SBError()
process = target.Launch(launch_info, error)
self.assertFailure(error)
with open(log_file, "r") as f:
log = f.read()
self.assertIn(
"Abstract method MissingMethodsScriptedProcess.read_memory_at_address not implemented",
log,
)
self.assertIn(
"Abstract method MissingMethodsScriptedProcess.is_alive not implemented",
log,
)
self.assertIn(
"Abstract method MissingMethodsScriptedProcess.get_scripted_thread_plugin not implemented",
log,
)
@skipUnlessDarwin
def test_invalid_scripted_register_context(self):
"""Test that we can launch an lldb scripted process with an invalid