wininet/tests: Silence noisy traces.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-06-12 08:53:53 +02:00 committed by Alexandre Julliard
parent 5b06498b93
commit a0af1eba27
1 changed files with 86 additions and 61 deletions

View File

@ -355,18 +355,21 @@ static VOID WINAPI callback(
switch (dwInternetStatus)
{
case INTERNET_STATUS_RESOLVING_NAME:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_RESOLVING_NAME \"%s\" %d\n",
GetCurrentThreadId(), hInternet, dwContext,
(LPCSTR)lpvStatusInformation,dwStatusInformationLength);
*(LPSTR)lpvStatusInformation = '\0';
break;
case INTERNET_STATUS_NAME_RESOLVED:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_NAME_RESOLVED \"%s\" %d\n",
GetCurrentThreadId(), hInternet, dwContext,
(LPCSTR)lpvStatusInformation,dwStatusInformationLength);
*(LPSTR)lpvStatusInformation = '\0';
break;
case INTERNET_STATUS_CONNECTING_TO_SERVER:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_CONNECTING_TO_SERVER \"%s\" %d\n",
GetCurrentThreadId(), hInternet, dwContext,
(LPCSTR)lpvStatusInformation,dwStatusInformationLength);
@ -375,6 +378,7 @@ static VOID WINAPI callback(
*(LPSTR)lpvStatusInformation = '\0';
break;
case INTERNET_STATUS_CONNECTED_TO_SERVER:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_CONNECTED_TO_SERVER \"%s\" %d\n",
GetCurrentThreadId(), hInternet, dwContext,
(LPCSTR)lpvStatusInformation,dwStatusInformationLength);
@ -383,6 +387,7 @@ static VOID WINAPI callback(
*(LPSTR)lpvStatusInformation = '\0';
break;
case INTERNET_STATUS_SENDING_REQUEST:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_SENDING_REQUEST %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
lpvStatusInformation,dwStatusInformationLength);
@ -391,11 +396,13 @@ static VOID WINAPI callback(
ok(dwStatusInformationLength == sizeof(DWORD),
"info length should be sizeof(DWORD) instead of %d\n",
dwStatusInformationLength);
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_REQUEST_SENT 0x%x %d\n",
GetCurrentThreadId(), hInternet, dwContext,
*(DWORD *)lpvStatusInformation,dwStatusInformationLength);
break;
case INTERNET_STATUS_RECEIVING_RESPONSE:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_RECEIVING_RESPONSE %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
lpvStatusInformation,dwStatusInformationLength);
@ -404,26 +411,31 @@ static VOID WINAPI callback(
ok(dwStatusInformationLength == sizeof(DWORD),
"info length should be sizeof(DWORD) instead of %d\n",
dwStatusInformationLength);
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_RESPONSE_RECEIVED 0x%x %d\n",
GetCurrentThreadId(), hInternet, dwContext,
*(DWORD *)lpvStatusInformation,dwStatusInformationLength);
break;
case INTERNET_STATUS_CTL_RESPONSE_RECEIVED:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_CTL_RESPONSE_RECEIVED %p %d\n",
GetCurrentThreadId(), hInternet,dwContext,
lpvStatusInformation,dwStatusInformationLength);
break;
case INTERNET_STATUS_PREFETCH:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_PREFETCH %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
lpvStatusInformation,dwStatusInformationLength);
break;
case INTERNET_STATUS_CLOSING_CONNECTION:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_CLOSING_CONNECTION %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
lpvStatusInformation,dwStatusInformationLength);
break;
case INTERNET_STATUS_CONNECTION_CLOSED:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_CONNECTION_CLOSED %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
lpvStatusInformation,dwStatusInformationLength);
@ -432,6 +444,7 @@ static VOID WINAPI callback(
ok(dwStatusInformationLength == sizeof(HINTERNET),
"info length should be sizeof(HINTERNET) instead of %d\n",
dwStatusInformationLength);
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_HANDLE_CREATED %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
*(HINTERNET *)lpvStatusInformation,dwStatusInformationLength);
@ -442,6 +455,7 @@ static VOID WINAPI callback(
ok(dwStatusInformationLength == sizeof(HINTERNET),
"info length should be sizeof(HINTERNET) instead of %d\n",
dwStatusInformationLength);
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_HANDLE_CLOSING %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
*(HINTERNET *)lpvStatusInformation, dwStatusInformationLength);
@ -455,6 +469,7 @@ static VOID WINAPI callback(
"info length should be sizeof(INTERNET_ASYNC_RESULT) instead of %d\n",
dwStatusInformationLength);
ok(iar->dwResult == 1 || iar->dwResult == 0, "iar->dwResult = %ld\n", iar->dwResult);
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_REQUEST_COMPLETE {%ld,%d} %d\n",
GetCurrentThreadId(), hInternet, dwContext,
iar->dwResult,iar->dwError,dwStatusInformationLength);
@ -464,6 +479,7 @@ static VOID WINAPI callback(
break;
}
case INTERNET_STATUS_REDIRECT:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_REDIRECT \"%s\" %d\n",
GetCurrentThreadId(), hInternet, dwContext,
(LPCSTR)lpvStatusInformation, dwStatusInformationLength);
@ -472,11 +488,13 @@ static VOID WINAPI callback(
SET_EXPECT(INTERNET_STATUS_DETECTING_PROXY);
break;
case INTERNET_STATUS_INTERMEDIATE_RESPONSE:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx INTERNET_STATUS_INTERMEDIATE_RESPONSE %p %d\n",
GetCurrentThreadId(), hInternet, dwContext,
lpvStatusInformation, dwStatusInformationLength);
break;
default:
if(winetest_debug > 1)
trace("%04x:Callback %p 0x%lx %d %p %d\n",
GetCurrentThreadId(), hInternet, dwContext, dwInternetStatus,
lpvStatusInformation, dwStatusInformationLength);
@ -795,6 +813,7 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
GetLastError());
length = 100;
if(winetest_debug > 1)
trace("Entering Query loop\n");
while (TRUE)
@ -823,7 +842,8 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
}
else if (GetLastError() == ERROR_IO_PENDING)
{
trace("PENDING\n");
if(winetest_debug > 1)
trace("pending\n");
/* on some tests, InternetQueryDataAvailable returns non-zero length and ERROR_IO_PENDING */
if(!(test->flags & TESTF_CHUNKED))
ok(!length, "InternetQueryDataAvailable returned ERROR_IO_PENDING and %u length\n", length);
@ -842,7 +862,8 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
}
CLEAR_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED);
trace("LENGTH %d\n", length);
if(winetest_debug > 1)
trace("length %u\n", length);
if(test->flags & TESTF_CHUNKED)
ok(length <= 8192, "length = %d, expected <= 8192\n", length);
if (length)
@ -854,7 +875,8 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
buffer[length]=0;
trace("ReadFile -> %s %i\n",res?"TRUE":"FALSE",length);
if(winetest_debug > 1)
trace("ReadFile -> %s %i\n", res ? "TRUE" : "FALSE", length);
if(test->content)
ok(!strcmp(buffer, test->content), "buffer = '%s', expected '%s'\n", buffer, test->content);
@ -870,6 +892,7 @@ static void InternetReadFile_test(int flags, const test_data_t *test)
CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTION_CLOSED, 2);
}
abort:
if(winetest_debug > 1)
trace("aborting\n");
close_async_handle(hi, 2);
first_connection_to_test_url = FALSE;
@ -6037,6 +6060,7 @@ static void WINAPI cb(HINTERNET handle, DWORD_PTR context, DWORD status, LPVOID
INTERNET_ASYNC_RESULT *result = info;
struct context *ctx = (struct context *)context;
if(winetest_debug > 1)
trace("%p 0x%08lx %u %p 0x%08x\n", handle, context, status, info, size);
switch(status) {
@ -6485,6 +6509,7 @@ static void WINAPI closetest_callback(HINTERNET hInternet, DWORD_PTR dwContext,
DWORD len, type;
BOOL res;
if(winetest_debug > 1)
trace("closetest_callback %p: %d\n", hInternet, dwInternetStatus);
ok(hInternet == closetest_session || hInternet == closetest_conn || hInternet == closetest_req,