[PATCH] wininet/tests: Increase the maximum expected available data value.

Francois Gouget fgouget at free.fr
Thu Nov 28 06:41:55 CST 2019


With each Windows version InternetQueryDataAvailable() reports a
different value. 8192 from XP/2003 to Vista/2008; then 1460 from
Windows 7 to Windows 10 1709; and 24000 starting with Windows 10 1809.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---

This fixes a failure on Windows 10 1809. I'm not entirely sure it makes 
sense to check for this value. If we do, maybe we should leave a 
bigger margin? Like < 31000? Not that it did us much good last time...

Also, shouldn't we check that it is greater than some minimum value? 
Like at least 1000?

References:
https://test.winehq.org/data/190fb605c34ac1365076dff0a6560ddb42ca1ef2/index_Win10.html#wininet:http
Look for the entries with 4 failures.

https://testbot.winehq.org/JobDetails.pl?Key=60767
Look for the 'avail=' traces.

 dlls/wininet/tests/http.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index c7472c7ea09..a72c9ed0518 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -5549,9 +5549,9 @@ static void test_http_read(int port)
     readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "123", 0);
     readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf), NULL);
 
-    send_response_len_and_wait(20000, TRUE, &ib);
+    send_response_len_and_wait(32000, TRUE, &ib);
     avail = expect_data_available(req.request, -1);
-    ok(avail < 17000, "avail = %u\n", avail);
+    ok(avail < 25000, "avail = %u\n", avail);
 
     SET_WINE_ALLOW(INTERNET_STATUS_CLOSING_CONNECTION);
     SET_WINE_ALLOW(INTERNET_STATUS_CONNECTION_CLOSED);
-- 
2.20.1



More information about the wine-devel mailing list