[compiler-rt] r222091 - [ASan] Fix leak tests on 64-bit targets other than x86-64
Jay Foad
jay.foad at gmail.com
Sat Nov 15 15:00:14 PST 2014
Author: foad
Date: Sat Nov 15 17:00:14 2014
New Revision: 222091
URL: http://llvm.org/viewvc/llvm-project?rev=222091&view=rev
Log:
[ASan] Fix leak tests on 64-bit targets other than x86-64
Summary:
This test explicitly sets ASAN_OPTIONS=detect_leaks=1 which is only
supported on x86-64. The test is currently restricted to run only on
64-bit targets, but needs to be restricted further so it only runs on
x86-64.
Reviewers: kcc, eugenis, earthdok, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6189
Modified:
compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc
compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc
compiler-rt/trunk/test/asan/lit.cfg
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc?rev=222091&r1=222090&r2=222091&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc Sat Nov 15 17:00:14 2014
@@ -8,7 +8,7 @@
// RUN: ASAN_OPTIONS=coverage=1:coverage_dir=%T/coverage-and-lsan:verbosity=1 not %run %t 2>&1 | FileCheck %s
// RUN: %sancov print %T/coverage-and-lsan/*.sancov 2>&1
//
-// REQUIRES: asan-64-bits
+// REQUIRES: leak-detection
int *g = new int;
int main(int argc, char **argv) {
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc?rev=222091&r1=222090&r2=222091&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc Sat Nov 15 17:00:14 2014
@@ -1,5 +1,5 @@
// Minimal test for LeakSanitizer+AddressSanitizer.
-// REQUIRES: asan-64-bits
+// REQUIRES: leak-detection
//
// RUN: %clangxx_asan %s -o %t
// RUN: ASAN_OPTIONS=detect_leaks=1 not %run %t 2>&1 | FileCheck %s
Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=222091&r1=222090&r2=222091&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Sat Nov 15 17:00:14 2014
@@ -122,9 +122,10 @@ config.available_features.add("asan-" +
if config.target_arch != 'arm':
config.available_features.add('stable-runtime')
-# Turn on leak detection on 64-bit Linux.
-if config.host_os == 'Linux' and config.bits == '64':
+# Turn on leak detection on x86_64 Linux.
+if config.host_os == 'Linux' and config.host_arch == 'x86_64':
config.environment['ASAN_OPTIONS'] = 'detect_leaks=1'
+ config.available_features.add('leak-detection')
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
push_ld_library_path(config, config.compiler_rt_libdir)
More information about the llvm-commits
mailing list