[all-commits] [llvm/llvm-project] 5a4fe1: [lldb/test] Remove sleeps from some lldb-server tests

Pavel Labath via All-commits all-commits at lists.llvm.org
Wed Feb 9 02:05:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a4fe166d13bf89e6bc387bd96232e8c0f706d27
      https://github.com/llvm/llvm-project/commit/5a4fe166d13bf89e6bc387bd96232e8c0f706d27
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
    M lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
    M lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
    M lldb/test/API/tools/lldb-server/main.cpp

  Log Message:
  -----------
  [lldb/test] Remove sleeps from some lldb-server tests

Instead of using sleeps, have the inferior notify us (via a trap opcode) that
the requested number of threads have been created.

This allows us to get rid of some fairly dodgy test utility code --
wait_for_thread_count seemed like it was waiting for the threads to
appear, but it never actually let the inferior run, so it only succeeded
if the threads were already started when the function was called. Since
the function was called after a fairly small delay (1s, usually), this
is probably the reason why the tests were failing on some bots.

Differential Revision: https://reviews.llvm.org/D119167




More information about the All-commits mailing list