[Lldb-commits] [PATCH] [lldb] Add @skipIfAddressSanitizerUnsupported test decorator

Doug Snyder dsnyder at blueshiftinc.com
Fri Nov 14 15:48:06 PST 2014


with the updated patch, i still see fails for TestMemoryHistory.py and
TestReportData.py on ubuntu14.04 w/ clang

i believe i figured out how to apply the svn patch correctly.  here is a
subset of TestMemoryHistory.py post-patch:
    @skipIfRemote
    @skipIfAddressSanitizerUnsupported
    @dwarf_test
    def test_with_dwarf (self):
        self.buildDwarf (None, None, {"CFLAGS": "-fsanitize=address -g"})
        self.asan_tests ()




TestMemoryHistory has the following output:

FAILED: cd /home/dsnyder/tot/build/tools/lldb/test && /usr/bin/python
/home/dsnyder/tot/llvm/tools/lldb/test/dosep.py -o "-q --arch=x86_64
--executable /home/dsnyder/tot/build/bin/lldb -s
/home/dsnyder/tot/build/lldb-test-traces -u CXXFLAGS -u CFLAGS -C clang\
-Qunused-arguments\ -fcolor-diagnostics"
UNSUPPORTED: LLDB (clang -Qunused-arguments -fcolor-diagnostics-x86_64) ::
test_with_dsym (TestMemoryHistory.AsanTestCase) (requires Darwin)
FAIL: LLDB (clang -Qunused-arguments -fcolor-diagnostics-x86_64) ::
test_with_dwarf (TestMemoryHistory.AsanTestCase)
======================================================================
FAIL: test_with_dwarf (TestMemoryHistory.AsanTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 524, in wrapper
    func(*args, **kwargs)
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 509, in wrapper
    return func(self, *args, **kwargs)
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 382, in wrapper
    return func(self, *args, **kwargs)
  File
"/home/dsnyder/tot/lldb/test/functionalities/asan/TestMemoryHistory.py",
line 28, in test_with_dwarf
    self.asan_tests ()
  File
"/home/dsnyder/tot/lldb/test/functionalities/asan/TestMemoryHistory.py",
line 72, in asan_tests
    'Memory deallocated at', 'a.out`f2', 'main.c:%d' % self.line_free])
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 1873, in expect
    self.runCmd(str, msg=msg, trace = (True if trace else False), check =
not error, inHistory=inHistory)
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 1799, in runCmd
    msg if msg else CMD_MSG(cmd))
AssertionError: False is not True : Command 'memory history 'pointer''
returns successfully
Config=x86_64-clang -Qunused-arguments -fcolor-diagnostics
----------------------------------------------------------------------
Ran 2 tests in 0.450s

FAILED (failures=1, skipped=1)
Ran 1 tests.
Failing Tests (1)
FAIL: LLDB (suite) :: TestMemoryHistory.py (Linux ubuntu 3.13.0-29-generic
#53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64)
ninja: build stopped: subcommand failed.



TestReportData.py has the following output:

FAILED: cd /home/dsnyder/tot/build/tools/lldb/test && /usr/bin/python
/home/dsnyder/tot/llvm/tools/lldb/test/dosep.py -o "-q --arch=x86_64
--executable /home/dsnyder/tot/build/bin/lldb -s
/home/dsnyder/tot/build/lldb-test-traces -u CXXFLAGS -u CFLAGS -C clang\
-Qunused-arguments\ -fcolor-diagnostics"
UNSUPPORTED: LLDB (clang -Qunused-arguments -fcolor-diagnostics-x86_64) ::
test_with_dsym (TestReportData.AsanTestReportDataCase) (requires Darwin)
FAIL: LLDB (clang -Qunused-arguments -fcolor-diagnostics-x86_64) ::
test_with_dwarf (TestReportData.AsanTestReportDataCase)
======================================================================
FAIL: test_with_dwarf (TestReportData.AsanTestReportDataCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 524, in wrapper
    func(*args, **kwargs)
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 509, in wrapper
    return func(self, *args, **kwargs)
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 382, in wrapper
    return func(self, *args, **kwargs)
  File
"/home/dsnyder/tot/lldb/test/functionalities/asan/TestReportData.py", line
29, in test_with_dwarf
    self.asan_tests ()
  File
"/home/dsnyder/tot/lldb/test/functionalities/asan/TestReportData.py", line
69, in asan_tests
    substrs = ['stopped', 'stop reason = Use of deallocated memory
detected'])
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 1873, in expect
    self.runCmd(str, msg=msg, trace = (True if trace else False), check =
not error, inHistory=inHistory)
  File "/home/dsnyder/tot/lldb/test/lldbtest.py", line 1799, in runCmd
    msg if msg else CMD_MSG(cmd))
AssertionError: False is not True : Process should be stopped due to ASan
report
Config=x86_64-clang -Qunused-arguments -fcolor-diagnostics
----------------------------------------------------------------------
Ran 2 tests in 2.435s

FAILED (failures=1, skipped=1)
Ran 1 tests.
Failing Tests (1)
FAIL: LLDB (suite) :: TestReportData.py (Linux ubuntu 3.13.0-29-generic
#53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64)
ninja: build stopped: subcommand failed.




it doesn't appear that these tests are being skipped





On Fri, Nov 14, 2014 at 2:28 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote:

> Updating the patch.
>
> http://reviews.llvm.org/D6272
>
> Files:
>   test/functionalities/asan/Makefile
>   test/functionalities/asan/TestMemoryHistory.py
>   test/functionalities/asan/TestReportData.py
>   test/lldbtest.py
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141114/42d9f46a/attachment.html>


More information about the lldb-commits mailing list