summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorWalter Erquinigo <a20012251@gmail.com>2019-10-12 02:01:33 +0000
committerWalter Erquinigo <a20012251@gmail.com>2019-10-12 02:01:33 +0000
commit892482eb9cb377a66e03b73f273fe9af8cfab75a (patch)
tree8560938a226f3f4b226c6b9bac5b4151359b8b4c /lldb/packages/Python/lldbsuite
parente3250b0c400cacf66978a180fe3fab9f73f1afd7 (diff)
downloadbcm5719-llvm-892482eb9cb377a66e03b73f273fe9af8cfab75a.tar.gz
bcm5719-llvm-892482eb9cb377a66e03b73f273fe9af8cfab75a.zip
Revert "[platform process list] add a flag for showing the processes of all users"
This reverts commit 90d0de4999354a5223f08ad714222b0a5dca3cad. llvm-svn: 374625
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py27
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py35
2 files changed, 2 insertions, 60 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 338d27dfd44..00000000000
--- a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
+++ /dev/null
@@ -1,27 +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"""
-
- self.runCmd("log enable gdb-remote all")
- 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",
- 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 94129c00e18..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,37 +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):
- 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") + ";"
- else:
- 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()
@@ -201,7 +171,7 @@ class MockGDBServerResponder:
def vCont(self, packet):
raise self.UnexpectedPacketException()
-
+
def readRegisters(self):
return "00000000" * self.registerCount
@@ -345,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
@@ -457,6 +425,7 @@ class MockGDBServer:
class InvalidPacketException(Exception):
pass
+
class GDBRemoteTestBase(TestBase):
"""
Base class for GDB client tests.
OpenPOWER on IntegriCloud