aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2021-04-09 00:59:22 +0200
committerMichał Górny <mgorny@moritz.systems>2021-04-24 11:08:33 +0200
commit312257688eb0c09a8e6915ced2acdf0bcbbad353 (patch)
tree5629d070038092574b0522b8065d97de4335b81b /lldb/packages/Python/lldbsuite/test
parenta7b7e7b1877d7968414396719ce78473e8fd9755 (diff)
downloadllvm-312257688eb0c09a8e6915ced2acdf0bcbbad353.zip
llvm-312257688eb0c09a8e6915ced2acdf0bcbbad353.tar.gz
llvm-312257688eb0c09a8e6915ced2acdf0bcbbad353.tar.bz2
[lldb] [Process] Introduce protocol extension support API
Introduce a NativeProcessProtocol API for indicating support for protocol extensions and enabling them. LLGS calls GetSupportedExtensions() method on the process factory to determine which extensions are supported by the plugin. If the future is both supported by the plugin and reported as supported by the client, LLGS enables it and reports to the client as supported by the server. The extension is enabled on the process instance by calling SetEnabledExtensions() method. This is done after qSupported exchange (if the debugger is attached to any process), as well as after launching or attaching to a new inferior. The patch adds 'fork' extension corresponding to 'fork-events+' qSupported feature and 'vfork' extension for 'vfork-events+'. Both features rely on 'multiprocess+' being supported as well. Differential Revision: https://reviews.llvm.org/D100153
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py10
-rw-r--r--lldb/packages/Python/lldbsuite/test/test_categories.py1
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py7
3 files changed, 16 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 39e130a..79f839f 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -858,6 +858,15 @@ def checkDebugServerSupport():
if configuration.verbose:
print(skip_msg%"lldb-server");
+
+def checkForkVForkSupport():
+ from lldbsuite.test import lldbplatformutil
+
+ platform = lldbplatformutil.getPlatform()
+ if platform not in []:
+ configuration.skip_categories.append("fork")
+
+
def run_suite():
# On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
# does not exist before proceeding to running the test suite.
@@ -954,6 +963,7 @@ def run_suite():
checkDebugInfoSupport()
checkDebugServerSupport()
checkObjcSupport()
+ checkForkVForkSupport()
print("Skipping the following test categories: {}".format(configuration.skip_categories))
diff --git a/lldb/packages/Python/lldbsuite/test/test_categories.py b/lldb/packages/Python/lldbsuite/test/test_categories.py
index 9f1196e..e550d55 100644
--- a/lldb/packages/Python/lldbsuite/test/test_categories.py
+++ b/lldb/packages/Python/lldbsuite/test/test_categories.py
@@ -30,6 +30,7 @@ all_categories = {
'dyntype': 'Tests related to dynamic type support',
'expression': 'Tests related to the expression parser',
'flakey': 'Flakey test cases, i.e. tests that do not reliably pass at each execution',
+ 'fork': 'Tests requiring the process plugin fork/vfork event support',
'gmodules': 'Tests that can be run with -gmodules debug information',
'instrumentation-runtime': 'Tests for the instrumentation runtime plugins',
'libc++': 'Test for libc++ data formatters',
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index 5451877a..9c70a55 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -835,9 +835,10 @@ class GdbRemoteTestCaseBase(Base):
"send packet: $OK#00",
], True)
- def add_qSupported_packets(self):
+ def add_qSupported_packets(self, client_features=[]):
+ features = ''.join(';' + x for x in client_features)
self.test_sequence.add_log_lines(
- ["read packet: $qSupported#00",
+ ["read packet: $qSupported{}#00".format(features),
{"direction": "send", "regex": r"^\$(.*)#[0-9a-fA-F]{2}", "capture": {1: "qSupported_response"}},
], True)
@@ -854,6 +855,8 @@ class GdbRemoteTestCaseBase(Base):
"qEcho",
"QPassSignals",
"multiprocess",
+ "fork-events",
+ "vfork-events",
]
def parse_qSupported_response(self, context):