winetest: Don't try to truncate reports to submit them.

Francois Gouget fgouget at free.fr
Thu May 22 04:10:07 CDT 2014


The test.winehq.org policy is to reject truncated reports anyway. So submit the report as is and let the website decide what to do with it.
---

Also this avoids having the file size limit in both WineTest and the 
website and run the risk of getting inconsistencies.

 programs/winetest/send.c | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/programs/winetest/send.c b/programs/winetest/send.c
index 7767d25..4676228 100644
--- a/programs/winetest/send.c
+++ b/programs/winetest/send.c
@@ -154,15 +154,9 @@ send_file_direct (const char *name)
         report (R_WARNING, "Can't open file '%s': %u", name, GetLastError());
         goto abort1;
     }
-    filesize = GetFileSize( file, NULL );
-    if (filesize > 1.5*1024*1024) {
-        report (R_WARNING,
-                "File too big (%.1f MB > 1.5 MB); submitting partial report.",
-                filesize/1024.0/1024);
-        filesize = (DWORD) 1.5*1024*1024;
-    }
 
     report (R_STATUS, "Sending header");
+    filesize = GetFileSize( file, NULL );
     str = strmake (&total, body1, name);
     ret = send_str (s, head, filesize + total + sizeof body2 - 1) ||
         send_buf (s, str, total);
@@ -297,14 +291,6 @@ send_file_wininet (const char *name)
         goto done;
     }
 
-    filesize = GetFileSize( file, NULL );
-    if (filesize > 1.5*1024*1024) {
-        report (R_WARNING,
-                "File too big (%.1f MB > 1.5 MB); submitting partial report.",
-                filesize/1024.0/1024);
-        filesize = 1.5*1024*1024;
-    }
-
     report (R_STATUS, "Opening HTTP connection to " SERVER_NAME);
     session = pInternetOpen (USER_AGENT, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
     if (session == NULL) {
@@ -325,6 +311,7 @@ send_file_wininet (const char *name)
     }
 
     report (R_STATUS, "Sending request");
+    filesize = GetFileSize( file, NULL );
     str = strmake (&total, body1, name);
     memset(&buffers_in, 0, sizeof(INTERNET_BUFFERSA));
     buffers_in.dwStructSize = sizeof(INTERNET_BUFFERSA);
-- 
2.0.0.rc0



More information about the wine-patches mailing list