[Msan] Fix the accept unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7083 llvm-svn: 226650
This commit is contained in:
parent
f6894e9c2c
commit
d518cb76ad
|
@ -868,8 +868,11 @@ TEST(MemorySanitizer, accept) {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue