summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/sanitizer_libc_test.cc
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2015-01-08 13:28:22 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2015-01-08 13:28:22 +0000
commita5f7f78503eba888b1651e47cf04a1406f89ba55 (patch)
tree0fbaa2697e18baf15cbfa6444f85e58b1aa20bcc /lib/sanitizer_common/tests/sanitizer_libc_test.cc
parentbdb332ec69a9c4f4599e6558fb3f3d2c9efc869e (diff)
[Sanitizers] Fix internal_lseek() to work on FreeBSD
Differential Revision: http://reviews.llvm.org/D6825 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225443 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests/sanitizer_libc_test.cc')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_libc_test.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_libc_test.cc b/lib/sanitizer_common/tests/sanitizer_libc_test.cc
index 65cbe9a5d..8712d2c1b 100644
--- a/lib/sanitizer_common/tests/sanitizer_libc_test.cc
+++ b/lib/sanitizer_common/tests/sanitizer_libc_test.cc
@@ -142,8 +142,11 @@ TEST(SanitizerCommon, InternalMmapWithOffset) {
res = internal_ftruncate(fd, page_size * 2);
ASSERT_FALSE(internal_iserror(res));
- internal_lseek(fd, page_size, SEEK_SET);
- internal_write(fd, "AB", 2);
+ res = internal_lseek(fd, page_size, SEEK_SET);
+ ASSERT_FALSE(internal_iserror(res));
+
+ res = internal_write(fd, "AB", 2);
+ ASSERT_FALSE(internal_iserror(res));
char *p = (char *)MapWritableFileToMemory(nullptr, page_size, fd, page_size);
ASSERT_NE(nullptr, p);