summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py')
-rw-r--r--packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py36
1 files changed, 31 insertions, 5 deletions
diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
index f26b62043613d..21af255cfd943 100644
--- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
+++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
@@ -9,6 +9,7 @@ from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
mydir = TestBase.compute_mydir(__file__)
@@ -52,7 +53,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
self.add_process_info_collection_packets()
# Run the stream
- context = self.expect_gdbremote_sequence(timeout_seconds = 8)
+ context = self.expect_gdbremote_sequence(timeout_seconds=8)
self.assertIsNotNone(context)
# Gather process info response
@@ -66,7 +67,8 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
self.assertEqual(reported_pid, procs["inferior"].pid)
@debugserver_test
- def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver(self):
+ def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver(
+ self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach()
@@ -120,13 +122,17 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
process_info = self.parse_process_info_response(context)
self.assertIsNotNone(process_info)
- # Ensure the expected keys are present and non-None within the process info.
+ # Ensure the expected keys are present and non-None within the process
+ # info.
missing_key_set = set()
for expected_key in expected_key_set:
if expected_key not in process_info:
missing_key_set.add(expected_key)
- self.assertEqual(missing_key_set, set(), "the listed keys are missing in the qProcessInfo result")
+ self.assertEqual(
+ missing_key_set,
+ set(),
+ "the listed keys are missing in the qProcessInfo result")
def qProcessInfo_does_not_contain_keys(self, absent_key_set):
procs = self.prep_debug_monitor_and_inferior()
@@ -146,7 +152,10 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
if unexpected_key in process_info:
unexpected_key_set.add(unexpected_key)
- self.assertEqual(unexpected_key_set, set(), "the listed keys were present but unexpected in qProcessInfo result")
+ self.assertEqual(
+ unexpected_key_set,
+ set(),
+ "the listed keys were present but unexpected in qProcessInfo result")
@skipUnlessDarwin
@debugserver_test
@@ -155,6 +164,13 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
self.build()
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
+ @skipUnlessDarwin
+ @llgs_test
+ def test_qProcessInfo_contains_cputype_cpusubtype_llgs_darwin(self):
+ self.init_llgs_test()
+ self.build()
+ self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
+
@skipUnlessPlatform(["linux"])
@llgs_test
def test_qProcessInfo_contains_triple_llgs_linux(self):
@@ -172,6 +188,16 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
# for the remote Host and Process.
self.qProcessInfo_does_not_contain_keys(set(['triple']))
+ @skipUnlessDarwin
+ @llgs_test
+ def test_qProcessInfo_does_not_contain_triple_llgs_darwin(self):
+ self.init_llgs_test()
+ self.build()
+ # We don't expect to see triple on darwin. If we do, we'll prefer triple
+ # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup
+ # for the remote Host and Process.
+ self.qProcessInfo_does_not_contain_keys(set(['triple']))
+
@skipUnlessPlatform(["linux"])
@llgs_test
def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs_linux(self):