Module: wine Branch: master Commit: 3fc4e884739388d576909f54bc767f866f209953 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3fc4e884739388d576909f54bc...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Tue Oct 23 23:52:33 2012 +0900
ntdll: Add ReturnLength test for NtQuerySystemInformation with SystemProcessInformation.
---
dlls/ntdll/tests/info.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 333dc4a..5dba2da 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -285,8 +285,14 @@ static void test_query_process(void) ULONG SystemInformationLength = sizeof(SYSTEM_PROCESS_INFORMATION_PRIVATE); SYSTEM_PROCESS_INFORMATION_PRIVATE *spi, *spi_buf = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength);
- /* Only W2K3 returns the needed length, the rest returns 0, so we have to loop */ - + /* test ReturnLength */ + ReturnLength = 0; + status = pNtQuerySystemInformation(SystemProcessInformation, NULL, 0, &ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_LENGTH_MISMATCH got %08x\n", status); + todo_wine ok( ReturnLength > 0 || broken(ReturnLength == 0) /* NT4, Win2K */, + "Expected a ReturnLength to show the needed length\n"); + + /* W2K3 and later returns the needed length, the rest returns 0, so we have to loop */ for (;;) { status = pNtQuerySystemInformation(SystemProcessInformation, spi_buf, SystemInformationLength, &ReturnLength);