[ASan] Improve portability of new tests.

llvm-svn: 252742
This commit is contained in:
Yury Gribov 2015-11-11 15:42:26 +00:00
parent fcbb0ec06e
commit 8fbd938641
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// Test interaction of Asan recovery mode with asynch signals.
//
// RUN: %clang_asan -fsanitize-recover=address %s -o %t
// RUN: %clang_asan -fsanitize-recover=address -pthread %s -o %t
//
// RUN: rm -f %t.log
// RUN: env ASAN_OPTIONS=halt_on_error=false %run %t 1000 >%t.log 2>&1 || true
@ -10,6 +10,9 @@
//
// REQUIRES: stable-runtime
#define _POSIX_C_SOURCE 200112 // rand_r
#define _SVID_SOURCE 1 // SA_NODEFER
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,6 +1,6 @@
// Stress test recovery mode with many threads.
//
// RUN: %clangxx_asan -fsanitize-recover=address %s -o %t
// RUN: %clangxx_asan -fsanitize-recover=address -pthread %s -o %t
//
// RUN: env ASAN_OPTIONS=halt_on_error=false:max_errors=1000 %run %t 1 10 >1.txt 2>&1
// RUN: FileCheck %s < 1.txt
@ -15,6 +15,8 @@
//
// REQUIRES: stable-runtime
#define _POSIX_C_SOURCE 200112 // rand_r
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>