[llvm-commits] [compiler-rt] r146701 - in /compiler-rt/trunk/lib/asan/tests: asan_test.cc test_output.sh

Kostya Serebryany kcc at google.com
Thu Dec 15 14:57:32 PST 2011


Author: kcc
Date: Thu Dec 15 16:57:32 2011
New Revision: 146701

URL: http://llvm.org/viewvc/llvm-project?rev=146701&view=rev
Log:
[asan] added a test to check that a global-buffer-overflow mentioned the module name; revert incorrect change in the test runner

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc
    compiler-rt/trunk/lib/asan/tests/test_output.sh

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=146701&r1=146700&r2=146701&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Thu Dec 15 16:57:32 2011
@@ -1577,6 +1577,13 @@
   EXPECT_DEATH(Ident(p[15]), "is ascii string 'FOOBAR123'");
 }
 
+TEST(AddressSanitizer, FileNameInGlobalReportTest) {
+  static char zoo[10];
+  const char *p = Ident(zoo);
+  // The file name should be present in the report.
+  EXPECT_DEATH(Ident(p[15]), "zoo.*asan_test.cc");
+}
+
 int *ReturnsPointerToALocalObject() {
   int a = 0;
   return Ident(&a);

Modified: compiler-rt/trunk/lib/asan/tests/test_output.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/test_output.sh?rev=146701&r1=146700&r2=146701&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/test_output.sh (original)
+++ compiler-rt/trunk/lib/asan/tests/test_output.sh Thu Dec 15 16:57:32 2011
@@ -38,8 +38,8 @@
         actual_t="$t"
       fi
       ./$exe 2>&1 | $SYMBOLIZER 2> /dev/null | c++filt | ./match_output.py $actual_t
-      #rm ./$exe
-      #[ -e "$so" ] && rm ./$so
+      rm ./$exe
+      [ -e "$so" ] && rm ./$so
     done
   done
 done





More information about the llvm-commits mailing list