[PATCH] [Msan] Fix the readv unit test to pass on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Wed Jan 21 04:28:08 PST 2015
Hi kcc, samsonov, eugenis,
FreeBSD's FILE_TO_READ is large enough to fill up both the buffers. The #include is to declare readv() on FreeBSD.
http://reviews.llvm.org/D7091
Files:
lib/msan/tests/msan_test.cc
Index: lib/msan/tests/msan_test.cc
===================================================================
--- lib/msan/tests/msan_test.cc
+++ lib/msan/tests/msan_test.cc
@@ -60,6 +60,7 @@
# include <netinet/ether.h>
#else
# include <netinet/in.h>
+# include <sys/uio.h>
#endif
#if defined(__i386__) || defined(__x86_64__)
@@ -624,7 +625,7 @@
ASSERT_GT(fd, 0);
int sz = readv(fd, iov, 2);
ASSERT_GE(sz, 0);
- ASSERT_LT(sz, 5 + 2000);
+ ASSERT_LE(sz, 5 + 2000);
ASSERT_GT((size_t)sz, iov[0].iov_len);
EXPECT_POISONED(buf[0]);
EXPECT_NOT_POISONED(buf[1]);
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7091.18502.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150121/e88f292c/attachment.bin>
More information about the llvm-commits
mailing list