[llvm-commits] PATCH: [compiler-rt] First effort at moving (ASan) reg tests to llvm-lit infrastructure

Alexey Samsonov samsonov at google.com
Tue Aug 28 07:13:34 PDT 2012


Chandler,

On Tue, Jul 31, 2012 at 12:40 PM, Chandler Carruth <chandlerc at google.com>wrote:

> I think this is fine to commit, but you should mention that it's a WIP in
> the commit. =]
>
> Some important future steps:
>
> 0) Rig the output tests to only run on machines where target == host where
> we know we can produce working binaries.
>
> 1) Get unittests building and running with lit as well. I'll admit I'm not
> as familiar w/ how to rig lit up to unittests. I did a pretty gross hack to
> run unit tests as part of 'make' (or 'ninja') step with CMake, and you
> should look at how other unittests work probably.
>
> 2) Hook the unittests and this output test into 'check-asan' and thus
> 'check-all'
>

What are the issues that stop us from enabling (still minimalistic)
compiler-rt build by default? Currently ASan runtime is built on Linux and
on Mac, and a user can run ASan regression and unit tests by "make
check-asan" or "make check-all" command from the root of
the build directory.
1) Should we restrict the set of OS that may recurse into compiler-rt/asan
subdirs? How can we test this?
2) There is an issue with test running time. ASan tests work relatively
fast on Linux, but slow on Mac. Can this be a problem
and should we exclude ASan test-suite from global list of testsuites on
Mac, so that users won't have to wait too long if they run
"make check-all" command?


>
> 3) Send a patch to enable recursing into the compiler-rt tree from the
> llvm tree with CMake and send an email to llvmdev letting folks know about
> this switch when it lands.
>
> 4) Get the install support worked out w/ CMake.
>
> 5) Eventually move development over to the CMake system, and move
> 'lit_tests' back to 'tests'. I think its fine to have separate tests under
> asan, tsan, etc.
>
>
> On Wed, Jul 25, 2012 at 11:53 AM, Chandler Carruth <chandlerc at google.com>wrote:
>
>> I think this is an awesome step, despite not being a fan of lit. It's the
>> infrastructure we have, and we should share it.
>>
>> I think we should probably also switch the unittests to run the same way
>> rather than the setup I gave them initially where they are run as a part of
>> the build.
>>
>> I've left some more specific comments in the code review tool.
>>
>>
>> On Wed, Jul 25, 2012 at 10:43 AM, Alexey Samsonov <samsonov at google.com>wrote:
>>
>>> Hi, llvm-commits!
>>>
>>> AddressSanitizer is long a part of compiler-rt library, but it still
>>> uses custom Makefiles to run unit and regression tests.
>>> This patch is supposed to be a first move towards integrating ASan
>>> regressions test into llvm lit-based testing infrastructure.
>>> With this patch applied, one may run ASan reg tests by simply
>>> running "make check-asan" from cmake build tree:
>>> * tests use fresh clang binary from current build tree.
>>> * tests use the same RUN-lines syntax as llvm/clang reg tests (I've
>>> attached sample reg test to patch).
>>>
>>> Could you please take a look if this is desirable direction and if this
>>> patch may be applied?
>>>
>>> Note: Currently all ASan code and tests are located in
>>> projects/compiler-rt/lib/asan. (same is true for ThreadSanitizer which
>>> certainly
>>> should soon be integrated into cmake build as well). Should we instead
>>> move all tests for different runtimes into /projects/compiler-rt/test
>>> folder, or we may keep it as is?
>>>
>>> Code review: http://codereview.appspot.com/6443046/
>>>
>>> --
>>> Alexey Samsonov, MSK
>>>
>>>
>>
>


-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120828/26b01559/attachment.html>


More information about the llvm-commits mailing list