This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Asan/Tsan Unit/Regression testing (was [asan] Emit GIMPLE direclty, small cleanups)


On Tue, Nov 6, 2012 at 4:26 PM, Xinliang David Li <davidxl@google.com> wrote:
>
> As asan/tsan functionality is getting into trunk, we need to set up
> testings as soon as possible to avoid bitrot.
>
> Kostya can probably shed some lights on the test case requirements,
> and we can continue discussions on how to extend dejagnu to import
> those tests.

asan has 3 kinds of tests.

1. LLVM unittests (Text file with LLVM IR and the expected result of
the transformations).
Example:  http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/do-not-touch-threadlocal.ll?revision=145092&view=markup
I am not sure if anything similar is possible with GCC.

2. Large Gtest-based unittest. This is a set of c++ files that should
be built with the asan switch, depends on gtest
(http://code.google.com/p/googletest/).
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?revision=166104&view=markup
This should be easy to port to GCC, but it requires gtest.

3. Full output tests (a .cc file should be build with asan switch,
executable should be run and the stderr is compared with the expected
output)
Example: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc?revision=165391&view=markup
The can be ported to GCC, but the uses of FileCheck
(http://llvm.org/docs/CommandGuide/FileCheck.html) will need to be
replaced with GCC's analog.
We should probably start with these tests.

tsan tests have similar structure.

--kcc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]