Author: Raphael Isemann Date: 2020-08-14T13:12:52+02:00 New Revision: bb4efab9a4d9431dbedb27f04249effd0a73812e
URL: https://github.com/llvm/llvm-project/commit/bb4efab9a4d9431dbedb27f04249effd0a73812e DIFF: https://github.com/llvm/llvm-project/commit/bb4efab9a4d9431dbedb27f04249effd0a73812e.diff LOG: [lldb] Use SBProcess::Continue instead of 'run' command in TestTargetAPI.py This test is flaky on Green Dragon as it often fails when the process state is "Invalid" in the assert: self.assertEqual(process.GetState(), lldb.eStateExited) It seems this is related to just doing "run" which apparently invalidates the Target's process in case it's still running and needs to be restarted. Just doing 'continue' on the process (and ignoring the error in case it already finished) prevents that and makes this consistently pass for me. Just pushing this out to get Green Dragon back online. Added: Modified: lldb/test/API/python_api/target/TestTargetAPI.py Removed: ################################################################################ diff --git a/lldb/test/API/python_api/target/TestTargetAPI.py b/lldb/test/API/python_api/target/TestTargetAPI.py index de8bed08f5fa..85a6d78bdf5a 100644 --- a/lldb/test/API/python_api/target/TestTargetAPI.py +++ b/lldb/test/API/python_api/target/TestTargetAPI.py @@ -168,7 +168,7 @@ def test_launch_simple(self): process = target.LaunchSimple( ['foo', 'bar'], ['baz'], self.get_process_working_directory()) - self.runCmd("run") + process.Continue() self.assertEqual(process.GetState(), lldb.eStateExited) output = process.GetSTDOUT(9999) self.assertIn('arg: foo', output) @@ -179,7 +179,7 @@ def test_launch_simple(self): self.runCmd("setting set target.env-vars bar=baz") process = target.LaunchSimple(None, None, self.get_process_working_directory()) - self.runCmd("run") + process.Continue() self.assertEqual(process.GetState(), lldb.eStateExited) output = process.GetSTDOUT(9999) self.assertIn('arg: foo', output) @@ -188,7 +188,7 @@ def test_launch_simple(self): self.runCmd("settings set target.disable-stdio true") process = target.LaunchSimple( None, None, self.get_process_working_directory()) - self.runCmd("run") + process.Continue() self.assertEqual(process.GetState(), lldb.eStateExited) output = process.GetSTDOUT(9999) self.assertEqual(output, "") _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits