[lldb] Enable FreeBSDRemote plugin by default and update test status

The new FreeBSDRemote plugin has reached feature parity on i386
and amd64 targets.  Use it by default on these architectures, while
allowing the use of the legacy plugin via FREEBSD_LEGACY_PLUGIN envvar.

Revisit the method of switching plugins.  Apparently, the return value
of PlatformFreeBSD::CanDebugProcess() is what really decides whether
the legacy or the new plugin is used.

Update the test status.  Reenable the tests that were previously
disabled on FreeBSD and do not cause hangs or are irrelevant to FreeBSD.
Mark all tests that fail reliably as expectedFailure.  For now, tests
that are flaky (i.e. produce unstable results) are left enabled
and cause unpredictable test failures.

Differential Revision: https://reviews.llvm.org/D90757
This commit is contained in:
Michał Górny 2020-11-04 10:16:30 +01:00
parent 6ba2c2bf90
commit 2c2eb5e670
40 changed files with 77 additions and 107 deletions

View File

@ -952,8 +952,9 @@ def run_suite():
"netbsd" in target_platform or
"windows" in target_platform)
# Don't do lldb-server (llgs) tests on anything except Linux and Windows.
# Don't do lldb-server (llgs) tests on platforms not supporting it.
configuration.dont_do_llgs_test = not (
"freebsd" in target_platform or
"linux" in target_platform or
"netbsd" in target_platform or
"windows" in target_platform)

View File

@ -27,6 +27,9 @@
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Support/Host.h"
// Define these constants from FreeBSD mman.h for use when targeting remote
// FreeBSD systems even when host has different values.
#define MAP_PRIVATE 0x0002
@ -245,15 +248,25 @@ PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode(Target &target,
}
bool PlatformFreeBSD::CanDebugProcess() {
if (getenv("FREEBSD_REMOTE_PLUGIN")) {
if (IsHost()) {
return true;
} else {
// If we're connected, we can debug.
return IsConnected();
if (IsHost()) {
llvm::Triple host_triple{llvm::sys::getProcessTriple()};
bool use_legacy_plugin;
switch (host_triple.getArch()) {
case llvm::Triple::x86:
case llvm::Triple::x86_64:
// FreeBSDRemote plugin supports x86 only at the moment
use_legacy_plugin = !!getenv("FREEBSD_LEGACY_PLUGIN");
break;
default:
use_legacy_plugin = true;
}
return !use_legacy_plugin;
} else {
// If we're connected, we can debug.
return IsConnected();
}
return false;
}
void PlatformFreeBSD::CalculateTrapHandlerSymbolNames() {

View File

@ -79,14 +79,12 @@ ProcessFreeBSD::CreateInstance(lldb::TargetSP target_sp,
}
void ProcessFreeBSD::Initialize() {
if (!getenv("FREEBSD_REMOTE_PLUGIN")) {
static llvm::once_flag g_once_flag;
static llvm::once_flag g_once_flag;
llvm::call_once(g_once_flag, []() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(), CreateInstance);
});
}
llvm::call_once(g_once_flag, []() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(), CreateInstance);
});
}
lldb_private::ConstString ProcessFreeBSD::GetPluginNameStatic() {

View File

@ -19,7 +19,7 @@ class TestMultipleSimultaneousDebuggers(TestBase):
@skipIfNoSBHeaders
@skipIfWindows
@expectedFailureAll(oslist=['freebsd'])
@expectedFailureAll(oslist=["freebsd"])
def test_multiple_debuggers(self):
env = {self.dylibPath: self.getLLDBLibraryEnvVal()}

View File

@ -22,7 +22,6 @@ class ExprCommandThatRestartsTestCase(TestBase):
self.main_source = "lotta-signals.c"
self.main_source_spec = lldb.SBFileSpec(self.main_source)
@skipIfFreeBSD # llvm.org/pr19246: intermittent failure
@skipIfDarwin # llvm.org/pr19246: intermittent failure
@skipIfWindows # Test relies on signals, unsupported on Windows
@expectedFlakeyAndroid(bugnumber="llvm.org/pr19246")

View File

@ -21,10 +21,6 @@ class ExprFormattersTestCase(TestBase):
self.line = line_number('main.cpp',
'// Stop here')
@skipIfFreeBSD # llvm.org/pr24691 skipping to avoid crashing the test runner
@expectedFailureAll(
oslist=['freebsd'],
bugnumber='llvm.org/pr19011 Newer Clang omits C1 complete object constructor')
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
@skipIfTargetAndroid() # skipping to avoid crashing the test runner
@expectedFailureAndroid('llvm.org/pr24691') # we hit an assertion in clang

View File

@ -15,7 +15,6 @@ class ExprDoesntDeadlockTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17946')
@add_test_categories(["basic_process"])
@skipIfReproducer # Timeouts are not currently modeled.
def test_with_run_command(self):

View File

@ -28,7 +28,7 @@ class RegisterCommandsTestCase(TestBase):
@skipIfiOSSimulator
@skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
def test_register_commands(self):
"""Test commands related to registers, in particular vector registers."""
self.build()
@ -67,7 +67,6 @@ class RegisterCommandsTestCase(TestBase):
@skipIfiOSSimulator
# "register read fstat" always return 0xffff
@expectedFailureAndroid(archs=["i386"])
@skipIfFreeBSD # llvm.org/pr25057
@skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
@skipIfOutOfTreeDebugserver
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")

View File

@ -22,6 +22,7 @@ class WatchpointForMultipleThreadsTestCase(TestBase):
"""Test that we can hit a watchpoint we set before starting another thread"""
self.do_watchpoint_test("Before running the thread")
@expectedFailureAll(oslist=["freebsd"])
def test_watchpoint_after_thread_start(self):
"""Test that we can hit a watchpoint we set after starting another thread"""
self.do_watchpoint_test("After running the thread")

View File

@ -10,21 +10,12 @@ from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
def python_leaky_fd_version(test):
import sys
# Python random module leaks file descriptors on some versions.
if sys.version_info >= (2, 7, 8) and sys.version_info < (2, 7, 10):
return "Python random module leaks file descriptors in this python version"
return None
class AvoidsFdLeakTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
mydir = TestBase.compute_mydir(__file__)
@expectedFailureIfFn(python_leaky_fd_version, "bugs.freebsd.org/197376")
# The check for descriptor leakage needs to be implemented differently
# here.
@skipIfWindows
@ -33,10 +24,6 @@ class AvoidsFdLeakTestCase(TestBase):
def test_fd_leak_basic(self):
self.do_test([])
@expectedFailureIfFn(python_leaky_fd_version, "bugs.freebsd.org/197376")
@expectedFailureAll(
oslist=['freebsd'],
bugnumber="llvm.org/pr25624 still failing with Python 2.7.10")
# The check for descriptor leakage needs to be implemented differently
# here.
@skipIfWindows
@ -65,10 +52,6 @@ class AvoidsFdLeakTestCase(TestBase):
process.GetExitStatus() == 0,
"Process returned non-zero status. Were incorrect file descriptors passed?")
@expectedFailureIfFn(python_leaky_fd_version, "bugs.freebsd.org/197376")
@expectedFailureAll(
oslist=['freebsd'],
bugnumber="llvm.org/pr25624 still failing with Python 2.7.10")
# The check for descriptor leakage needs to be implemented differently
# here.
@skipIfWindows

View File

@ -15,7 +15,6 @@ class PythonSynthDataFormatterTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
def test_with_run_command(self):
"""Test data formatter commands."""
self.build()

View File

@ -20,7 +20,6 @@ class DataFormatterSynthTypeTestCase(TestBase):
# Find the line number to break at.
self.line = line_number('main.cpp', 'break here')
@skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
def test_with_run_command(self):
"""Test using Python synthetic children provider to provide a typename."""
self.build()

View File

@ -21,7 +21,6 @@ class DataFormatterSynthValueTestCase(TestBase):
# Find the line number to break at.
self.line = line_number('main.cpp', 'break here')
@skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
def test_with_run_command(self):
"""Test using Python synthetic children provider to provide a value."""
self.build()

View File

@ -20,7 +20,6 @@ class DataFormatterVarScriptFormatting(TestBase):
# Find the line number to break at.
self.line = line_number('main.cpp', ' // Set breakpoint here.')
@skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
def test_with_run_command(self):
"""Test using Python synthetic children provider."""
self.build()

View File

@ -16,10 +16,9 @@ class TestDeletedExecutable(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@skipIfWindows # cannot delete a running executable
@expectedFailureAll(oslist=["linux"],
@expectedFailureAll(oslist=["freebsd", "linux", "netbsd"],
triple=no_match('aarch64-.*-android'))
# determining the architecture of the process fails
@expectedFailureNetBSD
@skipIfReproducer # File synchronization is not supported during replay.
def test(self):
self.build()

View File

@ -20,6 +20,7 @@ class ExecTestCase(TestBase):
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems
@expectedFailureNetBSD
@skipIfAsan # rdar://problem/43756823
@skipIfFreeBSD # hangs
@skipIfWindows
def test_hitting_exec (self):
self.do_test(False)
@ -28,6 +29,7 @@ class ExecTestCase(TestBase):
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems
@expectedFailureNetBSD
@skipIfAsan # rdar://problem/43756823
@skipIfFreeBSD # hangs
@skipIfWindows
def test_skipping_exec (self):
self.do_test(True)

View File

@ -36,6 +36,7 @@ class TestProcessConnect(GDBRemoteTestBase):
self.dbg.GetSelectedPlatform().DisconnectRemote()
@skipIfWindows
@expectedFailureAll(oslist=["freebsd"])
def test_process_connect_sync(self):
"""Test the gdb-remote command in synchronous mode"""
try:
@ -47,6 +48,7 @@ class TestProcessConnect(GDBRemoteTestBase):
self.dbg.GetSelectedPlatform().DisconnectRemote()
@skipIfWindows
@expectedFailureAll(oslist=["freebsd"])
@skipIfReproducer # Reproducer don't support async.
def test_process_connect_async(self):
"""Test the gdb-remote command in asynchronous mode"""

View File

@ -51,9 +51,7 @@ class CrashingInferiorStepTestCase(TestBase):
# Inferior exits after stepping after a segfault. This is working as
# intended IMHO.
@skipIfLinux
@skipIfFreeBSD
@expectedFailureNetBSD
@skipIf(oslist=["freebsd", "linux", "netbsd"])
def test_inferior_crashing_expr_step_and_expr(self):
"""Test that lldb expressions work before and after stepping after a crash."""
self.build()

View File

@ -27,9 +27,7 @@ class CrashingRecursiveInferiorStepTestCase(TestBase):
# Inferior exits after stepping after a segfault. This is working as
# intended IMHO.
@skipIfLinux
@skipIfFreeBSD
@expectedFailureNetBSD
@skipIf(oslist=["freebsd", "linux", "netbsd"])
def test_recursive_inferior_crashing_expr_step_and_expr(self):
"""Test that lldb expressions work before and after stepping after a crash."""
self.build()

View File

@ -90,11 +90,9 @@ class LoadUnloadTestCase(TestBase):
# libloadunload_d.so does not appear in the image list because executable
# dependencies are resolved relative to the debuggers PWD. Bug?
@expectedFailureAll(oslist=["linux"])
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureAll(oslist=["freebsd", "linux", "netbsd"])
@not_remote_testsuite_ready
@skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
@expectedFailureNetBSD
@skipIfReproducer # VFS is a snapshot.
def test_modules_search_paths(self):
"""Test target modules list after loading a different copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'."""
@ -147,12 +145,10 @@ class LoadUnloadTestCase(TestBase):
# libloadunload_d.so does not appear in the image list because executable
# dependencies are resolved relative to the debuggers PWD. Bug?
@expectedFailureAll(oslist=["linux"])
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureAll(oslist=["freebsd", "linux", "netbsd"])
@expectedFailureAndroid # wrong source file shows up for hidden library
@skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
@skipIfDarwinEmbedded
@expectedFailureNetBSD
def test_dyld_library_path(self):
"""Test (DY)LD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else."""
self.copy_shlibs_to_remote(hidden_dir=True)
@ -207,7 +203,6 @@ class LoadUnloadTestCase(TestBase):
bugnumber="llvm.org/pr25805",
hostoslist=["windows"],
triple='.*-android')
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureAll(oslist=["windows"]) # process load not implemented
def test_lldb_process_load_and_unload_commands(self):
self.setSvr4Support(False)
@ -217,7 +212,6 @@ class LoadUnloadTestCase(TestBase):
bugnumber="llvm.org/pr25805",
hostoslist=["windows"],
triple='.*-android')
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureAll(oslist=["windows"]) # process load not implemented
def test_lldb_process_load_and_unload_commands_with_svr4(self):
self.setSvr4Support(True)
@ -294,13 +288,11 @@ class LoadUnloadTestCase(TestBase):
self.runCmd("process continue")
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureAll(oslist=["windows"]) # breakpoint not hit
def test_load_unload(self):
self.setSvr4Support(False)
self.run_load_unload()
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureAll(oslist=["windows"]) # breakpoint not hit
def test_load_unload_with_svr4(self):
self.setSvr4Support(True)
@ -344,12 +336,10 @@ class LoadUnloadTestCase(TestBase):
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs=[' resolved, hit count = 2'])
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
def test_step_over_load(self):
self.setSvr4Support(False)
self.run_step_over_load()
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
def test_step_over_load_with_svr4(self):
self.setSvr4Support(True)
self.run_step_over_load()
@ -383,9 +373,7 @@ class LoadUnloadTestCase(TestBase):
# We can't find a breakpoint location for d_init before launching because
# executable dependencies are resolved relative to the debuggers PWD. Bug?
@expectedFailureAll(oslist=["linux"], triple=no_match('aarch64-.*-android'))
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "linux", "netbsd"], triple=no_match('aarch64-.*-android'))
def test_static_init_during_load(self):
"""Test that we can set breakpoints correctly in static initializers"""
self.copy_shlibs_to_remote()

View File

@ -36,7 +36,6 @@ class LoadUsingPathsTestCase(TestBase):
self.hidden_dir = os.path.join(self.wd, 'hidden')
self.hidden_lib = os.path.join(self.hidden_dir, self.lib_name)
@skipIfFreeBSD # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
@not_remote_testsuite_ready
@skipIfWindows # Windows doesn't have dlopen and friends, dynamic libraries work differently
@expectedFlakeyNetBSD

View File

@ -15,8 +15,7 @@ class LongjmpTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
@expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["freebsd", "linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
@expectedFlakeyNetBSD
def test_step_out(self):
@ -25,8 +24,7 @@ class LongjmpTestCase(TestBase):
self.step_out()
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
@expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["freebsd", "linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
@skipIfNetBSD
def test_step_over(self):
@ -35,8 +33,7 @@ class LongjmpTestCase(TestBase):
self.step_over()
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
@expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["freebsd", "linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
@expectedFlakeyNetBSD
def test_step_back_out(self):

View File

@ -19,6 +19,7 @@ class TestOSPluginStepping(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@skipIfWindows
@skipIfFreeBSD # hangs
def test_python_os_plugin(self):
"""Test that stepping works when the OS Plugin doesn't report all
threads at every stop"""
@ -27,6 +28,7 @@ class TestOSPluginStepping(TestBase):
self.run_python_os_step_missing_thread(False)
@skipIfWindows
@skipIfFreeBSD # hangs
def test_python_os_plugin_prune(self):
"""Test that pruning the unreported PlanStacks works"""
self.build()

View File

@ -18,9 +18,6 @@ class SendSignalTestCase(TestBase):
# Find the line number to break inside main().
self.line = line_number('main.c', 'Put breakpoint here')
@expectedFailureAll(
oslist=['freebsd'],
bugnumber="llvm.org/pr23318: does not report running state")
@expectedFailureNetBSD(bugnumber='llvm.org/pr43959')
@skipIfWindows # Windows does not support signals
@skipIfReproducer # FIXME: Unexpected packet during (active) replay

View File

@ -24,12 +24,14 @@ class RaiseTestCase(TestBase):
# scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
@skipIfDarwin # darwin does not support real time signals
@skipIfFreeBSD # hangs
@skipIfTargetAndroid()
def test_sigsigrtmin(self):
self.build()
self.signal_test('SIGRTMIN', True)
@skipIfNetBSD # Hangs on NetBSD
@skipIfFreeBSD # hangs
def test_sigtrap(self):
self.build()
self.signal_test('SIGTRAP', True)

View File

@ -22,13 +22,13 @@ class CreateAfterAttachTestCase(TestBase):
self.break_2 = line_number('main.cpp', '// Set second breakpoint here')
self.break_3 = line_number('main.cpp', '// Set third breakpoint here')
@skipIfFreeBSD # Hangs. May be the same as Linux issue llvm.org/pr16229 but
# not yet investigated. Revisit once required functionality
# is implemented for FreeBSD.
# Occasionally hangs on Windows, may be same as other issues.
@skipIfWindows
@skipIfiOSSimulator
@expectedFailureNetBSD
# FreeBSD: Hangs. May be the same as Linux issue llvm.org/pr16229
# but not yet investigated. Revisit once required functionality is
# implemented for FreeBSD.
@expectedFailureAll(oslist=["freebsd", "netbsd"])
def test_create_after_attach(self):
"""Test thread creation after process attach."""
self.build(dictionary=self.getBuildFlags(use_cpp11=False))

View File

@ -14,7 +14,6 @@ class ExitDuringStepTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIfFreeBSD # llvm.org/pr21411: test is hanging
@skipIfWindows # This is flakey on Windows: llvm.org/pr38373
def test(self):
"""Test thread exit during step handling."""
@ -24,7 +23,6 @@ class ExitDuringStepTestCase(TestBase):
'stop reason = instruction step',
True)
@skipIfFreeBSD # llvm.org/pr21411: test is hanging
@skipIfWindows # This is flakey on Windows: llvm.org/pr38373
def test_step_over(self):
"""Test thread exit during step-over handling."""
@ -34,7 +32,6 @@ class ExitDuringStepTestCase(TestBase):
'stop reason = step over',
False)
@skipIfFreeBSD # llvm.org/pr21411: test is hanging
@skipIfWindows # This is flakey on Windows: llvm.org/pr38373
def test_step_in(self):
"""Test thread exit during step-in handling."""

View File

@ -32,7 +32,6 @@ class ThreadStateTestCase(TestBase):
@expectedFailureAll(
oslist=lldbplatformutil.getDarwinOSTriples(),
bugnumber="llvm.org/pr23669")
@expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr15824")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24660")
def test_state_after_continue(self):
"""Test thread state after continue."""

View File

@ -14,9 +14,8 @@ class CModulesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIfFreeBSD
@expectedFailureAll(
oslist=["linux"],
oslist=["freebsd", "linux"],
bugnumber="http://llvm.org/pr23456 'fopen' has unknown return type")
@expectedFailureAll(
oslist=["windows"],

View File

@ -258,7 +258,7 @@ import lldbtest
# testFormat: The test format to use to interpret tests.
config.test_format = lldbtest.LLDBTest(dotest_cmd)
# Propagate FREEBSD_REMOTE_PLUGIN
if 'FREEBSD_REMOTE_PLUGIN' in os.environ:
config.environment['FREEBSD_REMOTE_PLUGIN'] = os.environ[
'FREEBSD_REMOTE_PLUGIN']
# Propagate FREEBSD_LEGACY_PLUGIN
if 'FREEBSD_LEGACY_PLUGIN' in os.environ:
config.environment['FREEBSD_LEGACY_PLUGIN'] = os.environ[
'FREEBSD_LEGACY_PLUGIN']

View File

@ -197,12 +197,12 @@ class EventAPITestCase(TestBase):
self.assertTrue(event,
"My listening thread successfully received an event")
@skipIfFreeBSD # llvm.org/pr21325
@add_test_categories(['pyapi'])
@expectedFailureAll(
oslist=["linux"],
bugnumber="llvm.org/pr23617 Flaky, fails ~1/10 cases")
@skipIfWindows # This is flakey on Windows AND when it fails, it hangs: llvm.org/pr38373
@expectedFailureAll(oslist=["freebsd"])
@expectedFlakeyNetBSD
def test_add_listener_to_broadcaster(self):
"""Exercise some SBBroadcaster APIs."""

View File

@ -163,7 +163,7 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
self.THREAD_COUNT)
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_llgs(
self):

View File

@ -434,7 +434,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
"Advanced Vector Extensions" in register_sets)
@expectedFailureAll(oslist=["windows"]) # no avx for now.
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_qRegisterInfo_contains_avx_registers_llgs(self):
self.init_llgs_test()
@ -604,7 +604,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.set_inferior_startup_launch()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(
self):
@ -622,7 +622,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.set_inferior_startup_attach()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(
self):
@ -819,7 +819,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.Hc_then_Csignal_signals_correct_thread(self.TARGET_EXC_BAD_ACCESS)
@skipIfWindows # no SIGSEGV support
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_Hc_then_Csignal_signals_correct_thread_launch_llgs(self):
self.init_llgs_test()
@ -916,6 +916,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.qMemoryRegionInfo_is_supported()
@llgs_test
@expectedFailureAll(oslist=["freebsd"])
def test_qMemoryRegionInfo_is_supported_llgs(self):
self.init_llgs_test()
self.build()
@ -980,6 +981,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.qMemoryRegionInfo_reports_code_address_as_executable()
@skipIfWindows # No pty support to test any inferior output
@expectedFailureAll(oslist=["freebsd"])
@llgs_test
def test_qMemoryRegionInfo_reports_code_address_as_executable_llgs(self):
self.init_llgs_test()
@ -1046,6 +1048,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
@skipIfWindows # No pty support to test any inferior output
@expectedFailureAll(oslist=["freebsd"])
@llgs_test
def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_llgs(
self):
@ -1112,6 +1115,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
@skipIfWindows # No pty support to test any inferior output
@expectedFailureAll(oslist=["freebsd"])
@llgs_test
def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_llgs(
self):

View File

@ -49,7 +49,6 @@ class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipIfWindows
@llgs_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
@expectedFailureAll(oslist=['freebsd'])
def test_sid_is_same_without_setsid_llgs(self):
self.init_llgs_test()
self.set_inferior_startup_launch()

View File

@ -106,27 +106,27 @@ class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase
self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), libraries_svr4_names)
@llgs_test
@skipUnlessPlatform(["linux", "android", "netbsd"])
@skipUnlessPlatform(["linux", "android", "freebsd", "netbsd"])
def test_supports_libraries_svr4(self):
self.setup_test()
self.assertTrue(self.has_libraries_svr4_support())
@llgs_test
@skipUnlessPlatform(["linux", "android", "netbsd"])
@skipUnlessPlatform(["linux", "android", "freebsd", "netbsd"])
@expectedFailureNetBSD
def test_libraries_svr4_well_formed(self):
self.setup_test()
self.libraries_svr4_well_formed()
@llgs_test
@skipUnlessPlatform(["linux", "android", "netbsd"])
@expectedFailureNetBSD
@skipUnlessPlatform(["linux", "android", "freebsd", "netbsd"])
@expectedFailureAll(oslist=["freebsd", "netbsd"])
def test_libraries_svr4_load_addr(self):
self.setup_test()
self.libraries_svr4_has_correct_load_addr()
@llgs_test
@skipUnlessPlatform(["linux", "android", "netbsd"])
@skipUnlessPlatform(["linux", "android", "freebsd", "netbsd"])
@expectedFailureNetBSD
def test_libraries_svr4_libs_present(self):
self.setup_test()

View File

@ -136,7 +136,7 @@ class TestGdbRemoteGPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
self.assertEqual(
['0x727476787a7c7e71', '0x737577797b7d7f70'], get_reg_value('xmm15'))
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_g_returns_correct_data_with_suffix_llgs(self):
self.init_llgs_test()
@ -144,7 +144,7 @@ class TestGdbRemoteGPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
self.set_inferior_startup_launch()
self.g_returns_correct_data(True)
@expectedFailureNetBSD
@expectedFailureAll(oslist=["freebsd", "netbsd"])
@llgs_test
def test_g_returns_correct_data_no_suffix_llgs(self):
self.init_llgs_test()

View File

@ -29,6 +29,7 @@ class TestGdbRemoteThreadName(gdbremote_testcase.GdbRemoteTestCaseBase):
self.assertEqual(expected_name, kv_dict.get("name"))
@skipIfWindows # the test is not updated for Windows.
@expectedFailureAll(oslist=["freebsd"])
@llgs_test
def test(self):
""" Make sure lldb-server can retrieve inferior thread name"""

View File

@ -3,6 +3,7 @@
# RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-NO-FILTER %s
# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \
# RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FILTER %s
# XFAIL: system-freebsd
# XFAIL: system-netbsd
# UNSUPPORTED: system-windows
# This test is flakey and hangs on windows periodically: llvm.org/pr38373

View File

@ -1,4 +1,5 @@
# XFAIL: target-arm && linux-gnu
# XFAIL: system-freebsd
# UNSUPPORTED: system-windows
# RUN: %clang_host -g -O0 %S/Inputs/assert.c -o %t.out
# RUN: %lldb -b -s %s %t.out | FileCheck %s

View File

@ -135,4 +135,4 @@ if can_set_dbregs:
config.available_features.add('dbregs-set')
# pass control variable through
llvm_config.with_system_environment('FREEBSD_REMOTE_PLUGIN')
llvm_config.with_system_environment('FREEBSD_LEGACY_PLUGIN')