[Lldb-commits] [lldb] [llvm] [lldb-dap] Add unknown request handler (PR #181109)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 12 09:32:16 PST 2026
================
@@ -0,0 +1,36 @@
+"""
+Test lldb-dap custom request.
+"""
+
+from lldbsuite.test.decorators import expectedFailureWindows
+import lldbdap_testcase
+
+
+class TestDAP_unknown_request(lldbdap_testcase.DAPTestCaseBase):
+ """
+ Tests handling of unknown request.
+ """
+
+ def test_no_arguments(self):
+ program = self.getBuildArtifact("a.out")
+ self.build_and_launch(program, stopOnEntry=True)
+ self.dap_server.request_configurationDone()
+ self.dap_server.wait_for_stopped()
+
+ response = self.dap_server.request_custom("unknown")
+ self.assertFalse(response["success"])
+ self.assertEqual(response["body"]["error"]["format"], "Unknown request")
----------------
ashgti wrote:
Should we include the command name in the error? Like `Unsupported request: unknown`?
https://github.com/llvm/llvm-project/pull/181109
More information about the lldb-commits
mailing list