diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-18 23:39:47 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-18 23:39:47 +0000 |
commit | ee354fb8b0da2f6d814c2944dec1cac22b45c175 (patch) | |
tree | 1713a97d51c468592702a64e56a2a7a6d41d4a52 /test/lsan | |
parent | 2a0bb212bbe96125fc0a4f9e5859949ba7360fd9 (diff) |
[LSan] Parse common flags from LSAN_OPTIONS even if LSan is combined with
another sanitizer.
A user may run both LSan and LSan+ASan. It is weird to pass path to leak
suppression file (or other common sanitizer flags, like "verbosity") in
"LSAN_OPTIONS" in the first case and in "ASAN_OPTIONS" in the second case.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lsan')
-rw-r--r-- | test/lsan/TestCases/ignore_object.cc | 2 | ||||
-rw-r--r-- | test/lsan/TestCases/ignore_object_errors.cc | 2 | ||||
-rw-r--r-- | test/lsan/TestCases/leak_check_at_exit.cc | 4 | ||||
-rw-r--r-- | test/lsan/TestCases/print_suppressions.cc | 4 | ||||
-rw-r--r-- | test/lsan/TestCases/suppressions_file.cc | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/test/lsan/TestCases/ignore_object.cc b/test/lsan/TestCases/ignore_object.cc index 133ccc75f..38d76e679 100644 --- a/test/lsan/TestCases/ignore_object.cc +++ b/test/lsan/TestCases/ignore_object.cc @@ -1,7 +1,7 @@ // Test for __lsan_ignore_object(). // RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:verbosity=2" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE ASAN_OPTIONS=$ASAN_OPTIONS:"verbosity=2" not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s #include <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/ignore_object_errors.cc b/test/lsan/TestCases/ignore_object_errors.cc index 7ca2a4f82..39b9b0288 100644 --- a/test/lsan/TestCases/ignore_object_errors.cc +++ b/test/lsan/TestCases/ignore_object_errors.cc @@ -1,7 +1,7 @@ // Test for incorrect use of __lsan_ignore_object(). // RUN: LSAN_BASE="verbosity=2" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE ASAN_OPTIONS=$ASAN_OPTIONS:verbosity=2 %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t 2>&1 | FileCheck %s #include <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/leak_check_at_exit.cc b/test/lsan/TestCases/leak_check_at_exit.cc index 3e4ccd782..fe3f70e40 100644 --- a/test/lsan/TestCases/leak_check_at_exit.cc +++ b/test/lsan/TestCases/leak_check_at_exit.cc @@ -3,8 +3,8 @@ // RUN: %clangxx_lsan %s -o %t // RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do // RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: LSAN_OPTIONS=$LSAN_BASE:"leak_check_at_exit=0" ASAN_OPTIONS="$ASAN_OPTIONS:leak_check_at_exit=0" not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do -// RUN: LSAN_OPTIONS=%LSAN_BASE:"leak_check_at_exit=0" ASAN_OPTIONS="$ASAN_OPTIONS:leak_check_at_exit=0" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont +// RUN: LSAN_OPTIONS=$LSAN_BASE:"leak_check_at_exit=0" not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do +// RUN: LSAN_OPTIONS=%LSAN_BASE:"leak_check_at_exit=0" %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont #include <stdio.h> #include <stdlib.h> diff --git a/test/lsan/TestCases/print_suppressions.cc b/test/lsan/TestCases/print_suppressions.cc index e0e8858f5..b292c0a7c 100644 --- a/test/lsan/TestCases/print_suppressions.cc +++ b/test/lsan/TestCases/print_suppressions.cc @@ -2,9 +2,9 @@ // matched. Default is print_suppressions=true. // RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 ASAN_OPTIONS=$ASAN_OPTIONS:print_suppressions=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print // RUN: LSAN_OPTIONS=$LSAN_BASE %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print -// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 ASAN_OPTIONS=$ASAN_OPTIONS:print_suppressions=0 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print +// RUN: LSAN_OPTIONS=$LSAN_BASE:print_suppressions=0 %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-dont-print // RUN: LSAN_OPTIONS=$LSAN_BASE %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-print #include <stdio.h> diff --git a/test/lsan/TestCases/suppressions_file.cc b/test/lsan/TestCases/suppressions_file.cc index 4087d931e..16ad93234 100644 --- a/test/lsan/TestCases/suppressions_file.cc +++ b/test/lsan/TestCases/suppressions_file.cc @@ -2,10 +2,10 @@ // RUN: %clangxx_lsan %s -o %t // RUN: echo "leak:*LSanTestLeakingFunc*" > %t.supp1 -// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions=%t.supp1 ASAN_OPTIONS=$ASAN_OPTIONS:suppressions=%t.supp1 not %run %t 2>&1 | FileCheck %s +// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions=%t.supp1 not %run %t 2>&1 | FileCheck %s // RUN: echo "leak:%t" > %t.supp2 -// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions="%t.supp2":symbolize=false ASAN_OPTIONS=$ASAN_OPTIONS:suppressions="%t.supp2" %run %t +// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions="%t.supp2":symbolize=false %run %t #include <stdio.h> #include <stdlib.h> |