Commit 0a2ef176 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32/tests: Avoid intermittent test failures.

parent d6e1e710
......@@ -1716,7 +1716,7 @@ static void test_thread_info(void)
/* FIXME: Add remaining classes */
};
HANDLE thread;
ULONG i, status, ret_len, size;
ULONG i, status, ret_len;
if (!pOpenThread)
{
......@@ -1739,8 +1739,19 @@ static void test_thread_info(void)
for (i = 0; i < sizeof(info_size)/sizeof(info_size[0]); i++)
{
size = info_size[i];
if (!size) size = sizeof(buf);
memset(buf, 0, sizeof(buf));
#ifdef __i386__
if (i == ThreadDescriptorTableEntry)
{
CONTEXT ctx;
THREAD_DESCRIPTOR_INFORMATION *tdi = (void *)buf;
ctx.ContextFlags = CONTEXT_SEGMENTS;
GetThreadContext(GetCurrentThread(), &ctx);
tdi->Selector = ctx.SegDs;
}
#endif
ret_len = 0;
status = pNtQueryInformationThread(thread, i, buf, info_size[i], &ret_len);
if (status == STATUS_NOT_IMPLEMENTED) continue;
......@@ -1755,12 +1766,18 @@ static void test_thread_info(void)
ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len);
break;
#ifdef __i386__
case ThreadDescriptorTableEntry:
ok(status == STATUS_SUCCESS || broken(status == STATUS_ACCESS_DENIED) /* testbot VM is broken */,
"for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len);
break;
#endif
case ThreadTimes:
todo_wine
ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len);
break;
case ThreadDescriptorTableEntry:
case ThreadAffinityMask:
case ThreadQuerySetWin32StartAddress:
todo_wine
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment