Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/winhttp/tests/winhttp.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index b005514dfa..552f6ce778 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -1139,7 +1139,7 @@ static void test_secure_connection(void) ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); err = GetLastError(); if (!ret && (err == ERROR_WINHTTP_SECURE_FAILURE || err == ERROR_WINHTTP_CANNOT_CONNECT || - err == ERROR_WINHTTP_TIMEOUT)) + err == ERROR_WINHTTP_TIMEOUT || err == SEC_E_ILLEGAL_MESSAGE)) { skip("secure connection failed, skipping remaining secure tests\n"); goto cleanup; @@ -1172,6 +1172,11 @@ static void test_secure_connection(void) }
ret = WinHttpReceiveResponse(req, NULL); + if (!ret && GetLastError() == ERROR_WINHTTP_CONNECTION_ERROR) + { + skip("connection error, skipping remaining secure tests\n"); + goto cleanup; + } ok(ret, "failed to receive response %u\n", GetLastError());
available_size = 0; @@ -3780,9 +3785,9 @@ static void test_IWinHttpRequest(int port) V_VT( &data ) = VT_BSTR; V_BSTR( &data ) = SysAllocString( test_dataW ); hr = IWinHttpRequest_Send( req, data ); - ok( hr == S_OK || broken(hr == HRESULT_FROM_WIN32(ERROR_WINHTTP_INVALID_SERVER_RESPONSE)), - "got %08x\n", hr ); + ok( hr == S_OK || hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE ), "got %08x\n", hr ); SysFreeString( V_BSTR( &data ) ); + if (hr != S_OK) goto done;
hr = IWinHttpRequest_Open( req, NULL, NULL, empty ); ok( hr == E_INVALIDARG, "got %08x\n", hr ); @@ -4250,14 +4255,14 @@ static void test_IWinHttpRequest(int port) SysFreeString( url );
hr = IWinHttpRequest_Send( req, empty ); - ok( hr == S_OK || broken(hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE )), "got %08x\n", hr ); - if (hr == S_OK) - { - hr = IWinHttpRequest_get_ResponseText( req, &response ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) ); - SysFreeString( response ); - } + ok( hr == S_OK || hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE ) || + hr == SEC_E_ILLEGAL_MESSAGE /* winxp */, "got %08x\n", hr ); + if (hr != S_OK) goto done; + + hr = IWinHttpRequest_get_ResponseText( req, &response ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) ); + SysFreeString( response );
IWinHttpRequest_Release( req );
@@ -4294,8 +4299,8 @@ static void test_IWinHttpRequest(int port) ok( hr == S_OK, "got %08x\n", hr ); ok( status == HTTP_STATUS_DENIED, "got %d\n", status );
+done: IWinHttpRequest_Release( req ); - CoUninitialize(); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57278
Your paranoid android.
=== wvistau64 (32 bit report) ===
winhttp: winhttp.c:2505: Test failed: failed to receive response 12152 winhttp.c:2510: Test failed: failed to query status code 12019 winhttp.c:2511: Test failed: request failed unexpectedly 3735928559 winhttp.c:2526: Test failed: failed to query for raw headers: 12019 winhttp.c:2527: Test failed: WinHttpQueryHeaders returned invalid end of header string winhttp.c:2533: Test failed: failed to query for raw headers: 12019 winhttp.c:2534: Test failed: WinHttpQueryHeaders returned invalid end of header string winhttp.c:2536: Test failed: returned string has too many NULL characters winhttp.c:2541: Test failed: failed to read data 12019 winhttp.c:2542: Test failed: count was wrong winhttp.c:2543: Test failed: http data wrong
=== w7pro64 (task log) ===
Task errors: An error occurred while waiting for the test to complete: network read timed out (wait2/connect:AgentVersion.h:0/9) The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) The previous 2 run(s) terminated abnormally
=== debian10 (32 bit report) ===
winhttp: winhttp.c:4264: Test failed: got L"\0000ET\0000\0000\0000\0d386\4d70\0018\0098\0000\5355\0445\c780\6a3a\c764\6a3a\c720\6a3a\0001\0000\7ba8\0018\0409\0000\0001\0000\0004\0000\0002\0000"
=== debian10 (32 bit French report) ===
winhttp: winhttp.c:4264: Test failed: got L"\0000ET\0000\0000\0000\0d386\4d70\0018\0098\0000\5355\0445\c780\6a3a\c764\6a3a\c720\6a3a\0001\0000\7ba8\0018\0409\0000\0001\0000\0004\0000\0002\0000"
=== debian10 (32 bit Japanese:Japan report) ===
winhttp: winhttp.c:4264: Test failed: got L"\0000ET\0000\0000\0000\0d386\4d70\0018\0098\0000\5355\0445\c780\6a3a\c764\6a3a\c720\6a3a\0001\0000\7ba8\0018\0409\0000\0001\0000\0004\0000\0002\0000"
=== debian10 (32 bit Chinese:China report) ===
winhttp: winhttp.c:4264: Test failed: got L"\0000ET\0000\0000\0000\0d386\4d70\0018\0098\0000\5355\0445\c780\6a3a\c764\6a3a\c720\6a3a\0001\0000\7ba8\0018\0409\0000\0001\0000\0004\0000\0002\0000"
=== debian10 (32 bit WoW report) ===
winhttp: winhttp.c:4264: Test failed: got L"\0000ET\0000\0000\0000\0d386\5078\0018\0098\0000\5355\0445\c780\6a3a\c764\6a3a\c720\6a3a\0001\0000\7eb0\0018\0409\0000\0001\0000\0004\0000\0002\0000"
=== debian10 (64 bit WoW report) ===
winhttp: winhttp.c:4264: Test failed: got L"\0000ET\0000\0000\0000\0d386\5020\0018\0098\0000\5355\0445\c780\6a3a\c764\6a3a\c720\6a3a\0001\0000\7e58\0018\0409\0000\0001\0000\0004\0000\0002\0000"