mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Made test case 241 precheck that the given name resolves to an ipv6 address,
or the test is skipped. Ideally, we should let this test case go over a few frequently used IPv6 localhost aliases...
This commit is contained in:
parent
84fd4686e2
commit
1f878aee69
@ -26,6 +26,9 @@ HTTP-IPv6 GET (using ip6-localhost)
|
|||||||
<command>
|
<command>
|
||||||
-g "http://ip6-localhost:%HTTP6PORT/241"
|
-g "http://ip6-localhost:%HTTP6PORT/241"
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
./server/resolve --ipv6 ip6-localhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1058,6 +1058,7 @@ sub singletest {
|
|||||||
chomp $why;
|
chomp $why;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print "prechecked $cmd\n" if($verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($why) {
|
if($why) {
|
||||||
|
@ -125,8 +125,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
he = gethostbyname(host);
|
he = gethostbyname(host);
|
||||||
|
|
||||||
printf("Resolve '%s' %s\n",
|
if(!he)
|
||||||
host, he?"SUCCESSFUL":"FAILED");
|
printf("Resolving '%s' FAILED\n", host);
|
||||||
|
|
||||||
return he?0:1;
|
return he?0:1;
|
||||||
}
|
}
|
||||||
@ -143,8 +143,9 @@ int main(int argc, char *argv[])
|
|||||||
hints.ai_flags = AI_CANONNAME;
|
hints.ai_flags = AI_CANONNAME;
|
||||||
rc = (getaddrinfo)(host, "80", &hints, &ai);
|
rc = (getaddrinfo)(host, "80", &hints, &ai);
|
||||||
|
|
||||||
printf("Resolve '%s' %s\n",
|
if(rc)
|
||||||
host, !rc?"SUCCESSFUL":"FAILED");
|
printf("Resolving '%s' FAILED\n", host);
|
||||||
|
|
||||||
return !rc?0:1;
|
return !rc?0:1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user