Used "127.0.0.1" instead of "localhost" in all tests to avoid accidental try by IPv6

This commit is contained in:
Evgeny Grin (Karlson2k)
2017-04-06 22:17:04 +03:00
parent 8851d88e40
commit 58274f943d
10 changed files with 31 additions and 26 deletions
+5
View File
@@ -1,3 +1,8 @@
Thu Apr 06 22:14:22 MSK 2017
Added warning for hypothetical extra large timeout.
Fixed incorrect timeout calculation under extra rare conditions.
Fixed accidental usage of IPv6 in testsuite in specific conditions. -EG
Wed Apr 05 14:14:22 MSK 2017
Updated autoinit_funcs.h to latest upstream version with proper support of
Oracle/Sun compiler. -EG
+2 -2
View File
@@ -117,14 +117,14 @@ gnutlscli_connect (int *sock,
"--insecure",
"-p",
destination,
"localhost",
"127.0.0.1",
(char *) NULL);
}
else if (TLS_CLI_OPENSSL == use_tls_tool)
{
snprintf (destination,
sizeof(destination),
"localhost:%u",
"127.0.0.1:%u",
(unsigned int) port);
execlp ("openssl",
"openssl",
+3 -3
View File
@@ -113,7 +113,7 @@ testInternalGet ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -157,7 +157,7 @@ testMultithreadedGet ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -218,7 +218,7 @@ testExternalGet ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
+3 -3
View File
@@ -139,7 +139,7 @@ testInternalGet ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -180,7 +180,7 @@ testMultithreadedGet ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
@@ -238,7 +238,7 @@ testExternalGet ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
+3 -3
View File
@@ -123,8 +123,8 @@ testLongUrlGet ()
url = malloc (VERY_LONG);
memset (url, 'a', VERY_LONG);
url[VERY_LONG - 1] = '\0';
memcpy (url, "http://localhost:11081/",
strlen ("http://localhost:11081/"));
memcpy (url, "http://127.0.0.1:11081/",
strlen ("http://127.0.0.1:11081/"));
curl_easy_setopt (c, CURLOPT_URL, url);
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
@@ -188,7 +188,7 @@ testLongHeaderGet ()
header = curl_slist_append (header, url);
curl_easy_setopt (c, CURLOPT_HTTPHEADER, header);
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
+3 -3
View File
@@ -169,7 +169,7 @@ testInternalPost ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -221,7 +221,7 @@ testMultithreadedPost ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
@@ -291,7 +291,7 @@ testExternalPost ()
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA);
+3 -3
View File
@@ -187,7 +187,7 @@ testInternalPost ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
pd = make_form ();
@@ -238,7 +238,7 @@ testMultithreadedPost ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
pd = make_form ();
@@ -306,7 +306,7 @@ testExternalPost ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:1082/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:1082/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
pd = make_form ();
+3 -3
View File
@@ -138,7 +138,7 @@ testInternalPut ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -189,7 +189,7 @@ testMultithreadedPut ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -258,7 +258,7 @@ testExternalPut ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
+3 -3
View File
@@ -144,7 +144,7 @@ testInternalPut ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -191,7 +191,7 @@ testMultithreadedPut ()
if (d == NULL)
return 16;
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -270,7 +270,7 @@ testExternalPut ()
{
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11082/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11082/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
+3 -3
View File
@@ -153,7 +153,7 @@ testInternalPut ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -205,7 +205,7 @@ testMultithreadedPut ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);
@@ -276,7 +276,7 @@ testExternalPut ()
fprintf (stderr, ".");
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11081/hello_world");
curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_READFUNCTION, &putBuffer);