summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2015-04-09 12:37:05 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2015-04-09 12:37:05 +0000
commitc1a3f0c3fccdd273ddb1a303f3d6f88a6aafa298 (patch)
tree948ec1144ace00456619c44cd9765a7bb26f83cf /lib/sanitizer_common/tests
parentbc5cb4ba27fd6db917748ebc0ef5cba13a5fe6ee (diff)
Introduce CloseFile to be used instead of internal_close on non-POSIX
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_libc_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_libc_test.cc b/lib/sanitizer_common/tests/sanitizer_libc_test.cc
index bf3a93e20..14b63fc6c 100644
--- a/lib/sanitizer_common/tests/sanitizer_libc_test.cc
+++ b/lib/sanitizer_common/tests/sanitizer_libc_test.cc
@@ -82,7 +82,7 @@ TEST(SanitizerCommon, FileOps) {
ASSERT_NE(fd, kInvalidFd);
EXPECT_EQ(len1, internal_write(fd, str1, len1));
EXPECT_EQ(len2, internal_write(fd, str2, len2));
- internal_close(fd);
+ CloseFile(fd);
fd = OpenFile(tmpfile, RdOnly);
ASSERT_NE(fd, kInvalidFd);
@@ -113,7 +113,7 @@ TEST(SanitizerCommon, FileOps) {
internal_memset(buf, 0, len1);
EXPECT_EQ(len2, internal_read(fd, buf, len2));
EXPECT_EQ(0, internal_memcmp(buf, str2, len2));
- internal_close(fd);
+ CloseFile(fd);
internal_unlink(tmpfile);
}
#endif
@@ -151,7 +151,7 @@ TEST(SanitizerCommon, InternalMmapWithOffset) {
ASSERT_EQ('A', p[0]);
ASSERT_EQ('B', p[1]);
- internal_close(fd);
+ CloseFile(fd);
UnmapOrDie(p, page_size);
internal_unlink(tmpfile);
}