[compiler-rt] r254959 - [TSan] Use llvm-objdump+FileCheck instead of standalone .sh script.
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 7 14:43:30 PST 2015
Author: samsonov
Date: Mon Dec 7 16:43:30 2015
New Revision: 254959
URL: http://llvm.org/viewvc/llvm-project?rev=254959&view=rev
Log:
[TSan] Use llvm-objdump+FileCheck instead of standalone .sh script.
Removed:
compiler-rt/trunk/test/tsan/Linux/check_memcpy.sh
Modified:
compiler-rt/trunk/test/CMakeLists.txt
compiler-rt/trunk/test/tsan/Linux/check_memcpy.cc
Modified: compiler-rt/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/CMakeLists.txt?rev=254959&r1=254958&r2=254959&view=diff
==============================================================================
--- compiler-rt/trunk/test/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/CMakeLists.txt Mon Dec 7 16:43:30 2015
@@ -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()
Modified: compiler-rt/trunk/test/tsan/Linux/check_memcpy.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Linux/check_memcpy.cc?rev=254959&r1=254958&r2=254959&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Linux/check_memcpy.cc (original)
+++ compiler-rt/trunk/test/tsan/Linux/check_memcpy.cc Mon Dec 7 16:43:30 2015
@@ -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)>}}
+
Removed: compiler-rt/trunk/test/tsan/Linux/check_memcpy.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Linux/check_memcpy.sh?rev=254958&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/Linux/check_memcpy.sh (original)
+++ compiler-rt/trunk/test/tsan/Linux/check_memcpy.sh (removed)
@@ -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
More information about the llvm-commits
mailing list