teemperor created this revision. teemperor added a reviewer: davide. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
It seems that calling Popen can return to the caller before the started process has read all the needed information from its executable. This means that in case we delete the executable while the process is still starting up, this test will create a zombie process which in turn leads to a failing test. On my macOS system this happens quite frequently. The startup time for this process is really short, so waiting half a second before deleting the executable seems to be long enough to make this test pass consistently. Repository: rLLDB LLDB https://reviews.llvm.org/D64546 Files: lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py Index: lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py =================================================================== --- lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py +++ lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py @@ -26,6 +26,8 @@ popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) + # Give the process some time to start. + time.sleep(0.5) os.remove(exe) self.runCmd("process attach -p " + str(popen.pid))
Index: lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py =================================================================== --- lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py +++ lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py @@ -26,6 +26,8 @@ popen = self.spawnSubprocess(exe) self.addTearDownHook(self.cleanupSubprocesses) + # Give the process some time to start. + time.sleep(0.5) os.remove(exe) self.runCmd("process attach -p " + str(popen.pid))
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits