From b1c8e0591cacf2b09184b629b2d666720fce818e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 13 Nov 2015 22:03:34 +0100 Subject: [PATCH] ntdll/tests: Print the correct status code in ok() messages. Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- dlls/ntdll/tests/info.c | 6 +++--- dlls/ntdll/tests/reg.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 83fdd53db70..21b2e6cb38b 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -288,7 +288,7 @@ static void test_query_process(void) /* test ReturnLength */ ReturnLength = 0; status = pNtQuerySystemInformation(SystemProcessInformation, NULL, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_LENGTH_MISMATCH got %08x\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH got %08x\n", status); ok( ReturnLength > 0 || broken(ReturnLength == 0) /* NT4, Win2K */, "Expected a ReturnLength to show the needed length\n"); @@ -1050,7 +1050,7 @@ static void test_query_process_debug_port(int argc, char **argv) status = pNtQueryInformationProcess(NULL, ProcessDebugPort, &debug_port, sizeof(debug_port), NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); + ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %#x.\n", status); status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, &debug_port, sizeof(debug_port) - 1, NULL); @@ -1302,7 +1302,7 @@ static void test_query_process_debug_flags(int argc, char **argv) status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, &debug_flags, sizeof(debug_flags), NULL); - ok(status == STATUS_INVALID_HANDLE || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); + ok(status == STATUS_INVALID_HANDLE || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INVALID_HANDLE, got %#x.\n", status); status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, &debug_flags, sizeof(debug_flags) - 1, NULL); diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 96f190bbafd..0e00f998ff7 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -639,7 +639,7 @@ static void test_NtQueryValueKey(void) ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status); status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, &pi, sizeof(pi), &len); - ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_BUFFER_TOO_SMALL instead of 0x%08x\n", status); + ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); ok(pi.Type == 0xff00ff00, "Type=%x\n", pi.Type); ok(pi.DataLength == 0, "DataLength=%u\n", pi.DataLength); pRtlFreeUnicodeString(&ValName);