[Lldb-commits] [lldb] 2c2eb5e - [lldb] Enable FreeBSDRemote plugin by default and update test status

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 5 08:50:32 PST 2020


Author: Michał Górny
Date: 2020-11-05T17:49:46+01:00
New Revision: 2c2eb5e6702bf3bbb8fb8f09790b1ab7b139e879

URL: https://github.com/llvm/llvm-project/commit/2c2eb5e6702bf3bbb8fb8f09790b1ab7b139e879
DIFF: https://github.com/llvm/llvm-project/commit/2c2eb5e6702bf3bbb8fb8f09790b1ab7b139e879.diff

LOG: [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

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/dotest.py
    lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
    lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
    lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py
    lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py
    lldb/test/API/commands/expression/formatters/TestFormatters.py
    lldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py
    lldb/test/API/commands/register/register/register_command/TestRegisters.py
    lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
    lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
    lldb/test/API/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
    lldb/test/API/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
    lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
    lldb/test/API/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
    lldb/test/API/functionalities/deleted-executable/TestDeletedExecutable.py
    lldb/test/API/functionalities/exec/TestExec.py
    lldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py
    lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
    lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
    lldb/test/API/functionalities/load_unload/TestLoadUnload.py
    lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
    lldb/test/API/functionalities/longjmp/TestLongjmp.py
    lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
    lldb/test/API/functionalities/signal/TestSendSignal.py
    lldb/test/API/functionalities/signal/raise/TestRaise.py
    lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
    lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
    lldb/test/API/functionalities/thread/state/TestThreadStates.py
    lldb/test/API/lang/c/modules/TestCModules.py
    lldb/test/API/lit.cfg.py
    lldb/test/API/python_api/event/TestEvents.py
    lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
    lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
    lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py
    lldb/test/API/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
    lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
    lldb/test/API/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
    lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test
    lldb/test/Shell/Recognizer/assert.test
    lldb/test/Shell/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index a98965e50c19..420c52a07427 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -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)

diff  --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
index a5ce513aa338..f4d44eb7e745 100644
--- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
+++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
@@ -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 
diff erent 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() {

diff  --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
index d87b01be8fc3..67a18bd8de13 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -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() {

diff  --git a/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py b/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py
index 1b120114f710..60a61fd1afff 100644
--- a/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py
+++ b/lldb/test/API/api/multiple-debuggers/TestMultipleDebuggers.py
@@ -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()}
 

diff  --git a/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py b/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py
index a7e1a8c800cc..87e7386c3dcb 100644
--- a/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py
+++ b/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py
@@ -22,7 +22,6 @@ def setUp(self):
         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")

diff  --git a/lldb/test/API/commands/expression/formatters/TestFormatters.py b/lldb/test/API/commands/expression/formatters/TestFormatters.py
index cd59e529c240..b400c6daa6d0 100644
--- a/lldb/test/API/commands/expression/formatters/TestFormatters.py
+++ b/lldb/test/API/commands/expression/formatters/TestFormatters.py
@@ -21,10 +21,6 @@ def setUp(self):
         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

diff  --git a/lldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py b/lldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py
index 3423ec6e6ab9..7c8f2c1f39f6 100644
--- a/lldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py
+++ b/lldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py
@@ -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):

diff  --git a/lldb/test/API/commands/register/register/register_command/TestRegisters.py b/lldb/test/API/commands/register/register/register_command/TestRegisters.py
index 1712e5884143..88312544250c 100644
--- a/lldb/test/API/commands/register/register/register_command/TestRegisters.py
+++ b/lldb/test/API/commands/register/register/register_command/TestRegisters.py
@@ -28,7 +28,7 @@ def tearDown(self):
 
     @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 @@ def test_fp_register_write(self):
     @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")

diff  --git a/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py b/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
index 3e6329eb91fb..d81c8cce09fa 100644
--- a/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
+++ b/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
@@ -22,6 +22,7 @@ def test_watchpoint_before_thread_start(self):
         """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")

diff  --git a/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py b/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
index 85772582f6bd..f841f7a3d692 100644
--- a/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
+++ b/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
@@ -10,21 +10,12 @@
 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 
diff erently
     # 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 
diff erently
     # here.
     @skipIfWindows
@@ -65,10 +52,6 @@ def do_test(self, commands):
             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 
diff erently
     # here.
     @skipIfWindows

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py b/lldb/test/API/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
index 0318ec96ec91..c6805e450173 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
@@ -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()

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py b/lldb/test/API/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
index 2c7d5b2d0e1c..be40cd783bd5 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
@@ -20,7 +20,6 @@ def setUp(self):
         # 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()

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py b/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
index fc7ffa0e78f3..3a636d079fd5 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
@@ -21,7 +21,6 @@ def setUp(self):
         # 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()

diff  --git a/lldb/test/API/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py b/lldb/test/API/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
index c7391f432f4a..e5b1945d6567 100644
--- a/lldb/test/API/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
+++ b/lldb/test/API/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
@@ -20,7 +20,6 @@ def setUp(self):
         # 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()

diff  --git a/lldb/test/API/functionalities/deleted-executable/TestDeletedExecutable.py b/lldb/test/API/functionalities/deleted-executable/TestDeletedExecutable.py
index c6ab4150a6bf..0aa9bca73851 100644
--- a/lldb/test/API/functionalities/deleted-executable/TestDeletedExecutable.py
+++ b/lldb/test/API/functionalities/deleted-executable/TestDeletedExecutable.py
@@ -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()

diff  --git a/lldb/test/API/functionalities/exec/TestExec.py b/lldb/test/API/functionalities/exec/TestExec.py
index 019df2177137..89ee6409bd84 100644
--- a/lldb/test/API/functionalities/exec/TestExec.py
+++ b/lldb/test/API/functionalities/exec/TestExec.py
@@ -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 @@ def test_hitting_exec (self):
     @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)

diff  --git a/lldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py b/lldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py
index af9f212c7439..5e98e3b028d0 100644
--- a/lldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py
+++ b/lldb/test/API/functionalities/gdb_remote_client/TestProcessConnect.py
@@ -36,6 +36,7 @@ def test_gdb_remote_async(self):
             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 @@ def test_process_connect_sync(self):
             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"""

diff  --git a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
index afb8c2370b36..c9527ec28049 100644
--- a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
+++ b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
@@ -51,9 +51,7 @@ def test_inferior_crashing_step_after_break(self):
 
     # 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()

diff  --git a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
index e63172f917b6..90f14897fc45 100644
--- a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
+++ b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
@@ -27,9 +27,7 @@ def test_recursive_inferior_crashing_step_after_break(self):
 
     # 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()

diff  --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index 538f7b1734ba..05dffc0df734 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -90,11 +90,9 @@ def setSvr4Support(self, enabled):
 
     # 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 
diff erently
-    @expectedFailureNetBSD
     @skipIfReproducer # VFS is a snapshot.
     def test_modules_search_paths(self):
         """Test target modules list after loading a 
diff erent copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'."""
@@ -147,12 +145,10 @@ def test_modules_search_paths(self):
 
     # 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 
diff erently
     @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 @@ def test_dyld_library_path(self):
         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 @@ def test_lldb_process_load_and_unload_commands(self):
         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 @@ def run_lldb_process_load_and_unload_commands(self):
 
         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 @@ def run_load_unload(self):
         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 @@ def run_step_over_load(self):
 
     # 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()

diff  --git a/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py b/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
index 9e10bd3ce833..0ec117222b95 100644
--- a/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
+++ b/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
@@ -36,7 +36,6 @@ def setUp(self):
         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 
diff erently
     @expectedFlakeyNetBSD

diff  --git a/lldb/test/API/functionalities/longjmp/TestLongjmp.py b/lldb/test/API/functionalities/longjmp/TestLongjmp.py
index fa7ffa644322..9e51a98dfc8a 100644
--- a/lldb/test/API/functionalities/longjmp/TestLongjmp.py
+++ b/lldb/test/API/functionalities/longjmp/TestLongjmp.py
@@ -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 @@ def test_step_out(self):
         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 @@ def test_step_over(self):
         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):

diff  --git a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
index 87d1e383831b..364fe58ec720 100644
--- a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
+++ b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
@@ -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 @@ def test_python_os_plugin(self):
         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()

diff  --git a/lldb/test/API/functionalities/signal/TestSendSignal.py b/lldb/test/API/functionalities/signal/TestSendSignal.py
index 663ba615e7ae..759752012aad 100644
--- a/lldb/test/API/functionalities/signal/TestSendSignal.py
+++ b/lldb/test/API/functionalities/signal/TestSendSignal.py
@@ -18,9 +18,6 @@ def setUp(self):
         # 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

diff  --git a/lldb/test/API/functionalities/signal/raise/TestRaise.py b/lldb/test/API/functionalities/signal/raise/TestRaise.py
index 70271e43cff5..207b007e61a4 100644
--- a/lldb/test/API/functionalities/signal/raise/TestRaise.py
+++ b/lldb/test/API/functionalities/signal/raise/TestRaise.py
@@ -24,12 +24,14 @@ def test_sigstop(self):
         # 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)

diff  --git a/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
index 8ad9afe32afe..617751836cf3 100644
--- a/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
+++ b/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
@@ -22,13 +22,13 @@ def setUp(self):
         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))

diff  --git a/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py b/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
index d35bd45fe805..49d6a7d1bd99 100644
--- a/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
+++ b/lldb/test/API/functionalities/thread/exit_during_step/TestExitDuringStep.py
@@ -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 @@ def test(self):
             '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 @@ def test_step_over(self):
             '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."""

diff  --git a/lldb/test/API/functionalities/thread/state/TestThreadStates.py b/lldb/test/API/functionalities/thread/state/TestThreadStates.py
index baae9053dcf9..ad67f7637199 100644
--- a/lldb/test/API/functionalities/thread/state/TestThreadStates.py
+++ b/lldb/test/API/functionalities/thread/state/TestThreadStates.py
@@ -32,7 +32,6 @@ def test_state_after_breakpoint(self):
     @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."""

diff  --git a/lldb/test/API/lang/c/modules/TestCModules.py b/lldb/test/API/lang/c/modules/TestCModules.py
index 7dd073e600f7..c7f0781ecb6e 100644
--- a/lldb/test/API/lang/c/modules/TestCModules.py
+++ b/lldb/test/API/lang/c/modules/TestCModules.py
@@ -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"],

diff  --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 567c118392e2..8f28192eee87 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -258,7 +258,7 @@ def delete_module_cache(path):
 # 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']

diff  --git a/lldb/test/API/python_api/event/TestEvents.py b/lldb/test/API/python_api/event/TestEvents.py
index c8100ca7efab..7d34dcfeb06a 100644
--- a/lldb/test/API/python_api/event/TestEvents.py
+++ b/lldb/test/API/python_api/event/TestEvents.py
@@ -197,12 +197,12 @@ def run(self):
         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."""

diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py b/lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
index d7fd97e693c6..49f895086043 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
@@ -163,7 +163,7 @@ def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_de
         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):

diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index bd656fb01060..b1077879841f 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -434,7 +434,7 @@ def qRegisterInfo_contains_avx_registers(self):
             "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 @@ def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver(
         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 @@ def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver(
         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 @@ def test_Hc_then_Csignal_signals_correct_thread_launch_debugserver(self):
         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 @@ def test_qMemoryRegionInfo_is_supported_debugserver(self):
         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 @@ def test_qMemoryRegionInfo_reports_code_address_as_executable_debugserver(
         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 @@ def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_debugserv
         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 @@ def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_debugserve
         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):

diff  --git a/lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py b/lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py
index 4641b175bca2..51c2966b8c9f 100644
--- a/lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py
+++ b/lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py
@@ -49,7 +49,6 @@ def test_sid_is_same_without_setsid_debugserver(self):
     @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()

diff  --git a/lldb/test/API/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py b/lldb/test/API/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
index 2d9f40500dc8..6cca0e6c50fa 100644
--- a/lldb/test/API/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ b/lldb/test/API/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -106,27 +106,27 @@ def libraries_svr4_libs_present(self):
             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()

diff  --git a/lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py b/lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
index b13bc91d47da..585938121793 100644
--- a/lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
+++ b/lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
@@ -136,7 +136,7 @@ def g_returns_correct_data(self, with_suffix):
         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 @@ def test_g_returns_correct_data_with_suffix_llgs(self):
         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()

diff  --git a/lldb/test/API/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py b/lldb/test/API/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
index 9ec40c117428..c4f08da7099c 100644
--- a/lldb/test/API/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
+++ b/lldb/test/API/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
@@ -29,6 +29,7 @@ def run_and_check_name(self, expected_name):
         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"""

diff  --git a/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test b/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test
index 9deaa86baf8a..b449110c28bd 100644
--- a/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test
+++ b/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test
@@ -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

diff  --git a/lldb/test/Shell/Recognizer/assert.test b/lldb/test/Shell/Recognizer/assert.test
index d3eb9c8da7c9..5241fd104f03 100644
--- a/lldb/test/Shell/Recognizer/assert.test
+++ b/lldb/test/Shell/Recognizer/assert.test
@@ -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

diff  --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 56357c603ae3..7b179c587f71 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -135,4 +135,4 @@ def calculate_arch_features(arch_string):
     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')


        


More information about the lldb-commits mailing list