[PATCH] [Msan] Fix the accept unit test to pass on FreeBSD
Phabricator
reviews at reviews.llvm.org
Wed Jan 21 01:47:55 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7083
Files:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
Index: compiler-rt/trunk/lib/msan/tests/msan_test.cc
===================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc
@@ -868,8 +868,11 @@
res = fcntl(connect_socket, F_SETFL, O_NONBLOCK);
ASSERT_EQ(0, res);
res = connect(connect_socket, (struct sockaddr *)&sai, sizeof(sai));
- ASSERT_EQ(-1, res);
- ASSERT_EQ(EINPROGRESS, errno);
+ // On FreeBSD this connection completes immediately.
+ if (res != 0) {
+ ASSERT_EQ(-1, res);
+ ASSERT_EQ(EINPROGRESS, errno);
+ }
__msan_poison(&sai, sizeof(sai));
int new_sock = accept(listen_socket, (struct sockaddr *)&sai, &sz);
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7083.18490.patch
Type: text/x-patch
Size: 697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150121/ea2efe4e/attachment.bin>
More information about the llvm-commits
mailing list