Fix GDBRemoteCommunicationClientTest.TestPacketSpeedJSON

The mock server was listening for only one packet (I forgot to put a loop around
it), which caused the client to stall in debug builds, as the timeout there is
1000 seconds. In case of a release builds the test would just silently succeed as
the tested function does not check or report errors (which should be fixed).

This fixes the test by adding the server loop. Since the test was taking quite a
long time now (8s), I have added a parameter to control the amount of data sent
(default 4MB), and call it with a smaller value in the test, to make the test run
faster.

llvm-svn: 285992
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index 9e89544..83162a6 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -323,7 +323,8 @@
   bool SetNonStopMode(const bool enable);
 
   void TestPacketSpeed(const uint32_t num_packets, uint32_t max_send,
-                       uint32_t max_recv, bool json, Stream &strm);
+                       uint32_t max_recv, uint64_t recv_amount, bool json,
+                       Stream &strm);
 
   // This packet is for testing the speed of the interface only. Both
   // the client and server need to support it, but this allows us to