summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-20 13:21:20 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-20 13:21:20 +0000
commite11473fe06f0d0c0e8e42fa5f6282a70904b5ec6 (patch)
treed9e89fe1bb6466d4145616d47ea6eef6f200c8ac /test
parentbd5b2c8481f24907795e0138b313f00063ddc35a (diff)
[asan] Allow changing verbosity in activation flags.
This change removes some debug output in asan_flags.cc that was reading the verbosity level before all the flags were parsed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/asan/TestCases/Posix/start-deactivated.cc11
-rw-r--r--test/asan/TestCases/default_options.cc4
2 files changed, 12 insertions, 3 deletions
diff --git a/test/asan/TestCases/Posix/start-deactivated.cc b/test/asan/TestCases/Posix/start-deactivated.cc
index f478be4ea..d7e0dfc98 100644
--- a/test/asan/TestCases/Posix/start-deactivated.cc
+++ b/test/asan/TestCases/Posix/start-deactivated.cc
@@ -11,6 +11,12 @@
// RUN: ASAN_ACTIVATION_OPTIONS=help=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-HELP
// RUN: ASAN_OPTIONS=start_deactivated=1,verbosity=1 \
// RUN: ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED
+// RUN: ASAN_OPTIONS=start_deactivated=1 \
+// RUN: ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED-V0
+
+// Check that verbosity=1 in activation flags affects reporting of unrecognized activation flags.
+// RUN: ASAN_OPTIONS=start_deactivated=1 \
+// RUN: ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0,verbosity=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED
// XFAIL: arm-linux-gnueabi
// XFAIL: armv7l-unknown-linux-gnueabihf
@@ -87,6 +93,9 @@ extern "C" void do_another_bad_thing() {
// CHECK-HELP: max_redzone
// CHECK-HELP-NOT: handle_segv
-// unsupported activation flags produce a warning
+// unsupported activation flags produce a warning ...
// CHECK-UNSUPPORTED: WARNING: found 1 unrecognized
// CHECK-UNSUPPORTED: handle_segv
+
+// ... but not at verbosity=0
+// CHECK-UNSUPPORTED-V0-NOT: WARNING: found {{.*}} unrecognized
diff --git a/test/asan/TestCases/default_options.cc b/test/asan/TestCases/default_options.cc
index 9a6eaeb0b..1614fbe71 100644
--- a/test/asan/TestCases/default_options.cc
+++ b/test/asan/TestCases/default_options.cc
@@ -4,12 +4,12 @@
// __asan_default_options() are not supported on Windows.
// XFAIL: win32
-const char *kAsanDefaultOptions="verbosity=1 strip_path_prefix=bar";
+const char *kAsanDefaultOptions="verbosity=1 help=1";
extern "C"
__attribute__((no_sanitize_address))
const char *__asan_default_options() {
- // CHECK: Using the defaults from __asan_default_options: {{.*}} strip_path_prefix=bar
+ // CHECK: Available flags for AddressSanitizer:
return kAsanDefaultOptions;
}