Skip to content

[sanitizers] Make sure TSan tests do not run on 32 bit platforms. #2175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// This test verifies that we add the function attributes used by sanitizers.
// This test verifies that we add the function attributes used by ASan.

// RUN: %target-swift-frontend -emit-ir -sanitize=address %s | FileCheck %s -check-prefix=ASAN
// RUN: %target-swift-frontend -emit-ir -target x86_64-apple-macosx10.9 -sanitize=thread %s | FileCheck %s -check-prefix=TSAN

// XFAIL: linux

func test() {
}

// ASAN: Function Attrs: sanitize_address
// TSAN: Function Attrs: sanitize_thread
12 changes: 12 additions & 0 deletions test/IRGen/tsan-attributes.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This test verifies that we add the function attributes used by TSan.

// RUN: %target-swift-frontend -emit-ir -sanitize=thread %s | FileCheck %s -check-prefix=TSAN

// TSan is currently only supported on 64 bit mac and simulators.
// (We do not test the simulators here.)
// REQUIRES: CPU=x86_64, OS=macosx

func test() {
}

// TSAN: Function Attrs: sanitize_thread