diff options
author | Walter Erquinigo <a20012251@gmail.com> | 2019-10-12 02:31:22 +0000 |
---|---|---|
committer | Walter Erquinigo <a20012251@gmail.com> | 2019-10-12 02:31:22 +0000 |
commit | 0f22955899870607cf868b3c4a57f60efd8df02c (patch) | |
tree | ceb2756d1e41721884aa2508aaa714f32a4e8c39 /lldb/packages/Python/lldbsuite | |
parent | 23aa2aec78181fa064191b8f3c1c5b3ffa1c9424 (diff) | |
download | bcm5719-llvm-0f22955899870607cf868b3c4a57f60efd8df02c.tar.gz bcm5719-llvm-0f22955899870607cf868b3c4a57f60efd8df02c.zip |
Revert "[platform process list] add a flag for showing the processes of all users"
This reverts commit f670a5edfc70066872e1795d650ed6e1ac62b6a8.
llvm-svn: 374630
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
2 files changed, 2 insertions, 69 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 b0c80b5438b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py +++ /dev/null @@ -1,39 +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_with_all_users(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:1;gid:1;euid:1;egid:1;name:" + binascii.hexlify("/a/test_process").decode() + ";" - else: - return "E04" - - self.server.responder = MyResponder() - - self.runCmd("log enable gdb-remote all") - self.runCmd("platform select remote-linux") - - try: - url = "connect://localhost:%d" % self.server.port - - # self.gdb.GetSelectedPlatform().ConnectRemote(lldb.SBPlatformConnectOptions(url)) - self.runCmd("platform connect connect://localhost:%d" % - self.server.port) - self.assertTrue(self.dbg.GetSelectedPlatform().IsConnected()) - self.expect("platform process list -x", - substrs=["1 matching process was found", "test_process"]) - self.expect("platform process list", - error=True, - substrs=["error: no processes were found on the \"remote-linux\" platform"]) - finally: - self.dbg.GetSelectedPlatform().DisconnectRemote() 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 8237d1e0712..621279a0a99 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 @@ -3,8 +3,6 @@ import os.path import threading import socket import lldb -import binascii -import traceback from lldbsuite.support import seven from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbtest_config @@ -162,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): - return "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() @@ -198,7 +171,7 @@ class MockGDBServerResponder: def vCont(self, packet): raise self.UnexpectedPacketException() - + def readRegisters(self): return "00000000" * self.registerCount @@ -342,8 +315,6 @@ class MockGDBServer: break self._receive(data) except Exception as e: - print("An exception happened when receiving the response from the gdb server. Closing the client...") - traceback.print_exc() self._client.close() break @@ -454,6 +425,7 @@ class MockGDBServer: class InvalidPacketException(Exception): pass + class GDBRemoteTestBase(TestBase): """ Base class for GDB client tests. |