From 2edfcf9065940df55012a1d85f749437cce8c765 Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Thu, 11 Apr 2019 22:27:57 +0000 Subject: [PATCH] [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. llvm-svn: 358235 --- compiler-rt/test/tsan/Darwin/gcd-data.mm | 36 ------------------- .../test/tsan/Darwin/gcd-source-serial.mm | 33 ----------------- 2 files changed, 69 deletions(-) delete mode 100644 compiler-rt/test/tsan/Darwin/gcd-data.mm delete mode 100644 compiler-rt/test/tsan/Darwin/gcd-source-serial.mm diff --git a/compiler-rt/test/tsan/Darwin/gcd-data.mm b/compiler-rt/test/tsan/Darwin/gcd-data.mm deleted file mode 100644 index d451cf5e8efa..000000000000 --- a/compiler-rt/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 - -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/compiler-rt/test/tsan/Darwin/gcd-source-serial.mm b/compiler-rt/test/tsan/Darwin/gcd-source-serial.mm deleted file mode 100644 index 992203074c15..000000000000 --- a/compiler-rt/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 - -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.