summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py38
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py28
2 files changed, 2 insertions, 64 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
deleted file mode 100644
index 03d29c57a5a..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
+++ /dev/null
@@ -1,38 +0,0 @@
-import lldb
-import binascii
-import os
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestPlatformClient(GDBRemoteTestBase):
-
- def test_process_list(self):
- """Test connecting to a remote linux platform"""
-
- class MyResponder(MockGDBServerResponder):
- def qfProcessInfo(self, packet):
- if "all_users:1" in packet:
- return "pid:10;ppid:1;uid:2;gid:3;euid:4;egid:5;name:" + binascii.hexlify("/a/process") + ";args:"
- else:
- return "E04"
-
- self.server.responder = MyResponder()
-
- self.runCmd("platform select remote-linux")
-
- try:
- self.runCmd("platform connect connect://localhost:%d" %
- self.server.port)
- self.assertTrue(self.dbg.GetSelectedPlatform().IsConnected())
- self.expect("platform process list -x",
- startstr="1 matching process was found", endstr="process" + os.linesep)
- self.expect("platform process list -xv",
- substrs=[
- "PID PARENT USER GROUP EFF USER EFF GROUP",
- "10 1 2 3 4 5"])
- self.expect("platform process list",
- error="error: no processes were found on the \"remote-linux\" platform")
- finally:
- self.runCmd("platform disconnect")
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
index 73c698d1e3e..fad41f8a83a 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
@@ -160,34 +160,9 @@ class MockGDBServerResponder:
return self.QListThreadsInStopReply()
if packet.startswith("qMemoryRegionInfo:"):
return self.qMemoryRegionInfo()
- if packet == "qQueryGDBServer":
- return self.qQueryGDBServer()
- if packet == "qHostInfo":
- return self.qHostInfo()
- if packet == "qGetWorkingDir":
- return self.qGetWorkingDir()
- if packet == "qsProcessInfo":
- return self.qsProcessInfo()
- if packet.startswith("qfProcessInfo"):
- return self.qfProcessInfo(packet)
return self.other(packet)
- def qsProcessInfo(self):
- return "E04"
-
- def qfProcessInfo(self, packet):
- raise "E04"
-
- def qGetWorkingDir(self):
- return "2f"
-
- def qHostInfo(self):
- return "ptrsize:8;endian:little;"
-
- def qQueryGDBServer(self):
- return "E04"
-
def interrupt(self):
raise self.UnexpectedPacketException()
@@ -196,7 +171,7 @@ class MockGDBServerResponder:
def vCont(self, packet):
raise self.UnexpectedPacketException()
-
+
def readRegisters(self):
return "00000000" * self.registerCount
@@ -450,6 +425,7 @@ class MockGDBServer:
class InvalidPacketException(Exception):
pass
+
class GDBRemoteTestBase(TestBase):
"""
Base class for GDB client tests.
OpenPOWER on IntegriCloud