diff options
author | Julian Lettner <jlettner@apple.com> | 2019-03-14 20:59:41 +0000 |
---|---|---|
committer | Julian Lettner <jlettner@apple.com> | 2019-03-14 20:59:41 +0000 |
commit | 4d0745cad5835866631e43d024fd61081adf3e8c (patch) | |
tree | cf2a512abc2392170c4106309085500020ae3fc9 | |
parent | c90e46e7d4ba2f556a765a5808989d1eb36fb001 (diff) | |
download | compiler-rt-4d0745cad5835866631e43d024fd61081adf3e8c.tar.gz |
[NFC][TSan] Move libdispatch tests into their own subfolder
Remove 'gcd' file prefix. GCD stands for Grand Central Dispatch, which
is another name for libdispatch.
https://apple.github.io/swift-corelibs-libdispatch/
Remove `REQUIRE: dispatch` from tests.
Also rename lit feature 'dispatch' -> 'libdispatch' to be more explicit
what this is about.
Reviewed By: kubamracek
Differential Revision: https://reviews.llvm.org/D59341
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@356202 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/lit.common.cfg | 6 | ||||
-rw-r--r-- | test/tsan/libdispatch/apply-race.c (renamed from test/tsan/gcd-apply-race.c) | 4 | ||||
-rw-r--r-- | test/tsan/libdispatch/apply.c (renamed from test/tsan/gcd-apply.c) | 4 | ||||
-rw-r--r-- | test/tsan/libdispatch/data.c (renamed from test/tsan/gcd-data.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/dispatch_main.c (renamed from test/tsan/gcd-dispatch_main.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/dispatch_once_deadlock.c (renamed from test/tsan/gcd-dispatch_once_deadlock.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/groups-destructor.c (renamed from test/tsan/gcd-groups-destructor.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/groups-leave.c (renamed from test/tsan/gcd-groups-leave.c) | 4 | ||||
-rw-r--r-- | test/tsan/libdispatch/groups-stress.c (renamed from test/tsan/gcd-groups-stress.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/lit.local.cfg | 11 | ||||
-rw-r--r-- | test/tsan/libdispatch/once.c (renamed from test/tsan/gcd-once.c) | 4 | ||||
-rw-r--r-- | test/tsan/libdispatch/semaphore-norace.c (renamed from test/tsan/gcd-semaphore-norace.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/source-serial.c (renamed from test/tsan/gcd-source-serial.c) | 2 | ||||
-rw-r--r-- | test/tsan/libdispatch/suspend.c (renamed from test/tsan/gcd-suspend.c) | 2 |
14 files changed, 18 insertions, 31 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg index 1f67e5a2b..37132c3d0 100644 --- a/test/lit.common.cfg +++ b/test/lit.common.cfg @@ -222,9 +222,9 @@ compiler_rt_debug = getattr(config, 'compiler_rt_debug', False) if not compiler_rt_debug: config.available_features.add('compiler-rt-optimized') -dispatch = getattr(config, 'compiler_rt_intercept_libdispatch') -if dispatch: - config.available_features.add('dispatch') +libdispatch = getattr(config, 'compiler_rt_intercept_libdispatch') +if libdispatch: + config.available_features.add('libdispatch') sanitizer_can_use_cxxabi = getattr(config, 'sanitizer_can_use_cxxabi', True) if sanitizer_can_use_cxxabi: diff --git a/test/tsan/gcd-apply-race.c b/test/tsan/libdispatch/apply-race.c index bfdf99837..10e954c23 100644 --- a/test/tsan/gcd-apply-race.c +++ b/test/tsan/libdispatch/apply-race.c @@ -1,11 +1,9 @@ // RUN: %clang_tsan %s -o %t // RUN: %deflake %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> -#include "test.h" +#include "../test.h" long global; diff --git a/test/tsan/gcd-apply.c b/test/tsan/libdispatch/apply.c index 90dc35965..d5c991f32 100644 --- a/test/tsan/gcd-apply.c +++ b/test/tsan/libdispatch/apply.c @@ -1,15 +1,13 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - // TODO(yln): Deadlocks while gcd-apply.mm does not. What's the difference // between C and Obj-C compiler? // REQUIRES: disable #include <dispatch/dispatch.h> -#include "test.h" +#include "../test.h" long global; long array[2]; diff --git a/test/tsan/gcd-data.c b/test/tsan/libdispatch/data.c index 87dd2d9cd..7a6975bdc 100644 --- a/test/tsan/gcd-data.c +++ b/test/tsan/libdispatch/data.c @@ -1,8 +1,6 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - // TODO(yln): fails on one of our bots, need to investigate // REQUIRES: disabled diff --git a/test/tsan/gcd-dispatch_main.c b/test/tsan/libdispatch/dispatch_main.c index 2023ba0c7..43b0d08cc 100644 --- a/test/tsan/gcd-dispatch_main.c +++ b/test/tsan/libdispatch/dispatch_main.c @@ -4,8 +4,6 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> #include <stdio.h> diff --git a/test/tsan/gcd-dispatch_once_deadlock.c b/test/tsan/libdispatch/dispatch_once_deadlock.c index fd2cdc529..1e9e7d139 100644 --- a/test/tsan/gcd-dispatch_once_deadlock.c +++ b/test/tsan/libdispatch/dispatch_once_deadlock.c @@ -3,8 +3,6 @@ // RUN: %clang_tsan %s -o %t // RUN: not %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> #include <pthread.h> diff --git a/test/tsan/gcd-groups-destructor.c b/test/tsan/libdispatch/groups-destructor.c index a2c7eac83..100f6fc7c 100644 --- a/test/tsan/gcd-groups-destructor.c +++ b/test/tsan/libdispatch/groups-destructor.c @@ -1,8 +1,6 @@ // RUN: %clangxx_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> #import <memory> diff --git a/test/tsan/gcd-groups-leave.c b/test/tsan/libdispatch/groups-leave.c index d51edcfd7..0e487870a 100644 --- a/test/tsan/gcd-groups-leave.c +++ b/test/tsan/libdispatch/groups-leave.c @@ -1,11 +1,9 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> -#include "test.h" +#include "../test.h" dispatch_semaphore_t sem; diff --git a/test/tsan/gcd-groups-stress.c b/test/tsan/libdispatch/groups-stress.c index 0ae373cbd..0fdaac050 100644 --- a/test/tsan/gcd-groups-stress.c +++ b/test/tsan/libdispatch/groups-stress.c @@ -1,8 +1,6 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> #include <stdio.h> diff --git a/test/tsan/libdispatch/lit.local.cfg b/test/tsan/libdispatch/lit.local.cfg new file mode 100644 index 000000000..b312a3a1f --- /dev/null +++ b/test/tsan/libdispatch/lit.local.cfg @@ -0,0 +1,11 @@ +def getRoot(config): + if not config.parent: + return config + return getRoot(config.parent) + +root = getRoot(config) + +if 'libdispatch' not in root.available_features: + config.unsupported = True + +config.target_cflags += ' -fblocks' diff --git a/test/tsan/gcd-once.c b/test/tsan/libdispatch/once.c index 5a62c4260..00227b88e 100644 --- a/test/tsan/gcd-once.c +++ b/test/tsan/libdispatch/once.c @@ -1,11 +1,9 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> -#include "test.h" +#include "../test.h" static const long kNumThreads = 4; diff --git a/test/tsan/gcd-semaphore-norace.c b/test/tsan/libdispatch/semaphore-norace.c index 85792f6a8..ce94a3cbf 100644 --- a/test/tsan/gcd-semaphore-norace.c +++ b/test/tsan/libdispatch/semaphore-norace.c @@ -1,8 +1,6 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> #include <stdio.h> diff --git a/test/tsan/gcd-source-serial.c b/test/tsan/libdispatch/source-serial.c index 7ce52bb3e..79dc1afea 100644 --- a/test/tsan/gcd-source-serial.c +++ b/test/tsan/libdispatch/source-serial.c @@ -1,8 +1,6 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - // TODO(yln): fails on one of our bots, need to investigate // REQUIRES: disabled diff --git a/test/tsan/gcd-suspend.c b/test/tsan/libdispatch/suspend.c index ebca4c1dd..5566faf0c 100644 --- a/test/tsan/gcd-suspend.c +++ b/test/tsan/libdispatch/suspend.c @@ -1,8 +1,6 @@ // RUN: %clang_tsan %s -o %t // RUN: %run %t 2>&1 | FileCheck %s -// REQUIRES: dispatch - #include <dispatch/dispatch.h> #include <stdio.h> |