[Lldb-commits] [PATCH] Skip AsanTestCase and AsanTestReportDataCase on Darwin
Ilia K
ki.stfu at gmail.com
Fri Feb 27 13:32:11 PST 2015
Hi clayborg, abidh, zturner, emaste, jingham, jasonmolenda, granata.enrico, DougSnyder,
This patch skips tests which cause the following error:
```
1: test_with_dsym (TestMemoryHistory.AsanTestCase) ...
os command: make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang"
with pid: 9475
stdout: rm -f "a.out" main.o main.d main.d.tmp
rm -f -r "a.out.dSYM"
/Users/IliaK/p/llvm/build_ninja/bin/clang -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64 -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include -c -o main.o main.c
/Users/IliaK/p/llvm/build_ninja/bin/clang main.o -fsanitize=address -fsanitize-address-field-padding=1 -g -arch x86_64 -I/Users/IliaK/p/llvm/tools/lldb/test/make/../../include -o "a.out"
stderr: clang: error: unknown argument: '-fsanitize-address-field-padding=1'
clang: error: unsupported argument 'address' to option 'fsanitize='
ld: file not found: /Users/IliaK/p/llvm/build_ninja/bin/../lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [a.out] Error 1
retcode: 2
ERROR
os command: make clean
with pid: 9521
stdout: rm -f "a.out" main.o main.d main.d.tmp
rm -f -r "a.out.dSYM"
stderr:
retcode: 0
Restore dir to: /Users/IliaK/p/llvm/tools/lldb
======================================================================
ERROR: test_with_dsym (TestMemoryHistory.AsanTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 612, in wrapper
func(*args, **kwargs)
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 456, in wrapper
return func(self, *args, **kwargs)
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/asan/TestMemoryHistory.py", line 24, in test_with_dsym
self.buildDsym (None, compiler)
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 1496, in buildDsym
if not module.buildDsym(self, architecture, compiler, dictionary, clean):
File "/Users/IliaK/p/llvm/tools/lldb/test/plugins/builder_darwin.py", line 16, in buildDsym
lldbtest.system(commands, sender=sender)
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 370, in system
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command 'make clean ; make MAKE_DSYM=YES ARCH=x86_64 CC="/Users/IliaK/p/llvm/build_ninja/bin/clang" ' returned non-zero exit status 2
Config=x86_64-clang
----------------------------------------------------------------------
```
Also this patch fixes findBuiltClang() by looking a clang in the build folder.
BTW, another patch was made in October 2014, but it wasn't committed: http://reviews.llvm.org/D6272.
http://reviews.llvm.org/D7958
Files:
test/functionalities/asan/TestMemoryHistory.py
test/functionalities/asan/TestReportData.py
test/lldbtest.py
Index: test/functionalities/asan/TestMemoryHistory.py
===================================================================
--- test/functionalities/asan/TestMemoryHistory.py
+++ test/functionalities/asan/TestMemoryHistory.py
@@ -17,13 +17,15 @@
# self.useBuiltClang() to use clang from the llvm-build directory instead
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @unittest2.skipIf(sys.platform.startswith("darwin"), "-fsanitize=address isn't supported on Darwin")
@skipIfRemote
@dsym_test
def test_with_dsym (self):
compiler = self.findBuiltClang ()
self.buildDsym (None, compiler)
self.asan_tests ()
+ @unittest2.skipIf(sys.platform.startswith("darwin"), "-fsanitize=address isn't supported on Darwin")
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
@expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07)
Index: test/functionalities/asan/TestReportData.py
===================================================================
--- test/functionalities/asan/TestReportData.py
+++ test/functionalities/asan/TestReportData.py
@@ -18,13 +18,15 @@
# self.useBuiltClang() to use clang from the llvm-build directory instead
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ @unittest2.skipIf(sys.platform.startswith("darwin"), "-fsanitize=address isn't supported on Darwin")
@skipIfRemote
@dsym_test
def test_with_dsym (self):
compiler = self.findBuiltClang ()
self.buildDsym (None, compiler)
self.asan_tests ()
+ @unittest2.skipIf(sys.platform.startswith("darwin"), "-fsanitize=address isn't supported on Darwin")
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
@expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07)
Index: test/lldbtest.py
===================================================================
--- test/lldbtest.py
+++ test/lldbtest.py
@@ -1522,6 +1522,11 @@
path = os.path.join(lldb_root_path, p)
if os.path.exists(path):
return path
+
+ # Tries to find clang at the same folder as the lldb
+ path = os.path.join(os.path.dirname(self.lldbExec), "clang")
+ if os.path.exists(path):
+ return path
return os.environ["CC"]
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7958.20890.patch
Type: text/x-patch
Size: 2497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150227/239a5fa4/attachment.bin>
More information about the lldb-commits
mailing list