summaryrefslogtreecommitdiff
path: root/test/tsan/Darwin
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-04-11 22:27:57 +0000
committerJulian Lettner <jlettner@apple.com>2019-04-11 22:27:57 +0000
commit61939cada2cbb06bbe48e9c9cab2c24030484950 (patch)
tree1e90ecd73ec119509ac38009bed8f7c33afdf42b /test/tsan/Darwin
parenta56718bdc304fb6422bc8d3dd8224ed764696328 (diff)
downloadcompiler-rt-61939cada2cbb06bbe48e9c9cab2c24030484950.tar.gz
[TSan][libdispatch] Delete old tests
In a previous commit, I re-enabled the ported variants of these 2 tests: tsan/Darwin/gcd-data.mm -> tsan/libdispatch/data.c tsan/Darwin/gcd-source-serial.mm -> tsan/libdispatch/source-serial.c So now we can delete the Darwin-only version. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/Darwin')
-rw-r--r--test/tsan/Darwin/gcd-data.mm36
-rw-r--r--test/tsan/Darwin/gcd-source-serial.mm33
2 files changed, 0 insertions, 69 deletions
diff --git a/test/tsan/Darwin/gcd-data.mm b/test/tsan/Darwin/gcd-data.mm
deleted file mode 100644
index d451cf5e8..000000000
--- a/test/tsan/Darwin/gcd-data.mm
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#import <Foundation/Foundation.h>
-
-long global;
-
-int main(int argc, const char *argv[]) {
- fprintf(stderr, "Hello world.\n");
-
- dispatch_queue_t q = dispatch_queue_create("my.queue", DISPATCH_QUEUE_SERIAL);
- dispatch_semaphore_t sem = dispatch_semaphore_create(0);
-
- global = 44;
- dispatch_data_t data = dispatch_data_create("buffer", 6, q, ^{
- fprintf(stderr, "Data destructor.\n");
- global++;
-
- dispatch_semaphore_signal(sem);
- });
- dispatch_release(data);
- data = nil;
-
- dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
-
- data = dispatch_data_create("buffer", 6, q, DISPATCH_DATA_DESTRUCTOR_DEFAULT);
- dispatch_release(data);
- data = nil;
-
- fprintf(stderr, "Done.\n");
-}
-
-// CHECK: Hello world.
-// CHECK: Data destructor.
-// CHECK-NOT: WARNING: ThreadSanitizer
-// CHECK: Done.
diff --git a/test/tsan/Darwin/gcd-source-serial.mm b/test/tsan/Darwin/gcd-source-serial.mm
deleted file mode 100644
index 992203074..000000000
--- a/test/tsan/Darwin/gcd-source-serial.mm
+++ /dev/null
@@ -1,33 +0,0 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#import <Foundation/Foundation.h>
-
-long global;
-
-int main(int argc, const char *argv[]) {
- fprintf(stderr, "Hello world.\n");
-
- dispatch_queue_t q = dispatch_queue_create("my.queue", DISPATCH_QUEUE_SERIAL);
- dispatch_semaphore_t sem = dispatch_semaphore_create(0);
- dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, q);
- long long interval_ms = 10;
- dispatch_source_set_timer(timer, dispatch_time(DISPATCH_TIME_NOW, 0), interval_ms * NSEC_PER_MSEC, 0);
- dispatch_source_set_event_handler(timer, ^{
- fprintf(stderr, "timer\n");
- global++;
-
- if (global > 50) {
- dispatch_semaphore_signal(sem);
- }
- });
- dispatch_resume(timer);
-
- dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
-
- fprintf(stderr, "Done.\n");
-}
-
-// CHECK: Hello world.
-// CHECK-NOT: WARNING: ThreadSanitizer
-// CHECK: Done.