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

Doug Snyder dsnyder at blueshiftinc.com
Wed Nov 19 15:31:29 PST 2014


kuba,

i'm not sure if my previous send was sent to the correct recipients, so i'm
resending it.  if it's a duplicate - sorry



i was able to try your new patch, using ubuntu14.04

the patch behaves well for both clang3.5 and clang3.6, but only if i use a
custom test rig called runtest.py.
the patch behaves poorly for both clang3.5 and clang3.6 if i use the
standard test method "ninja check-lldb"

generally, runtest.py and "ninja check-lld" produce the same results, so
the problem is probably something subtle



with runtest.py, i get the following message for both compilers:
Test: TestMemoryHistory.py found in functionalities/asan
UNSUPPORTED: LLDB (/usr/bin/clang-x86_64) :: test_with_dsym
(TestMemoryHistory.AsanTestCase) (requires Darwin)
UNSUPPORTED: LLDB (/usr/bin/clang-x86_64) :: test_with_dwarf
(TestMemoryHistory.AsanTestCase) (skipping because compiler doesn't support
AddressSanitizer)
----------------------------------------------------------------------
Ran 2 tests in 0.071s

OK (skipped=2)



with "ninja check-lldb", i get the following messages for both compilers:
[1/1] Testing LLDB (with a separate subprocess per test)
FAILED: cd /media/psf/Raid0/projects/tot/build/tools/lldb/test &&
/usr/bin/python /media/psf/Raid0/projects/tot/llvm/tools/lldb/test/dosep.py
-o "-q --arch=x86_64 --executable
/media/psf/Raid0/projects/tot/build/bin/lldb -s
/media/psf/Raid0/projects/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)
======================================================================
ERROR: test_with_dwarf (TestMemoryHistory.AsanTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 524, in
wrapper
    func(*args, **kwargs)
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 506, in
wrapper
    if skip_fn(self):
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 689, in
fn
    return not self.compilerSupportsAddressSanitizer()
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 1462, in
compilerSupportsAddressSanitizer
    if self.expectedCompilerVersion(["<", "3.6.0"]):
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 1257, in
expectedCompilerVersion
    return self.getCompilerVersion() < version
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 1228, in
getCompilerVersion
    version_output = system([[which(compiler), "-v"]])[1]
  File "/media/psf/Raid0/projects/tot/lldb/test/lldbtest.py", line 265, in
system
    commandList = [' '.join(x) for x in commands]
TypeError: sequence item 0: expected string, NoneType found
Config=x86_64-clang -Qunused-arguments -fcolor-diagnostics
----------------------------------------------------------------------
Ran 2 tests in 0.061s

FAILED (errors=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.



in case someone wants to try running runtest.py on ubuntu, i have attached
runtest.py

to run the test with runtest.py:
    copy runtest.py to the folder that contains lldb
    type: ./runtest.py -c -p functionalities/asan/TestMemoryHistory.py


doug

- {F251103, layout=link}

http://reviews.llvm.org/D6272
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141119/1d2cda73/attachment.html>


More information about the lldb-commits mailing list