[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
This commit is contained in:
Julian Lettner 2019-04-11 22:27:57 +00:00
parent f2d8f09d5d
commit 2edfcf9065
2 changed files with 0 additions and 69 deletions

View File

@ -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.

View File

@ -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.