[llvm-commits] [compiler-rt] r161951 - in /compiler-rt/trunk/lib/asan/lit_tests: CMakeLists.txt interface_symbols.c sanity_check_pure_c.c

Alexey Samsonov samsonov at google.com
Wed Aug 15 07:33:30 PDT 2012


Author: samsonov
Date: Wed Aug 15 09:33:30 2012
New Revision: 161951

URL: http://llvm.org/viewvc/llvm-project?rev=161951&view=rev
Log:
[ASan] lit tests: use nm instead of llvm-nm, until llvm-nm becomes usable on Mac. Port output test change in r161948 to lit

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt
    compiler-rt/trunk/lib/asan/lit_tests/interface_symbols.c
    compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c

Modified: compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt?rev=161951&r1=161950&r2=161951&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt Wed Aug 15 09:33:30 2012
@@ -15,7 +15,7 @@
   # Run ASan output tests only if we're not cross-compiling,
   # and can be sure that clang would produce working binaries.
   set(ASAN_TEST_DEPS
-    clang clang-headers FileCheck count not
+    clang clang-headers FileCheck count not llvm-nm
     ${ASAN_RUNTIME_LIBRARIES}
     )
   if(LLVM_INCLUDE_TESTS)

Modified: compiler-rt/trunk/lib/asan/lit_tests/interface_symbols.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/interface_symbols.c?rev=161951&r1=161950&r2=161951&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/interface_symbols.c (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/interface_symbols.c Wed Aug 15 09:33:30 2012
@@ -1,7 +1,7 @@
 // Check the presense of interface symbols in compiled file.
 
 // RUN: %clang -faddress-sanitizer -dead_strip -O2 %s -o %t.exe
-// RUN: llvm-nm %t.exe | egrep " [TW] " | sed "s/.* T //" | sed "s/.* W //" \
+// RUN: nm %t.exe | egrep " [TW] " | sed "s/.* T //" | sed "s/.* W //" \
 // RUN:    | grep "__asan_" | sed "s/___asan_/__asan_/" > %t.symbols
 // RUN: cat %p/../asan_interface.h | sed "s/\/\/.*//" | grep "__asan_.*(" \
 // RUN:    | sed "s/.* __asan_/__asan_/;s/(.*//" > %t.interface

Modified: compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c?rev=161951&r1=161950&r2=161951&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c Wed Aug 15 09:33:30 2012
@@ -1,10 +1,10 @@
 // Sanity checking a test in pure C.
 // RUN: %clang -g -faddress-sanitizer -O2 %s -o %t
-// RUN: %t 2>&1 | FileCheck %s
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
 
 // Sanity checking a test in pure C with -pie.
 // RUN: %clang -g -faddress-sanitizer -O2 %s -pie -o %t
-// RUN: %t 2>&1 | FileCheck %s
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdlib.h>
 int main() {
@@ -12,4 +12,8 @@
   free(x);
   return x[5];
   // CHECK: heap-use-after-free
+  // CHECK: free
+  // CHECK: main{{.*}}sanity_check_pure_c.c:12
+  // CHECK: malloc
+  // CHECK: main{{.*}}sanity_check_pure_c.c:11
 }





More information about the llvm-commits mailing list