[Lldb-commits] [lldb] [lldb][test] Set target OS for API tests in case of remote testing (PR #96654)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 9 05:24:10 PDT 2024


================
@@ -113,6 +130,10 @@ def _get_platform_os(p):
             platform = "openbsd"
         return platform
 
+    # Triple is not available if we're not connected yet
+    if p.GetName() == "remote-linux":
+        return "linux"
+
----------------
labath wrote:

Yes, I would very much prefer that, as the code you added only handles linux. To support other oses, we would need to create a whole new mapping from lldb platform names to os strings. That list could then get out of sync, etc., so it would be best to just avoid doing that.

I'm not worried about the debug target going down during testing, as that means the test results will be meaningless anyway. If we find out we regularly need the os name before connecting, then I think we ought to revisit the mechanism for determining the OS.

https://github.com/llvm/llvm-project/pull/96654


More information about the lldb-commits mailing list