[PATCH] [lsan] Run the leak checking tests under both ASan and LSan.
Alexey Samsonov
samsonov at google.com
Fri May 31 03:27:55 PDT 2013
================
Comment at: lib/lsan/lit_tests/CMakeLists.txt:21
@@ -13,3 +20,3 @@
-if(COMPILER_RT_CAN_EXECUTE_TESTS)
+if(COMPILER_RT_CAN_EXECUTE_TESTS AND NOT APPLE AND NOT ANDROID)
set(LSAN_TEST_DEPS
----------------
I'd prefer direct check that ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"
================
Comment at: lib/lsan/lit_tests/lit.common.cfg:17
@@ -24,1 +16,3 @@
+lsan_lit_src_root = get_required_attr(config, 'lsan_lit_src_root')
+config.test_source_root = os.path.join(lsan_lit_src_root, 'Tests')
----------------
Sergey Matveev wrote:
> Alexey Samsonov wrote:
> > WDYT of s/Tests/common ?
> I've thought about that and I have an issue with it. It gives the impression that tool-specific tests go under asan/ or lsan/, and common tests go under common/. But that is false - you can't put tests under asan/ or lsan/. If we want some tests to run under standalone LSan only (and we do), we have two options. One is to do a bit of config magic and put them under a subdirectory such as common/lsan/. But then common is not common anymore. Another is to have a separate test suite in lit_tests/. But there's already a lit_tests/lsan/, so how do we come up with a name that means basically the same thing but is different?
Ok, one more idea of structure under lsan/lit_tests:
/Unit - config for unit tests
/AsanConfig - config for running tests with ASan+Lsan
/LsanConfig - config for running tests with standalone LSan
/TestCases - actual test cases.
http://llvm-reviews.chandlerc.com/D895
More information about the llvm-commits
mailing list