From 3756e8110e6f7d8e1e8a47a048afe02fb3a09999 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 16 Jun 2018 05:05:19 +0000 Subject: [sanitizer_common] Fix windows build caused by r334881 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334884 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/tests/sanitizer_libc_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sanitizer_common/tests') diff --git a/lib/sanitizer_common/tests/sanitizer_libc_test.cc b/lib/sanitizer_common/tests/sanitizer_libc_test.cc index 5285cb01b..715da48f0 100644 --- a/lib/sanitizer_common/tests/sanitizer_libc_test.cc +++ b/lib/sanitizer_common/tests/sanitizer_libc_test.cc @@ -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); -- cgit v1.2.1