[all-commits] [llvm/llvm-project] a31130: [lldb][testsuite] Create a SBDebugger instance for...

Tatyana Krasnukha via All-commits all-commits at lists.llvm.org
Wed Mar 4 23:15:43 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a31130f6fcf27518b31a8ac1f5971a42fc24837e
      https://github.com/llvm/llvm-project/commit/a31130f6fcf27518b31a8ac1f5971a42fc24837e
  Author: Tatyana Krasnukha <tatyana at synopsys.com>
  Date:   2020-03-05 (Thu, 05 Mar 2020)

  Changed paths:
    M lldb/bindings/interface/SBPlatform.i
    M lldb/include/lldb/API/SBPlatform.h
    M lldb/packages/Python/lldbsuite/test/decorators.py
    M lldb/packages/Python/lldbsuite/test/dotest.py
    M lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
    M lldb/packages/Python/lldbsuite/test/lldbtest.py
    M lldb/source/API/SBPlatform.cpp
    M lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
    M lldb/test/API/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
    M lldb/test/API/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
    M lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
    M lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
    M lldb/test/API/functionalities/gdb_remote_client/TestWasm.py
    M lldb/test/API/functionalities/gdb_remote_client/TestWriteMemory.py
    M lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py
    M lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
    M lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
    M lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py
    M lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
    M lldb/test/API/functionalities/postmortem/mach-core/TestMachCore.py
    M lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
    M lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
    M lldb/test/API/functionalities/postmortem/netbsd-core/TestNetBSDCore.py
    M lldb/test/API/functionalities/thread/backtrace_all/TestBacktraceAll.py
    M lldb/test/API/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py
    M lldb/test/API/macosx/load-kext/TestLoadKext.py
    M lldb/test/API/python_api/file_handle/TestFileHandle.py
    M lldb/test/API/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py

  Log Message:
  -----------
  [lldb][testsuite] Create a SBDebugger instance for each test

Some tests set settings and don't clean them up, this leads to side effects in other tests.
The patch removes a global debugger instance with a per-test debugger to avoid such effects.

>From what I see, lldb.DBG was needed to determine the platform before a test is run,
lldb.selected_platform is used for this purpose now. Though, this required adding a new function
to the SBPlatform interface.

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




More information about the All-commits mailing list