mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
Avoid hang in attach-by-name test case
- Check that process attach succeeded before attempting to WaitForProcessToStop (observed to cause hangs on Linux) - Update comment in TestHelloWorld case -- attaching by name still broken llvm-svn: 178491
This commit is contained in:
@@ -1114,10 +1114,13 @@ SBTarget::AttachToProcessWithName
|
||||
attach_info.GetExecutableFile().SetFile(name, false);
|
||||
attach_info.SetWaitForLaunch(wait_for);
|
||||
error.SetError (process_sp->Attach (attach_info));
|
||||
// If we are doing synchronous mode, then wait for the
|
||||
// process to stop!
|
||||
if (target_sp->GetDebugger().GetAsyncExecution () == false)
|
||||
process_sp->WaitForProcessToStop (NULL);
|
||||
if (error.Success())
|
||||
{
|
||||
// If we are doing synchronous mode, then wait for the
|
||||
// process to stop!
|
||||
if (target_sp->GetDebugger().GetAsyncExecution () == false)
|
||||
process_sp->WaitForProcessToStop (NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ class HelloWorldTestCase(TestBase):
|
||||
self.setTearDownCleanup(dictionary=self.d)
|
||||
self.hello_world_attach_with_name_api()
|
||||
|
||||
@expectedFailureLinux # due to bugzilla 14541
|
||||
@expectedFailureLinux # due to bugzilla 14541 -- lldb is unable to attach to process by name
|
||||
@python_api_test
|
||||
@dwarf_test
|
||||
def test_with_dwarf_and_attach_to_process_with_name_api(self):
|
||||
|
||||
Reference in New Issue
Block a user