Commit 8ddaf6cc authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ntdll/tests: Win64 printf format warning fixes.

parent c044f26e
......@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = ntdll.dll
IMPORTS = kernel32
EXTRADEFS = -DWINE_NO_LONG_AS_INT
CTESTS = \
atom.c \
......
......@@ -99,7 +99,7 @@ static void testQuery(void)
pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 );
nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value);
ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx\n",
ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %x got %x\n",
test - tests, test->var, test->status, nts );
if (nts == test->status) switch (nts)
{
......@@ -139,7 +139,7 @@ static void testSetHelper(LPWSTR* env, const char* var, const char* val, NTSTATU
pRtlMultiByteToUnicodeN( bval1, sizeof(bval1), NULL, val, strlen(val)+1 );
}
nts = pRtlSetEnvironmentVariable(env, &uvar, val ? &uval : NULL);
ok(nts == ret, "Setting var %s=%s (%lx/%lx)\n", var, val, nts, ret);
ok(nts == ret, "Setting var %s=%s (%x/%x)\n", var, val, nts, ret);
if (nts == STATUS_SUCCESS)
{
uval.Length = 0;
......@@ -155,7 +155,7 @@ static void testSetHelper(LPWSTR* env, const char* var, const char* val, NTSTATU
ok(val == NULL, "Couldn't find variable, but didn't delete it. val = %s\n", val);
break;
default:
ok(0, "Wrong ret %lu for %s\n", nts, var);
ok(0, "Wrong ret %u for %s\n", nts, var);
break;
}
}
......@@ -240,18 +240,18 @@ static void testExpand(void)
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
"Wrong returned length for %s: %lu\n", test->src, ul );
"Wrong returned length for %s: %u\n", test->src, ul );
us_dst.Length = 0;
us_dst.MaximumLength = sizeof(dst);
us_dst.Buffer = dst;
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts);
ok(nts == STATUS_SUCCESS, "Call failed (%u)\n", nts);
ok(ul == us_dst.Length + sizeof(WCHAR),
"Wrong returned length for %s: %lu\n", test->src, ul);
"Wrong returned length for %s: %u\n", test->src, ul);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
"Wrong returned length for %s: %lu\n", test->src, ul);
"Wrong returned length for %s: %u\n", test->src, ul);
ok(lstrcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n",
test->src, test->dst);
......@@ -260,9 +260,9 @@ static void testExpand(void)
us_dst.Buffer = dst;
dst[8] = '-';
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
"Wrong returned length for %s (with buffer too small): %lu\n", test->src, ul);
"Wrong returned length for %s (with buffer too small): %u\n", test->src, ul);
ok(memcmp(dst, rst, 8*sizeof(WCHAR)) == 0,
"Wrong result for %s (with buffer too small): expecting %s\n",
test->src, test->dst);
......
......@@ -71,7 +71,7 @@ static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message)
err = statustodoserror(win_nt);
ok(err == win32,
"%s (%lx): got %ld, expected %ld\n",
"%s (%x): got %d, expected %d\n",
message, win_nt, err, win32);
}
......@@ -82,7 +82,7 @@ static void cmp_call2(NTSTATUS win_nt, ULONG win32, const char* message)
err = statustodoserror(win_nt);
ok(err == win32 ||
(!strict && err == ERROR_MR_MID_NOT_FOUND),
"%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)\n",
"%s (%x): got %d, expected %d (or MID_NOT_FOUND)\n",
message, win_nt, err, win32);
}
......@@ -92,7 +92,7 @@ static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char*
err = statustodoserror(win_nt);
ok(err == win32_1 || (!strict && err == win32_2),
"%s (%lx): got %ld, expected %ld or %ld\n",
"%s (%x): got %d, expected %d or %d\n",
message, win_nt, err, win32_1, win32_2);
}
......@@ -103,7 +103,7 @@ static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char*
err = statustodoserror(win_nt);
ok(err == win32_1 ||
(!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)),
"%s (%lx): got %ld, expected %ld or %ld\n",
"%s (%x): got %d, expected %d or %d\n",
message, win_nt, err, win32_1, win32_2);
}
......
......@@ -169,20 +169,20 @@ static DWORD handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *fram
unsigned int i, entry = except - exceptions;
got_exception++;
trace( "exception: %lx flags:%lx addr:%p\n",
trace( "exception: %x flags:%x addr:%p\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress );
ok( rec->ExceptionCode == except->status,
"%u: Wrong exception code %lx/%lx\n", entry, rec->ExceptionCode, except->status );
"%u: Wrong exception code %x/%x\n", entry, rec->ExceptionCode, except->status );
ok( rec->ExceptionAddress == except->code + except->offset,
"%u: Wrong exception address %p/%p\n", entry,
rec->ExceptionAddress, except->code + except->offset );
ok( rec->NumberParameters == except->nb_params,
"%u: Wrong number of parameters %lu/%lu\n", entry, rec->NumberParameters, except->nb_params );
"%u: Wrong number of parameters %u/%u\n", entry, rec->NumberParameters, except->nb_params );
for (i = 0; i < rec->NumberParameters; i++)
ok( rec->ExceptionInformation[i] == except->params[i],
"%u: Wrong parameter %d: %lx/%lx\n",
"%u: Wrong parameter %d: %lx/%x\n",
entry, i, rec->ExceptionInformation[i], except->params[i] );
/* don't handle exception if it's not the address we expected */
......@@ -277,9 +277,9 @@ static void test_debug_regs(void)
pNtCurrentTeb()->Tib.ExceptionList = exc_frame.frame.Prev;
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
res = pNtGetContextThread(GetCurrentThread(), &ctx);
ok (res == STATUS_SUCCESS,"NtGetContextThread failed with %lx\n", res);
ok(ctx.Dr0 == 0x42424242,"failed to set debugregister 0 to 0x42424242, got %lx\n", ctx.Dr0);
ok(ctx.Dr7 == 0x155,"failed to set debugregister 7 to 0x155, got %lx\n", ctx.Dr7);
ok (res == STATUS_SUCCESS,"NtGetContextThread failed with %x\n", res);
ok(ctx.Dr0 == 0x42424242,"failed to set debugregister 0 to 0x42424242, got %x\n", ctx.Dr0);
ok(ctx.Dr7 == 0x155,"failed to set debugregister 7 to 0x155, got %x\n", ctx.Dr7);
}
/* test the single step exception behaviour */
......
......@@ -113,7 +113,7 @@ static void test_RtlExtendedMagicDivide(void)
for (i = 0; i < NB_MAGIC_DIVIDE; i++) {
result = pRtlExtendedMagicDivide(magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift);
ok(result == magic_divide[i].result,
"call failed: RtlExtendedMagicDivide(0x%lx%08lx, 0x%lx%08lx, %d) has result 0x%lx%08lx, expected 0x%lx%08lx\n",
"call failed: RtlExtendedMagicDivide(0x%x%08x, 0x%x%08x, %d) has result 0x%x%08x, expected 0x%x%08x\n",
(DWORD)(magic_divide[i].a >> 32), (DWORD)magic_divide[i].a, (DWORD)(magic_divide[i].b >> 32),
(DWORD)magic_divide[i].b, magic_divide[i].shift, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(magic_divide[i].result >> 32), (DWORD)magic_divide[i].result);
......@@ -324,26 +324,26 @@ static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t
} /* if */
} else {
ok(result == largeint2str->result,
"(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) has result %lx, expected: %lx\n",
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) has result %x, expected: %x\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value,
largeint2str->base, result, largeint2str->result);
if (result == STATUS_SUCCESS) {
ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0',
"(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string \"%s\" is not NULL terminated\n",
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string \"%s\" is not NULL terminated\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value,
largeint2str->base, ansi_str.Buffer);
} /* if */
} /* if */
ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(largeint2str->value >>32), (DWORD)largeint2str->value, largeint2str->base,
ansi_str.Buffer, expected_ansi_str.Buffer);
ok(unicode_string.Length == expected_unicode_string.Length,
"(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string has Length %d, expected: %d\n",
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has Length %d, expected: %d\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
unicode_string.Length, expected_unicode_string.Length);
ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength,
"(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string has MaximumLength %d, expected: %d\n",
"(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has MaximumLength %d, expected: %d\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
unicode_string.MaximumLength, expected_unicode_string.MaximumLength);
pRtlFreeAnsiString(&expected_ansi_str);
......@@ -376,11 +376,11 @@ static void one_RtlLargeIntegerToChar_test(int test_num, const largeint2str_t *l
result = pRtlLargeIntegerToChar(&value, largeint2str->base, largeint2str->MaximumLength, dest_str);
} /* if */
ok(result == largeint2str->result,
"(test %d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, [out]) has result %lx, expected: %lx\n",
"(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) has result %x, expected: %x\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
largeint2str->MaximumLength, result, largeint2str->result);
ok(memcmp(dest_str, largeint2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0,
"(test %d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base,
largeint2str->MaximumLength, dest_str, largeint2str->Buffer);
}
......@@ -399,25 +399,25 @@ static void test_RtlLargeIntegerToChar(void)
value = largeint2str[0].value;
result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"(test a): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
"(test a): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20,
largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
result = pRtlLargeIntegerToChar(&value, 20, 0, NULL);
ok(result == STATUS_INVALID_PARAMETER,
"(test b): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
"(test b): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20,
largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER);
result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL);
ok(result == STATUS_BUFFER_OVERFLOW,
"(test c): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
"(test c): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value,
largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW);
result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL);
ok(result == STATUS_ACCESS_VIOLATION,
"(test d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n",
"(test d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n",
(DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value,
largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION);
}
......
......@@ -266,7 +266,7 @@ static void test_RtlGetFullPathName_U(void)
len= strlen(test->rname) * sizeof(WCHAR);
pRtlMultiByteToUnicodeN(pathbufW , sizeof(pathbufW), NULL, test->path, strlen(test->path)+1 );
ret = pRtlGetFullPathName_U( pathbufW,MAX_PATH, rbufferW, &file_part);
ok( ret == len, "Wrong result %ld/%d for \"%s\"\n", ret, len, test->path );
ok( ret == len, "Wrong result %d/%d for \"%s\"\n", ret, len, test->path );
ok(pRtlUnicodeToMultiByteN(rbufferA,MAX_PATH,&reslen,rbufferW,(lstrlenW(rbufferW) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS,
"RtlUnicodeToMultiByteN failed\n");
ok(lstrcmpiA(rbufferA,test->rname) == 0, "Got \"%s\" expected \"%s\"\n",rbufferA,test->rname);
......
......@@ -153,10 +153,10 @@ static void ProcessConnectionRequest(PLPC_MESSAGE LpcMessage, PHANDLE pAcceptPor
ok(!*LpcMessage->Data, "Expected empty string!\n");
status = pNtAcceptConnectPort(pAcceptPortHandle, 0, LpcMessage, 1, 0, NULL);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
status = pNtCompleteConnectPort(*pAcceptPortHandle);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
}
static void ProcessLpcRequest(HANDLE PortHandle, PLPC_MESSAGE LpcMessage)
......@@ -171,7 +171,7 @@ static void ProcessLpcRequest(HANDLE PortHandle, PLPC_MESSAGE LpcMessage)
lstrcpy((LPSTR)LpcMessage->Data, REPLY);
status = pNtReplyPort(PortHandle, LpcMessage);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
ok(LpcMessage->MessageType == LPC_REQUEST,
"Expected LPC_REQUEST, got %d\n", LpcMessage->MessageType);
ok(!lstrcmp((LPSTR)LpcMessage->Data, REPLY),
......@@ -192,10 +192,10 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
sqos.EffectiveOnly = TRUE;
status = pNtConnectPort(&PortHandle, &port, &sqos, 0, 0, &len, NULL, NULL);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
status = pNtRegisterThreadTerminatePort(PortHandle);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
size = FIELD_OFFSET(LPC_MESSAGE, Data) + MAX_MESSAGE_LEN;
LpcMessage = HeapAlloc(GetProcessHeap(), 0, size);
......@@ -207,7 +207,7 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
lstrcpy((LPSTR)LpcMessage->Data, REQUEST1);
status = pNtRequestPort(PortHandle, LpcMessage);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
ok(LpcMessage->MessageType == 0, "Expected 0, got %d\n", LpcMessage->MessageType);
ok(!lstrcmp((LPSTR)LpcMessage->Data, REQUEST1),
"Expected %s, got %s\n", REQUEST1, LpcMessage->Data);
......@@ -220,7 +220,7 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
/* Send the message and wait for the reply */
status = pNtRequestWaitReplyPort(PortHandle, LpcMessage, out);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
ok(!lstrcmp((LPSTR)out->Data, REPLY), "Expected %s, got %s\n", REPLY, out->Data);
ok(out->MessageType == LPC_REPLY, "Expected LPC_REPLY, got %d\n", out->MessageType);
......@@ -246,7 +246,7 @@ static void test_ports_server(void)
status = pNtCreatePort(&PortHandle, &obj, 100, 100, 0);
todo_wine
{
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
}
size = FIELD_OFFSET(LPC_MESSAGE, Data) + MAX_MESSAGE_LEN;
......@@ -258,7 +258,7 @@ static void test_ports_server(void)
status = pNtReplyWaitReceivePort(PortHandle, NULL, NULL, LpcMessage);
todo_wine
{
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld(%lx)\n", status, status);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d(%x)\n", status, status);
}
/* STATUS_INVALID_HANDLE: win2k without admin rights will perform an
* endless loop here
......
......@@ -289,7 +289,7 @@ static void test_RtlQueryRegistryValues(void)
QueryTable[2].DefaultLength = 0;
status = pRtlQueryRegistryValues(RelativeTo, winetestpath.Buffer, QueryTable, 0, 0);
ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08x\n", status);
pRtlFreeHeap(GetProcessHeap(), 0, QueryTable);
}
......@@ -317,13 +317,13 @@ static void test_NtOpenKey(void)
/* NULL key */
status = pNtOpenKey(NULL, 0, &attr);
todo_wine
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
/* Length > sizeof(OBJECT_ATTRIBUTES) */
attr.Length *= 2;
status = pNtOpenKey(&key, am, &attr);
todo_wine
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status);
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
}
static void test_NtCreateKey(void)
......@@ -336,35 +336,35 @@ static void test_NtCreateKey(void)
/* All NULL */
status = pNtCreateKey(NULL, 0, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
/* Only the key */
status = pNtCreateKey(&key, 0, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */,
"Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status);
"Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status);
/* Only accessmask */
status = pNtCreateKey(NULL, am, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
/* Key and accessmask */
status = pNtCreateKey(&key, am, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */,
"Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status);
"Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
/* Only attributes */
status = pNtCreateKey(NULL, 0, &attr, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status);
ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0);
ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08x\n", status);
/* Length > sizeof(OBJECT_ATTRIBUTES) */
attr.Length *= 2;
status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0);
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status);
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
pNtClose(&key);
}
......@@ -382,10 +382,10 @@ static void test_NtSetValueKey(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, am, &attr);
ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
status = pNtSetValueKey(key, &ValName, 0, REG_DWORD, &data, sizeof(data));
ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status);
pRtlFreeUnicodeString(&ValName);
pNtClose(&key);
......@@ -396,7 +396,7 @@ static void test_RtlOpenCurrentUser(void)
NTSTATUS status;
HKEY handle;
status=pRtlOpenCurrentUser(KEY_READ, &handle);
ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08x\n", status);
pNtClose(&handle);
}
......@@ -405,10 +405,10 @@ static void test_RtlCheckRegistryKey(void)
NTSTATUS status;
status = pRtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, winetestpath.Buffer);
ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08x\n", status);
status = pRtlCheckRegistryKey((RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL), winetestpath.Buffer);
ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08x\n", status);
}
static void test_NtFlushKey(void)
......@@ -419,13 +419,13 @@ static void test_NtFlushKey(void)
ACCESS_MASK am = KEY_ALL_ACCESS;
status = pNtFlushKey(NULL);
ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status);
ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
pNtOpenKey(&hkey, am, &attr);
status = pNtFlushKey(hkey);
ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status);
pNtClose(hkey);
}
......@@ -438,13 +438,13 @@ static void test_NtDeleteKey(void)
ACCESS_MASK am = KEY_ALL_ACCESS;
status = pNtDeleteKey(NULL);
ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status);
ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&hkey, am, &attr);
status = pNtDeleteKey(hkey);
ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status);
}
static void test_RtlpNtQueryValueKey(void)
......@@ -452,7 +452,7 @@ static void test_RtlpNtQueryValueKey(void)
NTSTATUS status;
status = pRtlpNtQueryValueKey(NULL, NULL, NULL, NULL);
ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status);
ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status);
}
START_TEST(reg)
......
......@@ -425,14 +425,14 @@ static void test_RtlFindMostSignificantBit(void)
ulLong <<= i;
cPos = pRtlFindMostSignificantBit(ulLong);
ok (cPos == i, "didn't find MSB 0x%lx%08lx %d %d\n",
ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
/* Set all bits lower than bit i */
ulLong = ((ulLong - 1) << 1) | 1;
cPos = pRtlFindMostSignificantBit(ulLong);
ok (cPos == i, "didn't find MSB 0x%lx%08lx %d %d\n",
ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
}
cPos = pRtlFindMostSignificantBit(0);
......@@ -453,13 +453,13 @@ static void test_RtlFindLeastSignificantBit(void)
ulLong = (ULONGLONG)1 << i;
cPos = pRtlFindLeastSignificantBit(ulLong);
ok (cPos == i, "didn't find LSB 0x%lx%08lx %d %d\n",
ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
ulLong = ~((ULONGLONG)0) << i;
cPos = pRtlFindLeastSignificantBit(ulLong);
ok (cPos == i, "didn't find LSB 0x%lx%08lx %d %d\n",
ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n",
(DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos);
}
cPos = pRtlFindLeastSignificantBit(0);
......@@ -532,7 +532,7 @@ static void test_RtlFindSetRuns(void)
ULONG ulStart = 0;
ulCount = pRtlFindLongestRunSet(&bm, &ulStart);
ok(ulCount == 33 && ulStart == 1877,"didn't find longest %ld %ld\n",ulCount,ulStart);
ok(ulCount == 33 && ulStart == 1877,"didn't find longest %d %d\n",ulCount,ulStart);
memset(buff, 0, sizeof(buff));
ulCount = pRtlFindLongestRunSet(&bm, &ulStart);
......
......@@ -413,7 +413,7 @@ static void test_ulongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_itow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL\n",
"(test a): _itow(%d, NULL, 10) has result %p, expected: NULL\n",
ulong2str[0].value, result);
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
......@@ -422,7 +422,7 @@ static void test_ulongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ltow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL\n",
"(test b): _ltow(%d, NULL, 10) has result %p, expected: NULL\n",
ulong2str[0].value, result);
for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) {
......@@ -431,7 +431,7 @@ static void test_ulongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ultow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL\n",
"(test c): _ultow(%d, NULL, 10) has result %p, expected: NULL\n",
ulong2str[0].value, result);
}
......@@ -673,7 +673,7 @@ static void one_i64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
result = p_i64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _i64tow(0x%lx%08lx, [out], %d) has result %p, expected: %p\n",
"(test %d): _i64tow(0x%x%08x, [out], %d) has result %p, expected: %p\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, result, dest_wstr);
if (ulonglong2str->mask & 0x04) {
......@@ -684,14 +684,14 @@ static void one_i64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) {
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _i64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _i64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
} /* if */
} /* if */
} else {
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _i64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _i64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
} /* if */
......@@ -724,11 +724,11 @@ static void one_ui64tow_test(int test_num, const ulonglong2str_t *ulonglong2str)
result = p_ui64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base);
pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1);
ok(result == dest_wstr,
"(test %d): _ui64tow(0x%lx%08lx, [out], %d) has result %p, expected: %p\n",
"(test %d): _ui64tow(0x%x%08x, [out], %d) has result %p, expected: %p\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, result, dest_wstr);
ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0,
"(test %d): _ui64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
"(test %d): _ui64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n",
test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value,
ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer);
pRtlFreeAnsiString(&ansi_str);
......@@ -759,7 +759,7 @@ static void test_ulonglongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_i64tow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test d): _i64tow(0x%lx%08lx, NULL, 10) has result %p, expected: NULL\n",
"(test d): _i64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n",
(DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result);
if (p_ui64tow) {
......@@ -769,7 +769,7 @@ static void test_ulonglongtow(void)
expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0';
result = p_ui64tow(ulong2str[0].value, NULL, 10);
ok(result == NULL,
"(test e): _ui64tow(0x%lx%08lx, NULL, 10) has result %p, expected: NULL\n",
"(test e): _ui64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n",
(DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result);
} /* if */
}
......@@ -896,7 +896,7 @@ static void test_wtoi(void)
pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str);
result = p_wtoi(uni.Buffer);
ok(result == str2long[test_num].value,
"(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld\n",
"(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %d\n",
test_num, str2long[test_num].str, result, str2long[test_num].value);
pRtlFreeUnicodeString(&uni);
} /* for */
......@@ -913,7 +913,7 @@ static void test_wtol(void)
pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str);
result = p_wtol(uni.Buffer);
ok(result == str2long[test_num].value,
"(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld\n",
"(test %d): call failed: _wtol(\"%s\") has result %d, expected: %d\n",
test_num, str2long[test_num].str, result, str2long[test_num].value);
pRtlFreeUnicodeString(&uni);
} /* for */
......@@ -1051,7 +1051,7 @@ static void test_atoi64(void)
for (test_num = 0; test_num < NB_STR2LONGLONG; test_num++) {
result = p_atoi64(str2longlong[test_num].str);
ok(result == str2longlong[test_num].value,
"(test %d): call failed: _atoi64(\"%s\") has result 0x%lx%08lx, expected: 0x%lx%08lx\n",
"(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
} /* for */
......@@ -1068,7 +1068,7 @@ static void test_wtoi64(void)
pRtlCreateUnicodeStringFromAsciiz(&uni, str2longlong[test_num].str);
result = p_wtoi64(uni.Buffer);
ok(result == str2longlong[test_num].value,
"(test %d): call failed: _wtoi64(\"%s\") has result 0x%lx%08lx, expected: 0x%lx%08lx\n",
"(test %d): call failed: _wtoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
pRtlFreeUnicodeString(&uni);
......
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