[all-commits] [llvm/llvm-project] ce279e: [lldb/test] Simplify TestGdbRemoteExitCode.py

Pavel Labath via All-commits all-commits at lists.llvm.org
Mon Dec 7 00:29:03 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ce279e0c80eb3af913bc2cd08c2bcf4632252675
      https://github.com/llvm/llvm-project/commit/ce279e0c80eb3af913bc2cd08c2bcf4632252675
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py

  Log Message:
  -----------
  [lldb/test] Simplify TestGdbRemoteExitCode.py

Reuse the existing code to launch a debug server + inferior.


  Commit: 174b09e9153894903c13bd4f40c6dab07b2558ba
      https://github.com/llvm/llvm-project/commit/174b09e9153894903c13bd4f40c6dab07b2558ba
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

  Log Message:
  -----------
  [lldb/test] Simplify TestLldbGdbServer.py

Reuse existing code to start server+inferior.


  Commit: a2f4f7daf76c767efd668390bc7f8b99bdb1218c
      https://github.com/llvm/llvm-project/commit/a2f4f7daf76c767efd668390bc7f8b99bdb1218c
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
    M lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
    R lldb/packages/Python/lldbsuite/test/tools/lldb-server/socket_packet_pump.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteCompletion.py

  Log Message:
  -----------
  [lldb/test] Refactor socket_packet_pump

Now that the class does not use a thread, the name is no longer
appropriate. Rename the class to "Server" and make it a long-lived
object (instead of recreating it for every expect_gdbremote_sequence
call). The idea is to make this class a wrapper for all communication
with debug/lldb-server. This will enable some additional cleanups as we
had some duplication between socket_pump non-pump code paths.

Also squeeze in some small improvements:
- use python-level timeouts on sockets instead of the manual select
  calls
- use byte arrays instead of strings when working with raw packets


Compare: https://github.com/llvm/llvm-project/compare/78a57069b53a...a2f4f7daf76c


More information about the All-commits mailing list