[Lldb-commits] [PATCH] Skip tests that hang on FreeBSD

Malea, Daniel daniel.malea at intel.com
Tue Jun 25 11:03:11 PDT 2013


The decorator looks great.

As for the pr, does FreeBSD hang in the same way as Linux? Maybe add a few
words about the hang (is it related to the process run lock, or something
else?) and ship it!


Cheers,
Dan

On 2013-06-25 10:15 AM, "Ed Maste" <emaste at freebsd.org> wrote:

>There's still significant work to do in the FreeBSD port, so no point
>in a pr for these yet.
>---
> .../thread/create_after_attach/TestCreateAfterAttach.py   |  2 ++
> test/lldbtest.py                                          | 15
>+++++++++++++++
> 2 files changed, 17 insertions(+)
>
>diff --git 
>a/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
> 
>b/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
>index 082922c..2e2f66d 100644
>--- 
>a/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
>+++ 
>b/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
>@@ -19,6 +19,7 @@ class CreateAfterAttachTestCase(TestBase):
>         self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
>         self.create_after_attach(use_fork=False)
> 
>+    @skipIfFreeBSD # Hangs
>     @skipIfLinux # Hangs, see llvm.org/pr16229
>     @dwarf_test
>     def test_create_after_attach_with_dwarf_and_popen(self):
>@@ -26,6 +27,7 @@ class CreateAfterAttachTestCase(TestBase):
>         self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
>         self.create_after_attach(use_fork=False)
> 
>+    @skipIfFreeBSD # Hangs
>     @dwarf_test
>     def test_create_after_attach_with_dwarf_and_fork(self):
>         """Test thread creation after process attach."""
>diff --git a/test/lldbtest.py b/test/lldbtest.py
>index d2feedf..ba1b1d9 100644
>--- a/test/lldbtest.py
>+++ b/test/lldbtest.py
>@@ -588,6 +588,21 @@ def expectedFailureDarwin(bugnumber=None):
>               return wrapper
>         return expectedFailureDarwin_impl
> 
>+def skipIfFreeBSD(func):
>+    """Decorate the item to skip tests that should be skipped on
>FreeBSD."""
>+    if isinstance(func, type) and issubclass(func, unittest2.TestCase):
>+        raise Exception("@skipIfFreeBSD can only be used to decorate a
>test method")
>+    @wraps(func)
>+    def wrapper(*args, **kwargs):
>+        from unittest2 import case
>+        self = args[0]
>+        platform = sys.platform
>+        if "freebsd" in platform:
>+            self.skipTest("skip on FreeBSD")
>+        else:
>+            func(*args, **kwargs)
>+    return wrapper
>+
> def skipIfLinux(func):
>     """Decorate the item to skip tests that should be skipped on
>Linux."""
>     if isinstance(func, type) and issubclass(func, unittest2.TestCase):
>-- 
>1.7.11.5
>
>_______________________________________________
>lldb-commits mailing list
>lldb-commits at cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits





More information about the lldb-commits mailing list