diff options
author | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-03-24 15:12:35 +0300 |
---|---|---|
committer | Maxim Ostapenko <m.ostapenko@samsung.com> | 2016-04-25 12:03:36 +0300 |
commit | 3a11caae4f6750da83cba8f501fa43f61103ccfe (patch) | |
tree | 818156eaa9c2761f171ac81aab3a1340bbcdffa7 | |
parent | abd8d96e0be0492fc4e42c99bed1170720966499 (diff) | |
download | linaro-gcc-3a11caae4f6750da83cba8f501fa43f61103ccfe.tar.gz linaro-gcc-3a11caae4f6750da83cba8f501fa43f61103ccfe.tar.bz2 linaro-gcc-3a11caae4f6750da83cba8f501fa43f61103ccfe.zip |
Fix c-c++-common/asan/pr64820.c testcase to pass output pattern tests under
qemu-aarch64. Adjust halt_on_error tests.
gcc/testsuite/
* c-c++-common/asan/pr64820.c: Adjust output patterns.
* c-c++-common/asan/halt_on_error-1.c: Adjust.
* c-c++-common/asan/halt_on_error-1.c: Likewise.
Change-Id: Ic7be1b413b6761d4a89c4a6aa428b2255c7608e8
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
-rw-r--r-- | gcc/testsuite/c-c++-common/asan/halt_on_error-1.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/asan/halt_on_error-2.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/asan/pr64820.c | 4 |
3 files changed, 18 insertions, 4 deletions
diff --git a/gcc/testsuite/c-c++-common/asan/halt_on_error-1.c b/gcc/testsuite/c-c++-common/asan/halt_on_error-1.c index b015e9684bf..f0cfea3f7be 100644 --- a/gcc/testsuite/c-c++-common/asan/halt_on_error-1.c +++ b/gcc/testsuite/c-c++-common/asan/halt_on_error-1.c @@ -1,10 +1,17 @@ /* Test recovery mode. */ /* { dg-do run } */ /* { dg-options "-fsanitize-recover=address" } */ -/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=false" } */ #include <string.h> +#ifdef __cplusplus +extern "C" +#endif +const char * +__asan_default_options () { + return "halt_on_error=false"; +} + volatile int ten = 10; int main() { diff --git a/gcc/testsuite/c-c++-common/asan/halt_on_error-2.c b/gcc/testsuite/c-c++-common/asan/halt_on_error-2.c index 4527889af14..28f4456a60a 100644 --- a/gcc/testsuite/c-c++-common/asan/halt_on_error-2.c +++ b/gcc/testsuite/c-c++-common/asan/halt_on_error-2.c @@ -1,11 +1,18 @@ /* Test recovery mode. */ /* { dg-do run } */ /* { dg-options "-fsanitize-recover=address" } */ -/* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=true" } */ /* { dg-shouldfail "asan" } */ #include <string.h> +#ifdef __cplusplus +extern "C" +#endif +const char * +__asan_default_options () { + return "halt_on_error=true"; +} + volatile int ten = 10; int main() { diff --git a/gcc/testsuite/c-c++-common/asan/pr64820.c b/gcc/testsuite/c-c++-common/asan/pr64820.c index 583ca0a60b6..69639407e0b 100644 --- a/gcc/testsuite/c-c++-common/asan/pr64820.c +++ b/gcc/testsuite/c-c++-common/asan/pr64820.c @@ -33,7 +33,7 @@ int main(int argc, char **argv) { } /* { dg-output "AddressSanitizer: stack-use-after-return on address 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output "WRITE of size 1 at .* thread T0.*" } */ +/* { dg-output "\[^\n\r]*WRITE of size 1 at .* thread T0.*" } */ /* { dg-output " #0.*(Func2)?.*pr64820.(c:28)?.*" } */ /* { dg-output "is located in stack of thread T0 at offset.*" } */ -/* { dg-output "\'local\' <== Memory access at offset 32 is inside this variable" } */ +/* { dg-output "\'local\'\[^\n\r]*<== Memory access at offset 32 is inside this variable" } */ |