Commit b7f06a4a authored by Gabriel Brand's avatar Gabriel Brand Committed by Alexandre Julliard

ws2_32/tests: Test binding UDP socket to invalid address.

parent c2d68348
......@@ -12527,6 +12527,13 @@ static void test_bind(void)
s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
WSASetLastError(0xdeadbeef);
ret = bind(s, (const struct sockaddr *)&invalid_addr, sizeof(invalid_addr));
todo_wine
ok(ret == -1, "expected failure\n");
todo_wine
ok(WSAGetLastError() == WSAEADDRNOTAVAIL, "got error %u\n", WSAGetLastError());
WSASetLastError(0xdeadbeef);
ret = bind(s, (const struct sockaddr *)&bind_addr, sizeof(bind_addr));
ok(!ret, "expected success\n");
ok(!WSAGetLastError() || WSAGetLastError() == 0xdeadbeef /* win <7 */, "got error %u\n", WSAGetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment