diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2016-05-25 16:04:24 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2016-05-25 16:04:24 +0000 |
commit | 1ae308d63305cf4ac26285f2eebdda54d046928d (patch) | |
tree | 880d7d7707da73ba3771a8357603d2acdbde6a6a /test/tsan/Darwin | |
parent | d9b88999208d5220a5e42784ae7bc1c22ea9057e (diff) |
[tsan] Change some OS X tests to include system headers (xpc.h, mman.h) more explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/Darwin')
-rw-r--r-- | test/tsan/Darwin/malloc_size.mm | 4 | ||||
-rw-r--r-- | test/tsan/Darwin/xpc-race.mm | 5 | ||||
-rw-r--r-- | test/tsan/Darwin/xpc.mm | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/test/tsan/Darwin/malloc_size.mm b/test/tsan/Darwin/malloc_size.mm index 3d3629b73..485d85bba 100644 --- a/test/tsan/Darwin/malloc_size.mm +++ b/test/tsan/Darwin/malloc_size.mm @@ -3,8 +3,10 @@ // RUN: %clang_tsan %s -o %t -framework Foundation // RUN: %run %t 2>&1 | FileCheck %s -#import <Foundation/Foundation.h> #include <malloc/malloc.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/mman.h> int some_global; diff --git a/test/tsan/Darwin/xpc-race.mm b/test/tsan/Darwin/xpc-race.mm index 957613f3b..9141da42e 100644 --- a/test/tsan/Darwin/xpc-race.mm +++ b/test/tsan/Darwin/xpc-race.mm @@ -2,6 +2,7 @@ // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %deflake %run %t 2>&1 | FileCheck %s #import <Foundation/Foundation.h> +#import <xpc/xpc.h> #import "../test.h" @@ -73,8 +74,8 @@ int main(int argc, const char *argv[]) { // CHECK: Hello world. // CHECK: WARNING: ThreadSanitizer: data race // CHECK: Write of size 8 -// CHECK: #0 {{.*}}xpc-race.mm:33 +// CHECK: #0 {{.*}}xpc-race.mm:34 // CHECK: Previous write of size 8 -// CHECK: #0 {{.*}}xpc-race.mm:33 +// CHECK: #0 {{.*}}xpc-race.mm:34 // CHECK: Location is global 'global' // CHECK: Done. diff --git a/test/tsan/Darwin/xpc.mm b/test/tsan/Darwin/xpc.mm index c34b948a3..a939b02ef 100644 --- a/test/tsan/Darwin/xpc.mm +++ b/test/tsan/Darwin/xpc.mm @@ -2,6 +2,7 @@ // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s #import <Foundation/Foundation.h> +#import <xpc/xpc.h> long global; |