[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 4 00:48:18 PDT 2025
================
@@ -58,3 +59,45 @@ def test_platform_process_launch_gdb_server(self):
self.runCmd("target create {}".format(self.getBuildArtifact("a.out")))
self.expect("run", substrs=["unable to launch a GDB server on"], error=True)
+
+ @skipIfRemote
+ @skipUnlessPlatform(["linux"])
+ @add_test_categories(["lldb-server"])
+ def test_lldb_server_weird_symlinks(self):
+ self.build()
+
+ hostname = socket.getaddrinfo("localhost", 0, proto=socket.IPPROTO_TCP)[0][4][0]
+ listen_url = "[%s]:0" % hostname
+
+ port_file = self.getBuildArtifact("port")
+ commandline_args = [
+ "platform",
+ "--listen",
+ listen_url,
+ "--socket-file",
+ port_file,
+ ]
+
+ # Run lldb-server from a symlink without any binary called "lldb-server" in the directory.
+ llgs_hiding_directory = self.getBuildArtifact("hiding-directory")
+ new_lldb_server_link = self.getBuildArtifact(
+ "lldb-server-with-an-unconventional-name"
+ )
+ new_lldb_server = os.path.join(llgs_hiding_directory, "lldb-server")
+ os.makedirs(llgs_hiding_directory)
+ shutil.copy(lldbgdbserverutils.get_lldb_server_exe(), new_lldb_server)
----------------
labath wrote:
Do you need to make the copy if you're not going to delete it?
https://github.com/llvm/llvm-project/pull/131609
More information about the lldb-commits
mailing list