[PATCH] [lsan] Run the leak checking tests under both ASan and LSan.

Sergey Matveev earthdok at google.com
Fri May 31 04:00:07 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
----------------
Alexey Samsonov wrote:
> I'd prefer direct check that ${CMAKE_SYSTEM_NAME} STREQUAL "Linux"
(NOT APPLE AND NOT ANDROID) is how Linux is defined in LSan and ASan CMake files, so we better replace it everywhere. Separate CL?

================
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')
 
----------------
Alexey Samsonov wrote:
> 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.
Makes sense.


http://llvm-reviews.chandlerc.com/D895



More information about the llvm-commits mailing list