[PATCH] D31430: Disable asan leak tests on i386 linux

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 11:58:38 PDT 2017


fjricci updated this revision to Diff 93267.
fjricci added a comment.

Also explicitly enable lsan on i386 leak tests


https://reviews.llvm.org/D31430

Files:
  test/asan/lit.cfg
  test/lsan/TestCases/cleanup_in_tsd_destructor.c
  test/lsan/TestCases/disabler.c
  test/lsan/TestCases/ignore_object.c
  test/lsan/TestCases/strace_test.cc
  test/lsan/TestCases/swapcontext.cc


Index: test/lsan/TestCases/swapcontext.cc
===================================================================
--- test/lsan/TestCases/swapcontext.cc
+++ test/lsan/TestCases/swapcontext.cc
@@ -2,8 +2,8 @@
 // memory. Make sure we don't report these leaks.
 
 // RUN: %clangxx_lsan %s -o %t
-// RUN: %run %t 2>&1
-// RUN: not %run %t foo 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=detect_leaks=1 %run %t 2>&1
+// RUN: LSAN_OPTIONS=detect_leaks=1 not %run %t foo 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #if defined(__APPLE__)
Index: test/lsan/TestCases/strace_test.cc
===================================================================
--- test/lsan/TestCases/strace_test.cc
+++ test/lsan/TestCases/strace_test.cc
@@ -1,7 +1,7 @@
 // Test that lsan reports a proper error when running under strace.
 // REQUIRES: strace
 // RUN: %clangxx_lsan %s -o %t
-// RUN: not strace -o /dev/null %run %t 2>&1 | FileCheck %s
+// RUN: LSAN_OPTIONS=detect_leaks=1 not strace -o /dev/null %run %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
 #include <stdlib.h>
Index: test/lsan/TestCases/ignore_object.c
===================================================================
--- test/lsan/TestCases/ignore_object.c
+++ test/lsan/TestCases/ignore_object.c
@@ -1,5 +1,5 @@
 // Test for __lsan_ignore_object().
-// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:detect_leaks=1"
 // RUN: %clang_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s
 
Index: test/lsan/TestCases/disabler.c
===================================================================
--- test/lsan/TestCases/disabler.c
+++ test/lsan/TestCases/disabler.c
@@ -1,5 +1,5 @@
 // Test for __lsan_disable() / __lsan_enable().
-// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:detect_leaks=1"
 // RUN: %clang_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s
 
Index: test/lsan/TestCases/cleanup_in_tsd_destructor.c
===================================================================
--- test/lsan/TestCases/cleanup_in_tsd_destructor.c
+++ test/lsan/TestCases/cleanup_in_tsd_destructor.c
@@ -3,7 +3,7 @@
 // user-installed TSD destructors have finished running (since they may contain
 // additional cleanup tasks). LSan doesn't actually meet that goal 100%, but it
 // makes its best effort.
-// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:detect_leaks=1"
 // RUN: %clang_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:use_tls=1 %run %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:use_tls=0 not %run %t 2>&1 | FileCheck %s
Index: test/asan/lit.cfg
===================================================================
--- test/asan/lit.cfg
+++ test/asan/lit.cfg
@@ -211,7 +211,7 @@
   config.available_features.add('stable-runtime')
 
 # Turn on leak detection on 64-bit Linux.
-if config.host_os == 'Linux' and (config.target_arch == 'x86_64' or config.target_arch == 'i386'):
+if config.host_os == 'Linux' and config.target_arch == 'x86_64':
   config.available_features.add('leak-detection')
 
 # Set LD_LIBRARY_PATH to pick dynamic runtime up properly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31430.93267.patch
Type: text/x-patch
Size: 3414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170328/03495fca/attachment.bin>


More information about the llvm-commits mailing list