diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 0d1f4a6dc5c..2e1614cd7cf 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -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