1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

Windows: pass test-bind-error-fault

This commit is contained in:
Bert Belder 2011-05-04 00:27:24 +02:00
parent 2267758153
commit 30d16e2dfd
3 changed files with 5 additions and 4 deletions

View File

@ -247,6 +247,7 @@ static oio_err_code oio_translate_sys_error(int sys_errno) {
case WSAEALREADY: return OIO_EALREADY;
case ERROR_CONNECTION_REFUSED: return OIO_ECONNREFUSED;
case WSAECONNREFUSED: return OIO_ECONNREFUSED;
case WSAEFAULT: return OIO_EFAULT;
case WSAEINVAL: return OIO_EINVAL;
case ERROR_TOO_MANY_OPEN_FILES: return OIO_EMFILE;
case WSAEMFILE: return OIO_EMFILE;
@ -550,7 +551,7 @@ int oio_bind(oio_handle* handle, struct sockaddr* addr) {
} else if (addr->sa_family == AF_INET6) {
addrsize = sizeof(struct sockaddr_in6);
} else {
assert(0);
oio_set_sys_error(WSAEFAULT);
return -1;
}

View File

@ -124,7 +124,7 @@ TEST_IMPL(bind_error_addrnotavail_2) {
}
TEST_IMPL(bind_error_fault_1) {
TEST_IMPL(bind_error_fault) {
char garbage[] = "blah blah blah blah blah blah blah blah blah blah blah blah";
oio_handle server;
int r;

View File

@ -25,7 +25,7 @@ TEST_DECLARE (tcp_writealot)
TEST_DECLARE (bind_error_addrinuse)
TEST_DECLARE (bind_error_addrnotavail_1)
TEST_DECLARE (bind_error_addrnotavail_2)
TEST_DECLARE (bind_error_fault_1)
TEST_DECLARE (bind_error_fault)
TEST_DECLARE (bind_error_inval)
TEST_DECLARE (connection_fail)
TEST_DECLARE (close_cb_stack)
@ -49,7 +49,7 @@ TASK_LIST_START
TEST_ENTRY (bind_error_addrnotavail_2)
TEST_ENTRY (bind_error_fault_1)
TEST_ENTRY (bind_error_fault)
TEST_ENTRY (bind_error_inval)