[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

Yuval Deutscher via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 2 08:49:57 PDT 2025


yuvald-sweet-security wrote:

> `test_platform_process_launch_gdb_server` is worth looking into.

hm, seems useful. do you think it makes sense to just modify it to run through a symlink, e.g.

```
diff --git a/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py b/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py
index c365bc993e33..ed66f4d6d83b 100644
--- a/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py
+++ b/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py
@@ -39,10 +39,12 @@ class TestPlatformProcessLaunchGDBServer(TestBase):
         ]
 
         # Run lldb-server from a new location.
-        new_lldb_server = self.getBuildArtifact("lldb-server")
+        new_lldb_server = self.getBuildArtifact("bin/lldb-server")
+        new_lldb_server_link = self.getBuildArtifact("lldb-server-with-an-unconventional-name")
         shutil.copy(lldbgdbserverutils.get_lldb_server_exe(), new_lldb_server)
+        os.symlink(new_lldb_server, new_lldb_server_link)
 
-        self.spawnSubprocess(new_lldb_server, commandline_args)
+        self.spawnSubprocess(new_lldb_server_link, commandline_args)
         socket_id = lldbutil.wait_for_file_on_target(self, port_file)
 
         new_platform = lldb.SBPlatform("remote-" + self.getPlatform())
```

or should I duplicate it and create a new test?

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


More information about the lldb-commits mailing list