diff options
author | Alexander Potapenko <glider@google.com> | 2015-03-23 17:55:19 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2015-03-23 17:55:19 +0000 |
commit | 797ee97b8b0ce38ad455f6be107a73a69e99226a (patch) | |
tree | 3122d37ac1f97c1ad8be3ab6893f038a9e11e6ab /lib/sanitizer_common/tests | |
parent | fd5ab86f3ae74b83e4d2fee38e0af94dd1c264e0 (diff) |
[sanitizer] Fix file access modes in SanitizerCommon.InternalMmapWithOffset and SanitizerCommon.FileOps
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r-- | lib/sanitizer_common/tests/sanitizer_libc_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_libc_test.cc b/lib/sanitizer_common/tests/sanitizer_libc_test.cc index 689c6ed40..279f6fed9 100644 --- a/lib/sanitizer_common/tests/sanitizer_libc_test.cc +++ b/lib/sanitizer_common/tests/sanitizer_libc_test.cc @@ -85,7 +85,7 @@ TEST(SanitizerCommon, FileOps) { EXPECT_EQ(len2, internal_write(fd, str2, len2)); internal_close(fd); - openrv = OpenFile(tmpfile, WrOnly); + openrv = OpenFile(tmpfile, RdOnly); EXPECT_FALSE(internal_iserror(openrv)); fd = openrv; uptr fsize = internal_filesize(fd); @@ -134,7 +134,7 @@ TEST(SanitizerCommon, InternalMmapWithOffset) { char tmpfile[128]; temp_file_name(tmpfile, sizeof(tmpfile), "sanitizer_common.internalmmapwithoffset.tmp."); - uptr res = OpenFile(tmpfile, WrOnly); + uptr res = OpenFile(tmpfile, RdWr); ASSERT_FALSE(internal_iserror(res)); fd_t fd = res; |