[compiler-rt] r208323 - [ASan tests] More progress towards Windows support

Timur Iskhodzhanov timurrrr at google.com
Thu May 8 08:01:29 PDT 2014


Author: timurrrr
Date: Thu May  8 10:01:29 2014
New Revision: 208323

URL: http://llvm.org/viewvc/llvm-project?rev=208323&view=rev
Log:
[ASan tests] More progress towards Windows support

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_interface_test.cc

Modified: compiler-rt/trunk/lib/asan/tests/asan_interface_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_interface_test.cc?rev=208323&r1=208322&r2=208323&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_interface_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_interface_test.cc Thu May  8 10:01:29 2014
@@ -22,7 +22,7 @@ TEST(AddressSanitizerInterface, GetEstim
 }
 
 static const char* kGetAllocatedSizeErrorMsg =
-  "attempting to call __asan_get_allocated_size()";
+  "attempting to call __asan_get_allocated_size";
 
 TEST(AddressSanitizerInterface, GetAllocatedSizeAndOwnershipTest) {
   const size_t kArraySize = 100;
@@ -148,6 +148,7 @@ TEST(AddressSanitizerInterface, ExitCode
 
 static void MyDeathCallback() {
   fprintf(stderr, "MyDeathCallback\n");
+  fflush(0);  // On Windows, stderr doesn't flush on crash.
 }
 
 TEST(AddressSanitizerInterface, DeathCallbackTest) {
@@ -389,6 +390,7 @@ TEST(AddressSanitizerInterface, DISABLED
   free(array);
 }
 
+#if !defined(_WIN32)  // FIXME: This should really be a lit test.
 static void ErrorReportCallbackOneToZ(const char *report) {
   int report_len = strlen(report);
   ASSERT_EQ(6, write(2, "ABCDEF", 6));
@@ -403,6 +405,7 @@ TEST(AddressSanitizerInterface, SetError
                ASAN_PCRE_DOTALL "ABCDEF.*AddressSanitizer.*WRITE.*ABCDEF");
   __asan_set_error_report_callback(NULL);
 }
+#endif
 
 TEST(AddressSanitizerInterface, GetOwnershipStressTest) {
   std::vector<char *> pointers;





More information about the llvm-commits mailing list