Commit 9eaf92d6 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

ws2_32/test: Don't test unsupported IP_MULTICAST_TTL on NT4.

parent a65ae0ea
...@@ -1380,17 +1380,24 @@ todo_wine ...@@ -1380,17 +1380,24 @@ todo_wine
s = socket(AF_INET, SOCK_DGRAM, 0); s = socket(AF_INET, SOCK_DGRAM, 0);
ok(s != INVALID_SOCKET, "Failed to create socket\n"); ok(s != INVALID_SOCKET, "Failed to create socket\n");
size = sizeof(i); size = sizeof(i);
for (i = 0; i < 4; i++) i = 0x0000000a;
err = setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, (char *) &i, size);
if (!err)
{ {
int k, j; for (i = 0; i < 4; i++)
const int tests[] = {0xffffff0a, 0xffff000b, 0xff00000c, 0x0000000d}; {
err = setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, (char *) &tests[i], i + 1); int k, j;
ok(!err, "Test [%d] Expected 0, got %d\n", i, err); const int tests[] = {0xffffff0a, 0xffff000b, 0xff00000c, 0x0000000d};
err = getsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, (char *) &k, &size); err = setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, (char *) &tests[i], i + 1);
ok(!err, "Test [%d] Expected 0, got %d\n", i, err); ok(!err, "Test [%d] Expected 0, got %d\n", i, err);
j = i != 3 ? tests[i] & ((1 << (i + 1) * 8) - 1) : tests[i]; err = getsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, (char *) &k, &size);
ok(k == j, "Test [%d] Expected 0x%x, got 0x%x\n", i, j, k); ok(!err, "Test [%d] Expected 0, got %d\n", i, err);
j = i != 3 ? tests[i] & ((1 << (i + 1) * 8) - 1) : tests[i];
ok(k == j, "Test [%d] Expected 0x%x, got 0x%x\n", i, j, k);
}
} }
else
win_skip("IP_MULTICAST_TTL is unsupported\n");
closesocket(s); closesocket(s);
/* test SO_PROTOCOL_INFOA invalid parameters */ /* test SO_PROTOCOL_INFOA invalid parameters */
......
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