ntdll/tests: Remove traces from threadpool callbacks.

They seem to cause spurious failures.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-10 12:56:03 +01:00 committed by Alexandre Julliard
parent 23638b44ed
commit bf846d05ed
1 changed files with 1 additions and 32 deletions

View File

@ -119,7 +119,6 @@ static BOOL init_threadpool(void)
static DWORD CALLBACK rtl_work_cb(void *userdata)
{
HANDLE semaphore = userdata;
trace("Running rtl_work callback\n");
ReleaseSemaphore(semaphore, 1, NULL);
return 0;
}
@ -175,8 +174,6 @@ static void CALLBACK rtl_wait_cb(void *userdata, BOOLEAN timeout)
struct rtl_wait_info *info = userdata;
DWORD result;
trace("Running rtl_wait callback\n");
if (!timeout)
InterlockedIncrement(&info->userdata);
else
@ -196,7 +193,6 @@ static HANDLE rtl_wait_apc_semaphore;
static void CALLBACK rtl_wait_apc_cb(ULONG_PTR userdata)
{
trace("Running rtl_wait_apc callback\n");
if (rtl_wait_apc_semaphore)
ReleaseSemaphore(rtl_wait_apc_semaphore, 1, NULL);
}
@ -481,13 +477,11 @@ static void test_RtlRegisterWait(void)
static void CALLBACK simple_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
{
HANDLE semaphore = userdata;
trace("Running simple callback\n");
ReleaseSemaphore(semaphore, 1, NULL);
}
static void CALLBACK simple2_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
{
trace("Running simple2 callback\n");
Sleep(50);
InterlockedIncrement((LONG *)userdata);
}
@ -605,14 +599,12 @@ static void test_tp_simple(void)
static void CALLBACK work_cb(TP_CALLBACK_INSTANCE *instance, void *userdata, TP_WORK *work)
{
trace("Running work callback\n");
Sleep(100);
InterlockedIncrement((LONG *)userdata);
}
static void CALLBACK work2_cb(TP_CALLBACK_INSTANCE *instance, void *userdata, TP_WORK *work)
{
trace("Running work2 callback\n");
Sleep(100);
InterlockedExchangeAdd((LONG *)userdata, 0x10000);
}
@ -735,7 +727,6 @@ static void test_tp_work_scheduler(void)
static void CALLBACK simple_release_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
{
HANDLE *semaphores = userdata;
trace("Running simple release callback\n");
ReleaseSemaphore(semaphores, 1, NULL);
Sleep(200); /* wait until main thread is in TpReleaseCleanupGroupMembers */
}
@ -743,7 +734,6 @@ static void CALLBACK simple_release_cb(TP_CALLBACK_INSTANCE *instance, void *use
static void CALLBACK work_release_cb(TP_CALLBACK_INSTANCE *instance, void *userdata, TP_WORK *work)
{
HANDLE semaphore = userdata;
trace("Running work release callback\n");
ReleaseSemaphore(semaphore, 1, NULL);
Sleep(200); /* wait until main thread is in TpReleaseCleanupGroupMembers */
pTpReleaseWork(work);
@ -752,7 +742,6 @@ static void CALLBACK work_release_cb(TP_CALLBACK_INSTANCE *instance, void *userd
static void CALLBACK timer_release_cb(TP_CALLBACK_INSTANCE *instance, void *userdata, TP_TIMER *timer)
{
HANDLE semaphore = userdata;
trace("Running timer release callback\n");
ReleaseSemaphore(semaphore, 1, NULL);
Sleep(200); /* wait until main thread is in TpReleaseCleanupGroupMembers */
pTpReleaseTimer(timer);
@ -762,7 +751,6 @@ static void CALLBACK wait_release_cb(TP_CALLBACK_INSTANCE *instance, void *userd
TP_WAIT *wait, TP_WAIT_RESULT result)
{
HANDLE semaphore = userdata;
trace("Running wait release callback\n");
ReleaseSemaphore(semaphore, 1, NULL);
Sleep(200); /* wait until main thread is in TpReleaseCleanupGroupMembers */
pTpReleaseWait(wait);
@ -855,8 +843,6 @@ static void CALLBACK simple_group_cancel_cb(TP_CALLBACK_INSTANCE *instance, void
DWORD result;
int i;
trace("Running simple group cancel callback\n");
status = pTpCallbackMayRunLong(instance);
ok(status == STATUS_TOO_MANY_THREADS || broken(status == 1) /* Win Vista / 2008 */,
"expected STATUS_TOO_MANY_THREADS, got %08x\n", status);
@ -875,8 +861,6 @@ static void CALLBACK work_group_cancel_cb(TP_CALLBACK_INSTANCE *instance, void *
HANDLE *semaphores = userdata;
DWORD result;
trace("Running work group cancel callback\n");
ReleaseSemaphore(semaphores[1], 1, NULL);
result = WaitForSingleObject(semaphores[0], 200);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
@ -885,7 +869,6 @@ static void CALLBACK work_group_cancel_cb(TP_CALLBACK_INSTANCE *instance, void *
static void CALLBACK group_cancel_cleanup_release_cb(void *object, void *userdata)
{
HANDLE *semaphores = userdata;
trace("Running group cancel cleanup release callback\n");
group_cancel_tid = GetCurrentThreadId();
ok(object == (void *)0xdeadbeef, "expected 0xdeadbeef, got %p\n", object);
ReleaseSemaphore(semaphores[0], 1, NULL);
@ -894,7 +877,6 @@ static void CALLBACK group_cancel_cleanup_release_cb(void *object, void *userdat
static void CALLBACK group_cancel_cleanup_release2_cb(void *object, void *userdata)
{
HANDLE *semaphores = userdata;
trace("Running group cancel cleanup release2 callback\n");
group_cancel_tid = GetCurrentThreadId();
ok(object == userdata, "expected %p, got %p\n", userdata, object);
ReleaseSemaphore(semaphores[0], 1, NULL);
@ -902,7 +884,6 @@ static void CALLBACK group_cancel_cleanup_release2_cb(void *object, void *userda
static void CALLBACK group_cancel_cleanup_increment_cb(void *object, void *userdata)
{
trace("Running group cancel cleanup increment callback\n");
group_cancel_tid = GetCurrentThreadId();
InterlockedIncrement((LONG *)userdata);
}
@ -1089,7 +1070,6 @@ static void test_tp_group_cancel(void)
static void CALLBACK instance_semaphore_completion_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
{
HANDLE *semaphores = userdata;
trace("Running instance completion callback\n");
pTpCallbackReleaseSemaphoreOnCompletion(instance, semaphores[0], 1);
}
@ -1098,8 +1078,7 @@ static void CALLBACK instance_finalization_cb(TP_CALLBACK_INSTANCE *instance, vo
HANDLE *semaphores = userdata;
DWORD result;
trace("Running instance finalization callback\n");
Sleep(50);
result = WaitForSingleObject(semaphores[0], 100);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
ReleaseSemaphore(semaphores[1], 1, NULL);
@ -1156,8 +1135,6 @@ static void CALLBACK disassociate_cb(TP_CALLBACK_INSTANCE *instance, void *userd
HANDLE *semaphores = userdata;
DWORD result;
trace("Running disassociate callback\n");
pTpDisassociateCallback(instance);
result = WaitForSingleObject(semaphores[0], 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
@ -1169,8 +1146,6 @@ static void CALLBACK disassociate2_cb(TP_CALLBACK_INSTANCE *instance, void *user
HANDLE *semaphores = userdata;
DWORD result;
trace("Running disassociate2 callback\n");
pTpDisassociateCallback(instance);
result = WaitForSingleObject(semaphores[0], 100);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
@ -1182,8 +1157,6 @@ static void CALLBACK disassociate3_cb(TP_CALLBACK_INSTANCE *instance, void *user
HANDLE *semaphores = userdata;
DWORD result;
trace("Running disassociate3 callback\n");
pTpDisassociateCallback(instance);
result = WaitForSingleObject(semaphores[0], 100);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
@ -1300,7 +1273,6 @@ static void test_tp_disassociate(void)
static void CALLBACK timer_cb(TP_CALLBACK_INSTANCE *instance, void *userdata, TP_TIMER *timer)
{
HANDLE semaphore = userdata;
trace("Running timer callback\n");
ReleaseSemaphore(semaphore, 1, NULL);
}
@ -1440,7 +1412,6 @@ struct window_length_info
static void CALLBACK window_length_cb(TP_CALLBACK_INSTANCE *instance, void *userdata, TP_TIMER *timer)
{
struct window_length_info *info = userdata;
trace("Running window length callback\n");
info->ticks = GetTickCount();
ReleaseSemaphore(info->semaphore, 1, NULL);
}
@ -1558,8 +1529,6 @@ static void CALLBACK wait_cb(TP_CALLBACK_INSTANCE *instance, void *userdata,
TP_WAIT *wait, TP_WAIT_RESULT result)
{
struct wait_info *info = userdata;
trace("Running wait callback\n");
if (result == WAIT_OBJECT_0)
InterlockedIncrement(&info->userdata);
else if (result == WAIT_TIMEOUT)