[compiler-rt] r334884 - [sanitizer_common] Fix windows build caused by r334881

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 15 22:05:20 PDT 2018


Author: maskray
Date: Fri Jun 15 22:05:19 2018
New Revision: 334884

URL: http://llvm.org/viewvc/llvm-project?rev=334884&view=rev
Log:
[sanitizer_common] Fix windows build caused by r334881

Modified:
    compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_libc_test.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_libc_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_libc_test.cc?rev=334884&r1=334883&r2=334884&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_libc_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_libc_test.cc Fri Jun 15 22:05:19 2018
@@ -108,12 +108,14 @@ TEST(SanitizerCommon, FileOps) {
   temp_file_name(tmpfile, sizeof(tmpfile), "sanitizer_common.fileops.tmp.");
   fd_t fd = OpenFile(tmpfile, WrOnly);
   ASSERT_NE(fd, kInvalidFd);
-  ASSERT_FALSE(internal_iserror(internal_write(fd, "A", 1)));
+  ASSERT_TRUE(WriteToFile(fd, "A", 1));
   CloseFile(fd);
 
   fd = OpenFile(tmpfile, WrOnly);
   ASSERT_NE(fd, kInvalidFd);
+#if SANITIZER_POSIX
   EXPECT_EQ(internal_lseek(fd, 0, SEEK_END), 0u);
+#endif
   uptr bytes_written = 0;
   EXPECT_TRUE(WriteToFile(fd, str1, len1, &bytes_written));
   EXPECT_EQ(len1, bytes_written);




More information about the llvm-commits mailing list