Skip to content

Commit

Permalink
[NFC][TSan] Move libdispatch tests into their own subfolder
Browse files Browse the repository at this point in the history
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

llvm-svn: 356202
  • Loading branch information
yln committed Mar 14, 2019
1 parent e0e0244 commit 4d4f64c
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 31 deletions.
6 changes: 3 additions & 3 deletions compiler-rt/test/lit.common.cfg
Expand Up @@ -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:
Expand Down
@@ -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;

Expand Down
@@ -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];
Expand Down
@@ -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

Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down
@@ -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>
Expand Down
@@ -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;

Expand Down
@@ -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>
Expand Down
11 changes: 11 additions & 0 deletions compiler-rt/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'
@@ -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;

Expand Down
@@ -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>
Expand Down
@@ -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

Expand Down
@@ -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>
Expand Down

0 comments on commit 4d4f64c

Please sign in to comment.