summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/CMakeLists.txt4
-rw-r--r--compiler-rt/test/tsan/Linux/check_memcpy.cc6
-rwxr-xr-xcompiler-rt/test/tsan/Linux/check_memcpy.sh26
3 files changed, 7 insertions, 29 deletions
diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt
index 684b409bb8f..e5c51c8cd47 100644
--- a/compiler-rt/test/CMakeLists.txt
+++ b/compiler-rt/test/CMakeLists.txt
@@ -19,8 +19,8 @@ if(NOT ANDROID)
if(NOT COMPILER_RT_STANDALONE_BUILD)
# Use LLVM utils and Clang from the same build tree.
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS
- clang clang-headers FileCheck count not llvm-config llvm-nm llvm-symbolizer
- compiler-rt-headers)
+ clang clang-headers FileCheck count not llvm-config llvm-nm llvm-objdump
+ llvm-symbolizer compiler-rt-headers)
if (COMPILER_RT_HAS_PROFILE)
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS profile)
endif()
diff --git a/compiler-rt/test/tsan/Linux/check_memcpy.cc b/compiler-rt/test/tsan/Linux/check_memcpy.cc
index 86f2455fc3d..8ad04c07cf5 100644
--- a/compiler-rt/test/tsan/Linux/check_memcpy.cc
+++ b/compiler-rt/test/tsan/Linux/check_memcpy.cc
@@ -3,9 +3,13 @@
// check_memcpy.sh script.
// RUN: %clangxx_tsan -O1 %s -o %t
-// RUN: %S/check_memcpy.sh %t
+// RUN: llvm-objdump -d %t | FileCheck %s
int main() {
return 0;
}
+// CHECK-NOT: callq {{.*<(__interceptor_)?mem(cpy|set)>}}
+// tail calls:
+// CHECK-NOT: jmpq {{.*<(__interceptor_)?mem(cpy|set)>}}
+
diff --git a/compiler-rt/test/tsan/Linux/check_memcpy.sh b/compiler-rt/test/tsan/Linux/check_memcpy.sh
deleted file mode 100755
index 2b5f21fa882..00000000000
--- a/compiler-rt/test/tsan/Linux/check_memcpy.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# Script that ensures that TSan runtime does not contain compiler-emitted
-# memcpy and memset calls.
-
-set -eu
-
-if [[ "$#" != 1 ]]; then
- echo "Usage: $0 /path/to/binary/built/with/tsan"
- exit 1
-fi
-
-EXE=$1
-
-NCALL=$(objdump -d $EXE | egrep "callq .*<__interceptor_mem(cpy|set)>" | wc -l)
-if [ "$NCALL" != "0" ]; then
- echo FAIL: found $NCALL memcpy/memset calls
- exit 1
-fi
-
-# tail calls
-NCALL=$(objdump -d $EXE | egrep "jmpq .*<__interceptor_mem(cpy|set)>" | wc -l)
-if [ "$NCALL" != "0" ]; then
- echo FAIL: found $NCALL memcpy/memset calls
- exit 1
-fi
OpenPOWER on IntegriCloud