Skip to content

Commit 42150df

Browse files
committed
Add test
1 parent 8ffabe8 commit 42150df

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

lldb/source/Commands/CommandObjectProtocolServer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class CommandObjectProtocolServerStart : public CommandObjectParsed {
9393
result.AppendMessageWithFormatv(
9494
"{0} server started with connection listeners: {1}", protocol,
9595
address);
96+
result.SetStatus(eReturnStatusSuccessFinishNoResult);
9697
}
9798
}
9899
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
import tempfile
3+
4+
from lldbsuite.test.decorators import *
5+
from lldbsuite.test.lldbtest import *
6+
7+
8+
class MCPUnixSocketCommandTestCase(TestBase):
9+
@skipIfWindows
10+
@no_debug_info_test
11+
def test_unix_socket(self):
12+
"""
13+
Test if we can start an MCP protocol-server accepting unix sockets
14+
"""
15+
16+
temp_directory = tempfile.TemporaryDirectory()
17+
socket_file = os.path.join(temp_directory.name, "mcp.sock")
18+
19+
self.expect(
20+
f"protocol-server start MCP accept://{socket_file}",
21+
startstr="MCP server started with connection listeners:",
22+
substrs=[f"unix-connect://{socket_file}"],
23+
)

0 commit comments

Comments
 (0)