cURL / Mailing Lists / curl-library / Single Mail

curl-library

Test 500: Mismatch between generated and expected output

From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Mon, 11 Jun 2012 12:26:49 +0200

Hello everyone,

I spotted a mistake in tests/libtest/lib500.c and tests/data/test500:
http://curl.haxx.se/dev/log.cgi?id=20120610222524-3999#prob34

The expected output is something like:

 IP: 127.0.0.1

The generated output contains time measurements like this:

 IP: 127.0.0.1
 namelookup vs connect: 0.000000 0.000000
 connect vs pretransfer: 0.000000 0.000000
 pretransfer vs starttransfer: 0.000000 0.000000
 starttransfer vs total: 0.000000 0.000000

This is caused by the following code in tests/libtest/lib500.c:

     /* since the timing will always vary we only compare relative differences
        between these 5 times */
     if(time_namelookup >= time_connect) {
       fprintf(moo, "namelookup vs connect: %f %f\n",
               time_namelookup, time_connect);
     }
     if(time_connect >= time_pretransfer) {
       fprintf(moo, "connect vs pretransfer: %f %f\n",
               time_connect, time_pretransfer);
     }
     if(time_pretransfer >= time_starttransfer) {
       fprintf(moo, "pretransfer vs starttransfer: %f %f\n",
               time_pretransfer, time_starttransfer);
     }
     if(time_starttransfer >= time_total) {
       fprintf(moo, "starttransfer vs total: %f %f\n",
               time_starttransfer, time_total);
     }

and the fact that the output is not included in tests/data/test500:

 <file name="log/ip500" mode="text">
 IP: %HOSTIP
 </file>

As I am not familiar with how to add a corresponding wildcard match to
the test500 file, I would like to ask someone else to either update
the expected output file or consider removing the time output from the
test.

Best regards,
Marc

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-11