[PATCH] [Msan] Fix the readv and preadv unit tests to pass on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Wed Jan 21 04:58:08 PST 2015
Updated to cover the preadv test.
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]);
@@ -648,7 +649,7 @@
ASSERT_GT(fd, 0);
int sz = preadv(fd, iov, 2, 3);
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.18505.patch
Type: text/x-patch
Size: 832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150121/587d5ade/attachment.bin>
More information about the llvm-commits
mailing list