Hello everyone,

I went through the whole chain of custom libtool test cases in order to
improve their Windows compatibility.
While doing this I also fixed the HTTP and RTSP test cases to use CRLF
for protocol element (e.g. header) termination.

Attached you will find 3 patches:
  1.) Contains all the general and Windows independent fixes to HTTP and
RTSP header line-endings.
  2.) Makes the custom libtool binaries use binary mode for stdout, just
like the curl tool does if --use-ascii is not explicitly specified and
also includes the required fixes to the test cases in order to support
that binary mode.
  3.) A small fix to avoid problems caused by low timer resolution on
Windows.

The patches that contain line-ending changes are gzip'ped in order to
preserve those through MIME and SMTP transformation.

I would appreciate any feedback on these patches before merging them.
Thanks in advance.

Best regards,
Marc

Attachment: 0001-testsuite-changed-HTTP-and-RTSP-header-line-endings-.patch.gz
Description: application/gzip

Attachment: 0002-testsuite-use-binary-output-mode-for-custom-curl-tes.patch.gz
Description: application/gzip

>From 702783ec1acacea743d8d3fd72eabfb2fb6e528e Mon Sep 17 00:00:00 2001
From: Marc Hoersken <[email protected]>
Date: Sat, 1 Feb 2014 01:01:10 +0100
Subject: [PATCH 3/3] test 500: workaround low timer resolution on Windows

Since the timer resolution is lower, there are actually cases that
the compared values are equal. Therefore we check for previous
timestamps being greater than the current one instead.
---
 tests/libtest/lib500.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c
index dda1d7f..b1c53fa 100644
--- a/tests/libtest/lib500.c
+++ b/tests/libtest/lib500.c
@@ -110,19 +110,19 @@ int test(char *URL)
 
       /* since the timing will always vary we only compare relative differences
          between these 5 times */
-      if(time_namelookup >= time_connect) {
+      if(time_namelookup > time_connect) {
         fprintf(moo, "namelookup vs connect: %f %f\n",
                 time_namelookup, time_connect);
       }
-      if(time_connect >= time_pretransfer) {
+      if(time_connect > time_pretransfer) {
         fprintf(moo, "connect vs pretransfer: %f %f\n",
                 time_connect, time_pretransfer);
       }
-      if(time_pretransfer >= time_starttransfer) {
+      if(time_pretransfer > time_starttransfer) {
         fprintf(moo, "pretransfer vs starttransfer: %f %f\n",
                 time_pretransfer, time_starttransfer);
       }
-      if(time_starttransfer >= time_total) {
+      if(time_starttransfer > time_total) {
         fprintf(moo, "starttransfer vs total: %f %f\n",
                 time_starttransfer, time_total);
       }
-- 
1.8.1.msysgit.1


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to