Force halt_on_error=true in ASan tests
authorSlava Barinov <v.barinov@samsung.com>
Tue, 8 Nov 2016 08:32:09 +0000 (11:32 +0300)
committerIvan Baravy <i.baravy@samsung.com>
Tue, 21 Feb 2017 18:36:22 +0000 (21:36 +0300)
Since our ASan does not fail application on error by default we should
switch this behaviour on explicitly to keep testsuite work.

Change-Id: I4344f82427bc62a40604a75f5f09f62333b6782d
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
gcc/testsuite/c-c++-common/asan/memcmp-1.c
gcc/testsuite/g++.dg/asan/asan_test.C

index 5915988..e3bbbc6 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fno-builtin-memcmp" } */
+/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=true" } */
 /* { dg-shouldfail "asan" } */
 
 #include <string.h>
index 3cee715..29cca40 100644 (file)
@@ -3,6 +3,7 @@
 // { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
 // { dg-additional-sources "asan_globals_test-wrapper.cc" }
 // { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" }
+// { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=true" }
 // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
 // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
 // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } }