Wine-Devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2022
- 80 participants
- 950 discussions
[PATCH 1/6] winealsa: Move MIDM_PREPARE and MIDM_UNPREPARE to the unixlib.
by Huw Davies March 18, 2022
by Huw Davies March 18, 2022
March 18, 2022
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/winealsa.drv/alsa.c | 1 +
dlls/winealsa.drv/alsamidi.c | 57 ++++++++++++++++++++++++++++++++
dlls/winealsa.drv/midi.c | 64 ++++++++----------------------------
dlls/winealsa.drv/unixlib.h | 12 +++++++
4 files changed, 84 insertions(+), 50 deletions(-)
diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c
index 6d307eb84bf..b629cd8317a 100644
--- a/dlls/winealsa.drv/alsa.c
+++ b/dlls/winealsa.drv/alsa.c
@@ -2446,6 +2446,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
get_prop_value,
midi_init,
midi_out_message,
+ midi_in_message,
midi_seq_lock, /* temporary */
midi_seq_open,
diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c
index b99c3aedd33..1eb5d7db33f 100644
--- a/dlls/winealsa.drv/alsamidi.c
+++ b/dlls/winealsa.drv/alsamidi.c
@@ -833,6 +833,37 @@ static UINT midi_out_reset(WORD dev_id)
return MMSYSERR_NOERROR;
}
+static UINT midi_in_prepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size)
+{
+ TRACE("(%04X, %p, %d);\n", dev_id, hdr, hdr_size);
+
+ if (hdr_size < offsetof(MIDIHDR, dwOffset) || !hdr || !hdr->lpData)
+ return MMSYSERR_INVALPARAM;
+ if (hdr->dwFlags & MHDR_PREPARED)
+ return MMSYSERR_NOERROR;
+
+ hdr->lpNext = 0;
+ hdr->dwFlags |= MHDR_PREPARED;
+ hdr->dwFlags &= ~(MHDR_DONE | MHDR_INQUEUE);
+
+ return MMSYSERR_NOERROR;
+}
+
+static UINT midi_in_unprepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size)
+{
+ TRACE("(%04X, %p, %d);\n", dev_id, hdr, hdr_size);
+
+ if (hdr_size < offsetof(MIDIHDR, dwOffset) || !hdr == 0 || !hdr->lpData)
+ return MMSYSERR_INVALPARAM;
+ if (!(hdr->dwFlags & MHDR_PREPARED))
+ return MMSYSERR_NOERROR;
+ if (hdr->dwFlags & MHDR_INQUEUE)
+ return MIDIERR_STILLPLAYING;
+
+ hdr->dwFlags &= ~MHDR_PREPARED;
+
+ return MMSYSERR_NOERROR;
+}
NTSTATUS midi_out_message(void *args)
{
@@ -888,3 +919,29 @@ NTSTATUS midi_out_message(void *args)
return STATUS_SUCCESS;
}
+
+NTSTATUS midi_in_message(void *args)
+{
+ struct midi_in_message_params *params = args;
+
+ switch (params->msg)
+ {
+ case DRVM_EXIT:
+ case DRVM_ENABLE:
+ case DRVM_DISABLE:
+ /* FIXME: Pretend this is supported */
+ *params->err = MMSYSERR_NOERROR;
+ break;
+ case MIDM_PREPARE:
+ *params->err = midi_in_prepare(params->dev_id, (MIDIHDR *)params->param_1, params->param_2);
+ break;
+ case MIDM_UNPREPARE:
+ *params->err = midi_in_unprepare(params->dev_id, (MIDIHDR *)params->param_1, params->param_2);
+ break;
+ default:
+ TRACE("Unsupported message\n");
+ *params->err = MMSYSERR_NOTSUPPORTED;
+ }
+
+ return STATUS_SUCCESS;
+}
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 53b683f59c8..94de37d6176 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -510,44 +510,6 @@ static DWORD midAddBuffer(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
return MMSYSERR_NOERROR;
}
-/**************************************************************************
- * midPrepare [internal]
- */
-static DWORD midPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
-{
- TRACE("(%04X, %p, %d);\n", wDevID, lpMidiHdr, dwSize);
-
- if (dwSize < offsetof(MIDIHDR,dwOffset) || lpMidiHdr == 0 || lpMidiHdr->lpData == 0)
- return MMSYSERR_INVALPARAM;
- if (lpMidiHdr->dwFlags & MHDR_PREPARED)
- return MMSYSERR_NOERROR;
-
- lpMidiHdr->lpNext = 0;
- lpMidiHdr->dwFlags |= MHDR_PREPARED;
- lpMidiHdr->dwFlags &= ~(MHDR_DONE|MHDR_INQUEUE); /* flags cleared since w2k */
-
- return MMSYSERR_NOERROR;
-}
-
-/**************************************************************************
- * midUnprepare [internal]
- */
-static DWORD midUnprepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
-{
- TRACE("(%04X, %p, %d);\n", wDevID, lpMidiHdr, dwSize);
-
- if (dwSize < offsetof(MIDIHDR,dwOffset) || lpMidiHdr == 0 || lpMidiHdr->lpData == 0)
- return MMSYSERR_INVALPARAM;
- if (!(lpMidiHdr->dwFlags & MHDR_PREPARED))
- return MMSYSERR_NOERROR;
- if (lpMidiHdr->dwFlags & MHDR_INQUEUE)
- return MIDIERR_STILLPLAYING;
-
- lpMidiHdr->dwFlags &= ~MHDR_PREPARED;
-
- return MMSYSERR_NOERROR;
-}
-
/**************************************************************************
* midReset [internal]
*/
@@ -633,27 +595,21 @@ static BOOL ALSA_MidiInit(void)
DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
+ struct midi_in_message_params params;
+ UINT err;
+
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
switch (wMsg) {
case DRVM_INIT:
ALSA_MidiInit();
return 0;
- case DRVM_EXIT:
- case DRVM_ENABLE:
- case DRVM_DISABLE:
- /* FIXME: Pretend this is supported */
- return 0;
case MIDM_OPEN:
return midOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2);
case MIDM_CLOSE:
return midClose(wDevID);
case MIDM_ADDBUFFER:
return midAddBuffer(wDevID, (LPMIDIHDR)dwParam1, dwParam2);
- case MIDM_PREPARE:
- return midPrepare(wDevID, (LPMIDIHDR)dwParam1, dwParam2);
- case MIDM_UNPREPARE:
- return midUnprepare(wDevID, (LPMIDIHDR)dwParam1, dwParam2);
case MIDM_GETDEVCAPS:
return midGetDevCaps(wDevID, (LPMIDIINCAPSW)dwParam1,dwParam2);
case MIDM_GETNUMDEVS:
@@ -664,10 +620,18 @@ DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
return midStart(wDevID);
case MIDM_STOP:
return midStop(wDevID);
- default:
- TRACE("Unsupported message\n");
}
- return MMSYSERR_NOTSUPPORTED;
+
+ params.dev_id = wDevID;
+ params.msg = wMsg;
+ params.user = dwUser;
+ params.param_1 = dwParam1;
+ params.param_2 = dwParam2;
+ params.err = &err;
+
+ ALSA_CALL(midi_in_message, ¶ms);
+
+ return err;
}
/**************************************************************************
diff --git a/dlls/winealsa.drv/unixlib.h b/dlls/winealsa.drv/unixlib.h
index c1dbd83b84e..7907ad24efa 100644
--- a/dlls/winealsa.drv/unixlib.h
+++ b/dlls/winealsa.drv/unixlib.h
@@ -254,6 +254,16 @@ struct midi_out_message_params
struct notify_context *notify;
};
+struct midi_in_message_params
+{
+ UINT dev_id;
+ UINT msg;
+ UINT_PTR user;
+ UINT_PTR param_1;
+ UINT_PTR param_2;
+ UINT *err;
+};
+
struct midi_seq_open_params
{
int close;
@@ -288,6 +298,7 @@ enum alsa_funcs
alsa_get_prop_value,
alsa_midi_init,
alsa_midi_out_message,
+ alsa_midi_in_message,
alsa_midi_seq_lock, /* temporary */
alsa_midi_seq_open,
@@ -295,6 +306,7 @@ enum alsa_funcs
NTSTATUS midi_init(void *args) DECLSPEC_HIDDEN;
NTSTATUS midi_out_message(void *args) DECLSPEC_HIDDEN;
+NTSTATUS midi_in_message(void *args) DECLSPEC_HIDDEN;
NTSTATUS midi_seq_lock(void *args) DECLSPEC_HIDDEN;
NTSTATUS midi_seq_open(void *args) DECLSPEC_HIDDEN;
--
2.25.1
1
0
[PATCH] winebus.sys: Assume SDL device effects are running by default.
by Rémi Bernon March 18, 2022
by Rémi Bernon March 18, 2022
March 18, 2022
If we cannot read their status with SDL_HapticGetEffectStatus.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/winebus.sys/bus_sdl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c
index 07fdd9d3fa2..a1e7942fe59 100644
--- a/dlls/winebus.sys/bus_sdl.c
+++ b/dlls/winebus.sys/bus_sdl.c
@@ -752,12 +752,13 @@ static void check_device_effects_state(struct sdl_device *impl)
unsigned int i, ret;
if (!impl->sdl_haptic) return;
- if (!(impl->effect_support & SDL_HAPTIC_STATUS)) return;
+ if (!(impl->effect_support & EFFECT_SUPPORT_PHYSICAL)) return;
for (i = 0; i < ARRAY_SIZE(impl->effect_ids); ++i)
{
if (impl->effect_ids[i] == -1) continue;
- ret = pSDL_HapticGetEffectStatus(impl->sdl_haptic, impl->effect_ids[i]);
+ if (!(impl->effect_support & SDL_HAPTIC_STATUS)) ret = 1;
+ else ret = pSDL_HapticGetEffectStatus(impl->sdl_haptic, impl->effect_ids[i]);
if (impl->effect_state[i] == ret) continue;
impl->effect_state[i] = ret;
hid_device_set_effect_state(iface, i, effect_flags | (ret == 1 ? EFFECT_STATE_EFFECT_PLAYING : 0));
--
2.35.1
1
0
[PATCH] dinput: Allow setting DIPROP_AUTOCENTER when exclusively acquired.
by Rémi Bernon March 18, 2022
by Rémi Bernon March 18, 2022
March 18, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/dinput/device.c | 2 ++
dlls/dinput/tests/force_feedback.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 6cc190ee7fb..d881669c06f 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1009,6 +1009,8 @@ static HRESULT check_property( struct dinput_device *impl, const GUID *guid, con
switch (LOWORD( guid ))
{
case (DWORD_PTR)DIPROP_AUTOCENTER:
+ if (impl->status == STATUS_ACQUIRED && !is_exclusively_acquired( impl )) return DIERR_ACQUIRED;
+ break;
case (DWORD_PTR)DIPROP_AXISMODE:
case (DWORD_PTR)DIPROP_BUFFERSIZE:
case (DWORD_PTR)DIPROP_PHYSICALRANGE:
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c
index 97aed4c993b..ce460147f9d 100644
--- a/dlls/dinput/tests/force_feedback.c
+++ b/dlls/dinput/tests/force_feedback.c
@@ -2924,6 +2924,9 @@ static BOOL test_force_feedback_joystick( DWORD version )
ok( hr == DI_OK, "Unacquire returned: %#lx\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_BACKGROUND | DISCL_EXCLUSIVE );
ok( hr == DI_OK, "SetCooperativeLevel returned: %#lx\n", hr );
+ prop_dword.dwData = DIPROPAUTOCENTER_ON;
+ hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph );
+ ok( hr == DI_OK, "SetProperty DIPROP_AUTOCENTER returned %#lx\n", hr );
set_hid_expect( file, expect_acquire, sizeof(expect_acquire) );
hr = IDirectInputDevice8_Acquire( device );
--
2.35.1
1
0
[PATCH] windows.gaming.input: Fix vector InsertAt / RemoveAt copy sizes.
by Rémi Bernon March 18, 2022
by Rémi Bernon March 18, 2022
March 18, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/windows.gaming.input/vector.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/windows.gaming.input/vector.c b/dlls/windows.gaming.input/vector.c
index c98c89195d1..db1a9057682 100644
--- a/dlls/windows.gaming.input/vector.c
+++ b/dlls/windows.gaming.input/vector.c
@@ -515,7 +515,7 @@ static HRESULT WINAPI vector_InsertAt( IVector_IInspectable *iface, UINT32 index
}
}
- memmove( impl->elements + index + 1, impl->elements + index, impl->size++ * sizeof(*impl->elements) );
+ memmove( impl->elements + index + 1, impl->elements + index, (impl->size++ - index) * sizeof(*impl->elements) );
IInspectable_AddRef( (impl->elements[index] = value) );
return S_OK;
}
@@ -528,7 +528,7 @@ static HRESULT WINAPI vector_RemoveAt( IVector_IInspectable *iface, UINT32 index
if (index >= impl->size) return E_BOUNDS;
IInspectable_Release( impl->elements[index] );
- memmove( impl->elements + index, impl->elements + index + 1, --impl->size * sizeof(*impl->elements) );
+ memmove( impl->elements + index, impl->elements + index + 1, (--impl->size - index) * sizeof(*impl->elements) );
return S_OK;
}
--
2.35.1
1
0
[PATCH] dlls/ntdll/tests/exception.c: enable compilation with long types
by Eric Pouech March 18, 2022
by Eric Pouech March 18, 2022
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/exception.c | 1307 +++++++++++++++++++++---------------------
1 file changed, 654 insertions(+), 653 deletions(-)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 442aadfd784..c4413d4d66e 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdarg.h>
#include <stdio.h>
@@ -217,19 +218,19 @@ static void test_debugger_xstate(HANDLE thread, CONTEXT *ctx, int stage)
length = sizeof(context_buffer);
bret = pInitializeContext(context_buffer, ctx->ContextFlags | CONTEXT_XSTATE, &xctx, &length);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
ymm = pLocateXStateFeature(xctx, XSTATE_AVX, &length);
ok(!!ymm, "Got zero ymm.\n");
memset(ymm, 0xcc, sizeof(*ymm));
xmm = pLocateXStateFeature(xctx, XSTATE_LEGACY_SSE, &length);
- ok(length == sizeof(*xmm) * (sizeof(void *) == 8 ? 16 : 8), "Got unexpected length %#x.\n", length);
+ ok(length == sizeof(*xmm) * (sizeof(void *) == 8 ? 16 : 8), "Got unexpected length %#lx.\n", length);
ok(!!xmm, "Got zero xmm.\n");
memset(xmm, 0xcc, length);
status = pNtGetContextThread(thread, xctx);
- ok(!status, "NtSetContextThread failed with 0x%x\n", status);
+ ok(!status, "NtSetContextThread failed with 0x%lx\n", status);
c_ex = (CONTEXT_EX *)(xctx + 1);
xs = (XSTATE *)((char *)c_ex + c_ex->XState.Offset);
@@ -253,7 +254,7 @@ static void test_debugger_xstate(HANDLE thread, CONTEXT *ctx, int stage)
ymm->Ymm0.High = ymm->Ymm0.Low;
status = pNtSetContextThread(thread, xctx);
- ok(!status, "NtSetContextThread failed with 0x%x\n", status);
+ ok(!status, "NtSetContextThread failed with 0x%lx\n", status);
}
#endif
@@ -451,7 +452,7 @@ static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *Exce
{
PCONTEXT context = ExceptionInfo->ContextRecord;
PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord;
- trace("vect. handler %08x addr:%p context.Eip:%x\n", rec->ExceptionCode,
+ trace("vect. handler %08lx addr:%p context.Eip:%lx\n", rec->ExceptionCode,
rec->ExceptionAddress, context->Eip);
ok(rec->ExceptionAddress == (char *)code_mem + 0xb
@@ -461,7 +462,7 @@ static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *Exce
if (NtCurrentTeb()->Peb->BeingDebugged)
ok((void *)context->Eax == pRtlRaiseException ||
broken( is_wow64 && context->Eax == 0xf00f00f1 ), /* broken on vista */
- "debugger managed to modify Eax to %x should be %p\n",
+ "debugger managed to modify Eax to %lx should be %p\n",
context->Eax, pRtlRaiseException);
/* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT
@@ -472,14 +473,14 @@ static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *Exce
ok(context->Eip == (DWORD)code_mem + 0xa ||
(is_wow64 && context->Eip == (DWORD)code_mem + 0xb) ||
broken(context->Eip == (DWORD)code_mem + 0xd) /* w2008 */,
- "Eip at %x instead of %x or %x\n", context->Eip,
+ "Eip at %lx instead of %lx or %lx\n", context->Eip,
(DWORD)code_mem + 0xa, (DWORD)code_mem + 0xb);
}
else
{
ok(context->Eip == (DWORD)code_mem + 0xb ||
broken(context->Eip == (DWORD)code_mem + 0xd) /* w2008 */,
- "Eip at %x instead of %x\n", context->Eip, (DWORD)code_mem + 0xb);
+ "Eip at %lx instead of %lx\n", context->Eip, (DWORD)code_mem + 0xb);
}
/* test if context change is preserved from vectored handler to stack handlers */
@@ -490,7 +491,7 @@ static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *Exce
static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
- trace( "exception: %08x flags:%x addr:%p context: Eip:%x\n",
+ trace( "exception: %08lx flags:%lx addr:%p context: Eip:%lx\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, context->Eip );
ok(rec->ExceptionAddress == (char *)code_mem + 0xb
@@ -499,7 +500,7 @@ static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
ok( context->ContextFlags == CONTEXT_ALL || context->ContextFlags == (CONTEXT_ALL | CONTEXT_XSTATE) ||
broken(context->ContextFlags == CONTEXT_FULL), /* win2003 */
- "wrong context flags %x\n", context->ContextFlags );
+ "wrong context flags %lx\n", context->ContextFlags );
/* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT
* even if raised by RtlRaiseException
@@ -509,18 +510,18 @@ static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
ok(context->Eip == (DWORD)code_mem + 0xa ||
(is_wow64 && context->Eip == (DWORD)code_mem + 0xb) ||
broken(context->Eip == (DWORD)code_mem + 0xd) /* w2008 */,
- "Eip at %x instead of %x or %x\n", context->Eip,
+ "Eip at %lx instead of %lx or %lx\n", context->Eip,
(DWORD)code_mem + 0xa, (DWORD)code_mem + 0xb);
}
else
{
ok(context->Eip == (DWORD)code_mem + 0xb ||
broken(context->Eip == (DWORD)code_mem + 0xd) /* w2008 */,
- "Eip at %x instead of %x\n", context->Eip, (DWORD)code_mem + 0xb);
+ "Eip at %lx instead of %lx\n", context->Eip, (DWORD)code_mem + 0xb);
}
if(have_vectored_api)
- ok(context->Eax == 0xf00f00f0, "Eax is %x, should have been set to 0xf00f00f0 in vectored handler\n",
+ ok(context->Eax == 0xf00f00f0, "Eax is %lx, should have been set to 0xf00f00f0 in vectored handler\n",
context->Eax);
/* give the debugger a chance to examine the state a second time */
@@ -603,16 +604,16 @@ static DWORD unwind_expected_eax;
static DWORD unwind_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
- trace("exception: %08x flags:%x addr:%p context: Eip:%x\n",
+ trace("exception: %08lx flags:%lx addr:%p context: Eip:%lx\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, context->Eip);
- ok(rec->ExceptionCode == STATUS_UNWIND, "ExceptionCode is %08x instead of %08x\n",
+ ok(rec->ExceptionCode == STATUS_UNWIND, "ExceptionCode is %08lx instead of %08lx\n",
rec->ExceptionCode, STATUS_UNWIND);
ok(rec->ExceptionAddress == (char *)code_mem + 0x22 || broken(TRUE) /* Win10 1709 */,
"ExceptionAddress at %p instead of %p\n", rec->ExceptionAddress, (char *)code_mem + 0x22);
- ok(context->Eip == (DWORD)code_mem + 0x22, "context->Eip is %08x instead of %08x\n",
+ ok(context->Eip == (DWORD)code_mem + 0x22, "context->Eip is %08lx instead of %08lx\n",
context->Eip, (DWORD)code_mem + 0x22);
- ok(context->Eax == unwind_expected_eax, "context->Eax is %08x instead of %08x\n",
+ ok(context->Eax == unwind_expected_eax, "context->Eax is %08lx instead of %08lx\n",
context->Eax, unwind_expected_eax);
context->Eax += 1;
@@ -662,14 +663,14 @@ static void test_unwind(void)
/* test unwind to current frame */
unwind_expected_eax = 0xDEAD0000;
retval = func(pRtlUnwind, frame2, NULL, 0xDEAD0000);
- ok(retval == 0xDEAD0000, "RtlUnwind returned eax %08x instead of %08x\n", retval, 0xDEAD0000);
+ ok(retval == 0xDEAD0000, "RtlUnwind returned eax %08lx instead of %08x\n", retval, 0xDEAD0000);
ok(NtCurrentTeb()->Tib.ExceptionList == frame2, "Exception record points to %p instead of %p\n",
NtCurrentTeb()->Tib.ExceptionList, frame2);
/* unwind to frame1 */
unwind_expected_eax = 0xDEAD0000;
retval = func(pRtlUnwind, frame1, NULL, 0xDEAD0000);
- ok(retval == 0xDEAD0001, "RtlUnwind returned eax %08x instead of %08x\n", retval, 0xDEAD0001);
+ ok(retval == 0xDEAD0001, "RtlUnwind returned eax %08lx instead of %08x\n", retval, 0xDEAD0001);
ok(NtCurrentTeb()->Tib.ExceptionList == frame1, "Exception record points to %p instead of %p\n",
NtCurrentTeb()->Tib.ExceptionList, frame1);
@@ -684,14 +685,14 @@ static DWORD handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *fram
unsigned int i, parameter_count, entry = except - exceptions;
got_exception++;
- trace( "exception %u: %x flags:%x addr:%p\n",
+ trace( "exception %u: %lx flags:%lx addr:%p\n",
entry, rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress );
ok( rec->ExceptionCode == except->status ||
(except->alt_status != 0 && rec->ExceptionCode == except->alt_status),
- "%u: Wrong exception code %x/%x\n", entry, rec->ExceptionCode, except->status );
+ "%u: Wrong exception code %lx/%lx\n", entry, rec->ExceptionCode, except->status );
ok( context->Eip == (DWORD_PTR)code_mem + except->offset,
- "%u: Unexpected eip %#x/%#lx\n", entry,
+ "%u: Unexpected eip %#lx/%#lx\n", entry,
context->Eip, (DWORD_PTR)code_mem + except->offset );
ok( rec->ExceptionAddress == (char*)context->Eip ||
(rec->ExceptionCode == STATUS_BREAKPOINT && rec->ExceptionAddress == (char*)context->Eip + 1),
@@ -706,7 +707,7 @@ static DWORD handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *fram
parameter_count = except->alt_nb_params;
ok( rec->NumberParameters == parameter_count,
- "%u: Unexpected parameter count %u/%u\n", entry, rec->NumberParameters, parameter_count );
+ "%u: Unexpected parameter count %lu/%u\n", entry, rec->NumberParameters, parameter_count );
/* Most CPUs (except Intel Core apparently) report a segment limit violation */
/* instead of page faults for accesses beyond 0xffffffff */
@@ -728,14 +729,14 @@ static DWORD handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *fram
{
for (i = 0; i < rec->NumberParameters; i++)
ok( rec->ExceptionInformation[i] == except->params[i],
- "%u: Wrong parameter %d: %lx/%x\n",
+ "%u: Wrong parameter %d: %lx/%lx\n",
entry, i, rec->ExceptionInformation[i], except->params[i] );
}
else
{
for (i = 0; i < rec->NumberParameters; i++)
ok( rec->ExceptionInformation[i] == except->alt_params[i],
- "%u: Wrong parameter %d: %lx/%x\n",
+ "%u: Wrong parameter %d: %lx/%lx\n",
entry, i, rec->ExceptionInformation[i], except->alt_params[i] );
}
@@ -792,7 +793,7 @@ static DWORD dreg_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD
}
#define CHECK_DEBUG_REG(n, m) \
- ok((ctx.Dr##n & m) == test->dr##n, "(%d) failed to set debug register " #n " to %x, got %x\n", \
+ ok((ctx.Dr##n & m) == test->dr##n, "(%d) failed to set debug register " #n " to %lx, got %lx\n", \
test_num, test->dr##n, ctx.Dr##n)
static void check_debug_registers(int test_num, const struct dbgreg_test *test)
@@ -802,7 +803,7 @@ static void check_debug_registers(int test_num, const struct dbgreg_test *test)
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
status = pNtGetContextThread(GetCurrentThread(), &ctx);
- ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", status);
CHECK_DEBUG_REG(0, ~0);
CHECK_DEBUG_REG(1, ~0);
@@ -831,7 +832,7 @@ static DWORD single_step_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_
/* show that the last single step exception on the popf instruction
* (which removed the TF bit), still is a EXCEPTION_SINGLE_STEP exception */
ok( rec->ExceptionCode == EXCEPTION_SINGLE_STEP,
- "exception is not EXCEPTION_SINGLE_STEP: %x\n", rec->ExceptionCode);
+ "exception is not EXCEPTION_SINGLE_STEP: %lx\n", rec->ExceptionCode);
}
return ExceptionContinueExecution;
@@ -906,11 +907,11 @@ static DWORD bpx_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *
{
got_exception++;
ok( rec->ExceptionCode == EXCEPTION_SINGLE_STEP,
- "wrong exception code: %x\n", rec->ExceptionCode);
+ "wrong exception code: %lx\n", rec->ExceptionCode);
if(got_exception == 1) {
/* hw bp exception on first nop */
- ok( context->Eip == (DWORD)code_mem, "eip is wrong: %x instead of %x\n",
+ ok( context->Eip == (DWORD)code_mem, "eip is wrong: %lx instead of %lx\n",
context->Eip, (DWORD)code_mem);
ok( (context->Dr6 & 0xf) == 1, "B0 flag is not set in Dr6\n");
ok( !(context->Dr6 & 0x4000), "BS flag is set in Dr6\n");
@@ -918,7 +919,7 @@ static DWORD bpx_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *
context->EFlags |= 0x100; /* enable single stepping */
} else if( got_exception == 2) {
/* single step exception on second nop */
- ok( context->Eip == (DWORD)code_mem + 1, "eip is wrong: %x instead of %x\n",
+ ok( context->Eip == (DWORD)code_mem + 1, "eip is wrong: %lx instead of %lx\n",
context->Eip, (DWORD)code_mem + 1);
ok( (context->Dr6 & 0x4000), "BS flag is not set in Dr6\n");
/* depending on the win version the B0 bit is already set here as well
@@ -926,7 +927,7 @@ static DWORD bpx_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *
context->EFlags |= 0x100;
} else if( got_exception == 3) {
/* hw bp exception on second nop */
- ok( context->Eip == (DWORD)code_mem + 1, "eip is wrong: %x instead of %x\n",
+ ok( context->Eip == (DWORD)code_mem + 1, "eip is wrong: %lx instead of %lx\n",
context->Eip, (DWORD)code_mem + 1);
ok( (context->Dr6 & 0xf) == 1, "B0 flag is not set in Dr6\n");
ok( !(context->Dr6 & 0x4000), "BS flag is set in Dr6\n");
@@ -934,7 +935,7 @@ static DWORD bpx_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *
context->EFlags |= 0x100;
} else {
/* single step exception on ret */
- ok( context->Eip == (DWORD)code_mem + 2, "eip is wrong: %x instead of %x\n",
+ ok( context->Eip == (DWORD)code_mem + 2, "eip is wrong: %lx instead of %lx\n",
context->Eip, (DWORD)code_mem + 2);
ok( (context->Dr6 & 0xf) == 0, "B0...3 flags in Dr6 shouldn't be set\n");
ok( (context->Dr6 & 0x4000), "BS flag is not set in Dr6\n");
@@ -952,7 +953,7 @@ static DWORD int3_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD
{
ok( rec->ExceptionAddress == code_mem, "exception address not at: %p, but at %p\n",
code_mem, rec->ExceptionAddress);
- ok( context->Eip == (DWORD)code_mem, "eip not at: %p, but at %#x\n", code_mem, context->Eip);
+ ok( context->Eip == (DWORD)code_mem, "eip not at: %p, but at %#lx\n", code_mem, context->Eip);
if(context->Eip == (DWORD)code_mem) context->Eip++; /* skip breakpoint */
return ExceptionContinueExecution;
@@ -1020,7 +1021,7 @@ static void test_exceptions(void)
ctx.Dr7 = 3;
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
res = pNtSetContextThread( GetCurrentThread(), &ctx);
- ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res);
+ ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", res);
got_exception = 0;
run_exception_test(bpx_handler, NULL, dummy_code, sizeof(dummy_code), 0);
@@ -1031,7 +1032,7 @@ static void test_exceptions(void)
/* test that hardware breakpoints are not inherited by created threads */
res = pNtSetContextThread( GetCurrentThread(), &ctx );
- ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res );
+ ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", res );
h = CreateThread( NULL, 0, hw_reg_exception_thread, 0, 0, NULL );
WaitForSingleObject( h, 10000 );
@@ -1040,13 +1041,13 @@ static void test_exceptions(void)
h = CreateThread( NULL, 0, hw_reg_exception_thread, (void *)4, CREATE_SUSPENDED, NULL );
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
res = pNtGetContextThread( h, &ctx );
- ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", res );
- ok( ctx.Dr0 == 0, "dr0 %x\n", ctx.Dr0 );
- ok( ctx.Dr7 == 0, "dr7 %x\n", ctx.Dr7 );
+ ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", res );
+ ok( ctx.Dr0 == 0, "dr0 %lx\n", ctx.Dr0 );
+ ok( ctx.Dr7 == 0, "dr7 %lx\n", ctx.Dr7 );
ctx.Dr0 = (DWORD)code_mem;
ctx.Dr7 = 3;
res = pNtSetContextThread( h, &ctx );
- ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res );
+ ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", res );
ResumeThread( h );
WaitForSingleObject( h, 10000 );
CloseHandle( h );
@@ -1054,7 +1055,7 @@ static void test_exceptions(void)
ctx.Dr0 = 0;
ctx.Dr7 = 0;
res = pNtSetContextThread( GetCurrentThread(), &ctx );
- ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res );
+ ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", res );
}
static void test_debugger(DWORD cont_status)
@@ -1079,7 +1080,7 @@ static void test_debugger(DWORD cont_status)
sprintf(cmdline, "%s %s %s %p", my_argv[0], my_argv[1], "debuggee", &test_stage);
ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi);
- ok(ret, "could not create child process error: %u\n", GetLastError());
+ ok(ret, "could not create child process error: %lu\n", GetLastError());
if (!ret)
return;
@@ -1090,11 +1091,11 @@ static void test_debugger(DWORD cont_status)
ret = ContinueDebugEvent(de.dwProcessId, de.dwThreadId, 0xdeadbeef);
ok(!ret, "ContinueDebugEvent unexpectedly succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected last error: %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected last error: %lu\n", GetLastError());
if (de.dwThreadId != pi.dwThreadId)
{
- trace("event %d not coming from main thread, ignoring\n", de.dwDebugEventCode);
+ trace("event %ld not coming from main thread, ignoring\n", de.dwDebugEventCode);
ContinueDebugEvent(de.dwProcessId, de.dwThreadId, cont_status);
continue;
}
@@ -1115,16 +1116,16 @@ static void test_debugger(DWORD cont_status)
counter++;
status = pNtReadVirtualMemory(pi.hProcess, &code_mem, &code_mem_address,
sizeof(code_mem_address), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage,
sizeof(stage), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
ctx.ContextFlags = CONTEXT_FULL | CONTEXT_EXTENDED_REGISTERS;
status = pNtGetContextThread(pi.hThread, &ctx);
- ok(!status, "NtGetContextThread failed with 0x%x\n", status);
+ ok(!status, "NtGetContextThread failed with 0x%lx\n", status);
- trace("exception 0x%x at %p firstchance=%d Eip=0x%x, Eax=0x%x\n",
+ trace("exception 0x%lx at %p firstchance=%ld Eip=0x%lx, Eax=0x%lx\n",
de.u.Exception.ExceptionRecord.ExceptionCode,
de.u.Exception.ExceptionRecord.ExceptionAddress, de.u.Exception.dwFirstChance, ctx.Eip, ctx.Eax);
@@ -1148,7 +1149,7 @@ static void test_debugger(DWORD cont_status)
{
if (stage == 1)
{
- ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at %x instead of %p\n",
+ ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at %lx instead of %p\n",
ctx.Eip, (char *)code_mem_address + 0xb);
/* setting the context from debugger does not affect the context that the
* exception handler gets, except on w2008 */
@@ -1162,7 +1163,7 @@ static void test_debugger(DWORD cont_status)
if (de.u.Exception.dwFirstChance)
{
/* debugger gets first chance exception with unmodified ctx.Eip */
- ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at 0x%x instead of %p\n",
+ ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at 0x%lx instead of %p\n",
ctx.Eip, (char *)code_mem_address + 0xb);
ctx.Eip = (UINT_PTR)code_mem_address + 0xd;
ctx.Eax = 0xf00f00f1;
@@ -1179,7 +1180,7 @@ static void test_debugger(DWORD cont_status)
ok((char *)ctx.Eip == (char *)code_mem_address + 0xa ||
(is_wow64 && (char *)ctx.Eip == (char *)code_mem_address + 0xb) ||
broken((char *)ctx.Eip == (char *)code_mem_address + 0xd) /* w2008 */,
- "Eip at 0x%x instead of %p\n",
+ "Eip at 0x%lx instead of %p\n",
ctx.Eip, (char *)code_mem_address + 0xa);
/* need to fixup Eip for debuggee */
if ((char *)ctx.Eip == (char *)code_mem_address + 0xa)
@@ -1188,7 +1189,7 @@ static void test_debugger(DWORD cont_status)
else
ok((char *)ctx.Eip == (char *)code_mem_address + 0xb ||
broken((char *)ctx.Eip == (char *)code_mem_address + 0xd) /* w2008 */,
- "Eip at 0x%x instead of %p\n",
+ "Eip at 0x%lx instead of %p\n",
ctx.Eip, (char *)code_mem_address + 0xb);
/* here we handle exception */
}
@@ -1196,28 +1197,28 @@ static void test_debugger(DWORD cont_status)
else if (stage == 7 || stage == 8)
{
ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT,
- "expected EXCEPTION_BREAKPOINT, got %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode);
+ "expected EXCEPTION_BREAKPOINT, got %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode);
ok((char *)ctx.Eip == (char *)code_mem_address + 0x1d,
- "expected Eip = %p, got 0x%x\n", (char *)code_mem_address + 0x1d, ctx.Eip);
+ "expected Eip = %p, got 0x%lx\n", (char *)code_mem_address + 0x1d, ctx.Eip);
if (stage == 8) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
}
else if (stage == 9 || stage == 10)
{
ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT,
- "expected EXCEPTION_BREAKPOINT, got %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode);
+ "expected EXCEPTION_BREAKPOINT, got %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode);
ok((char *)ctx.Eip == (char *)code_mem_address + 2,
- "expected Eip = %p, got 0x%x\n", (char *)code_mem_address + 2, ctx.Eip);
+ "expected Eip = %p, got 0x%lx\n", (char *)code_mem_address + 2, ctx.Eip);
if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
}
else if (stage == 11 || stage == 12 || stage == 13)
{
ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE,
- "unexpected exception code %08x, expected %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode,
+ "unexpected exception code %08lx, expected %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode,
EXCEPTION_INVALID_HANDLE);
ok(de.u.Exception.ExceptionRecord.NumberParameters == 0,
- "unexpected number of parameters %d, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters);
+ "unexpected number of parameters %ld, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters);
if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
}
@@ -1229,26 +1230,26 @@ static void test_debugger(DWORD cont_status)
{
USHORT ss;
__asm__( "movw %%ss,%0" : "=r" (ss) );
- ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss );
- ok( ctx.SegFs != ctx.SegSs, "wrong fs %04x / %04x\n", ctx.SegFs, ctx.SegSs );
+ ok( ctx.SegSs == ss, "wrong ss %04lx / %04x\n", ctx.SegSs, ss );
+ ok( ctx.SegFs != ctx.SegSs, "wrong fs %04lx / %04lx\n", ctx.SegFs, ctx.SegSs );
if (is_wow64) todo_wine
{
- ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs );
- ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs );
- ok( ctx.SegGs == ctx.SegSs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs );
+ ok( ctx.SegDs == ctx.SegSs, "wrong ds %04lx / %04lx\n", ctx.SegDs, ctx.SegSs );
+ ok( ctx.SegEs == ctx.SegSs, "wrong es %04lx / %04lx\n", ctx.SegEs, ctx.SegSs );
+ ok( ctx.SegGs == ctx.SegSs, "wrong gs %04lx / %04lx\n", ctx.SegGs, ctx.SegSs );
}
else
{
- ok( !ctx.SegDs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs );
- ok( !ctx.SegEs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs );
- ok( !ctx.SegGs, "wrong gs %04x / %04x\n", ctx.SegGs, ctx.SegSs );
+ ok( !ctx.SegDs, "wrong ds %04lx / %04lx\n", ctx.SegDs, ctx.SegSs );
+ ok( !ctx.SegEs, "wrong es %04lx / %04lx\n", ctx.SegEs, ctx.SegSs );
+ ok( !ctx.SegGs, "wrong gs %04lx / %04lx\n", ctx.SegGs, ctx.SegSs );
}
}
else
ok(FALSE, "unexpected stage %u\n", stage);
status = pNtSetContextThread(pi.hThread, &ctx);
- ok(!status, "NtSetContextThread failed with 0x%x\n", status);
+ ok(!status, "NtSetContextThread failed with 0x%lx\n", status);
}
}
else if (de.dwDebugEventCode == OUTPUT_DEBUG_STRING_EVENT)
@@ -1258,7 +1259,7 @@ static void test_debugger(DWORD cont_status)
status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage,
sizeof(stage), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
ok(!de.u.DebugString.fUnicode, "unexpected unicode debug string event\n");
ok(de.u.DebugString.nDebugStringLength < sizeof(buffer) - 1, "buffer not large enough to hold %d bytes\n",
@@ -1267,7 +1268,7 @@ static void test_debugger(DWORD cont_status)
memset(buffer, 0, sizeof(buffer));
status = pNtReadVirtualMemory(pi.hProcess, de.u.DebugString.lpDebugStringData, buffer,
de.u.DebugString.nDebugStringLength, &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
if (stage == 3 || stage == 4)
ok(!strcmp(buffer, "Hello World"), "got unexpected debug string '%s'\n", buffer);
@@ -1282,13 +1283,13 @@ static void test_debugger(DWORD cont_status)
status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage,
sizeof(stage), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
if (stage == 5 || stage == 6)
{
- ok(de.u.RipInfo.dwError == 0x11223344, "got unexpected rip error code %08x, expected %08x\n",
+ ok(de.u.RipInfo.dwError == 0x11223344, "got unexpected rip error code %08lx, expected %08x\n",
de.u.RipInfo.dwError, 0x11223344);
- ok(de.u.RipInfo.dwType == 0x55667788, "got unexpected rip type %08x, expected %08x\n",
+ ok(de.u.RipInfo.dwType == 0x55667788, "got unexpected rip type %08lx, expected %08x\n",
de.u.RipInfo.dwType, 0x55667788);
}
else
@@ -1303,9 +1304,9 @@ static void test_debugger(DWORD cont_status)
wait_child_process( pi.hProcess );
ret = CloseHandle(pi.hThread);
- ok(ret, "error %u\n", GetLastError());
+ ok(ret, "error %lu\n", GetLastError());
ret = CloseHandle(pi.hProcess);
- ok(ret, "error %u\n", GetLastError());
+ ok(ret, "error %lu\n", GetLastError());
return;
}
@@ -1329,13 +1330,13 @@ static DWORD simd_fault_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_R
skip("system doesn't support SIMD exceptions\n");
else {
ok( rec->ExceptionCode == STATUS_FLOAT_MULTIPLE_TRAPS,
- "exception code: %#x, should be %#x\n",
+ "exception code: %#lx, should be %#lx\n",
rec->ExceptionCode, STATUS_FLOAT_MULTIPLE_TRAPS);
- ok( rec->NumberParameters == is_wow64 ? 2 : 1, "# of params: %i\n", rec->NumberParameters);
+ ok( rec->NumberParameters == is_wow64 ? 2 : 1, "# of params: %li\n", rec->NumberParameters);
ok( rec->ExceptionInformation[0] == 0, "param #1: %lx, should be 0\n", rec->ExceptionInformation[0]);
if (rec->NumberParameters == 2)
ok( rec->ExceptionInformation[1] == ((XSAVE_FORMAT *)context->ExtendedRegisters)->MxCsr,
- "param #1: %lx / %x\n", rec->ExceptionInformation[1],
+ "param #1: %lx / %lx\n", rec->ExceptionInformation[1],
((XSAVE_FORMAT *)context->ExtendedRegisters)->MxCsr);
}
context->Eip += 3; /* skip divps */
@@ -1478,18 +1479,18 @@ static void test_fpu_exceptions(void)
memset(&info, 0, sizeof(info));
run_exception_test(fpu_exception_handler, &info, fpu_exception_test_ie, sizeof(fpu_exception_test_ie), 0);
ok(info.exception_code == EXCEPTION_FLT_STACK_CHECK,
- "Got exception code %#x, expected EXCEPTION_FLT_STACK_CHECK\n", info.exception_code);
+ "Got exception code %#lx, expected EXCEPTION_FLT_STACK_CHECK\n", info.exception_code);
ok(info.exception_offset == 0x19 || info.exception_offset == info.eip_offset,
- "Got exception offset %#x, expected 0x19\n", info.exception_offset);
- ok(info.eip_offset == 0x1b, "Got EIP offset %#x, expected 0x1b\n", info.eip_offset);
+ "Got exception offset %#lx, expected 0x19\n", info.exception_offset);
+ ok(info.eip_offset == 0x1b, "Got EIP offset %#lx, expected 0x1b\n", info.eip_offset);
memset(&info, 0, sizeof(info));
run_exception_test(fpu_exception_handler, &info, fpu_exception_test_de, sizeof(fpu_exception_test_de), 0);
ok(info.exception_code == EXCEPTION_FLT_DIVIDE_BY_ZERO,
- "Got exception code %#x, expected EXCEPTION_FLT_DIVIDE_BY_ZERO\n", info.exception_code);
+ "Got exception code %#lx, expected EXCEPTION_FLT_DIVIDE_BY_ZERO\n", info.exception_code);
ok(info.exception_offset == 0x17 || info.exception_offset == info.eip_offset,
- "Got exception offset %#x, expected 0x17\n", info.exception_offset);
- ok(info.eip_offset == 0x19, "Got EIP offset %#x, expected 0x19\n", info.eip_offset);
+ "Got exception offset %#lx, expected 0x17\n", info.exception_offset);
+ ok(info.eip_offset == 0x19, "Got EIP offset %#lx, expected 0x19\n", info.eip_offset);
}
struct dpe_exception_info {
@@ -1504,9 +1505,9 @@ static DWORD dpe_exception_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION
struct dpe_exception_info *info = *(struct dpe_exception_info **)(frame + 1);
ok(rec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION,
- "Exception code %08x\n", rec->ExceptionCode);
+ "Exception code %08lx\n", rec->ExceptionCode);
ok(rec->NumberParameters == 2,
- "Parameter count: %d\n", rec->NumberParameters);
+ "Parameter count: %ld\n", rec->NumberParameters);
ok((LPVOID)rec->ExceptionInformation[1] == code_mem,
"Exception address: %p, expected %p\n",
(LPVOID)rec->ExceptionInformation[1], code_mem);
@@ -1535,14 +1536,14 @@ static void test_dpe_exceptions(void)
skip("This software platform does not support DEP\n");
return;
}
- ok(stat == STATUS_INFO_LENGTH_MISMATCH, "buffer too small: %08x\n", stat);
+ ok(stat == STATUS_INFO_LENGTH_MISMATCH, "buffer too small: %08lx\n", stat);
/* Query DEP */
stat = pNtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len);
- ok(stat == STATUS_SUCCESS, "querying DEP: status %08x\n", stat);
+ ok(stat == STATUS_SUCCESS, "querying DEP: status %08lx\n", stat);
if(stat == STATUS_SUCCESS)
{
- ok(len == sizeof val, "returned length: %d\n", len);
+ ok(len == sizeof val, "returned length: %ld\n", len);
if(val & MEM_EXECUTE_OPTION_PERMANENT)
{
skip("toggling DEP impossible - status locked\n");
@@ -1559,7 +1560,7 @@ static void test_dpe_exceptions(void)
/* Enable DEP */
val = MEM_EXECUTE_OPTION_DISABLE;
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
- ok(stat == STATUS_SUCCESS, "enabling DEP: status %08x\n", stat);
+ ok(stat == STATUS_SUCCESS, "enabling DEP: status %08lx\n", stat);
}
if(can_test_with)
@@ -1594,7 +1595,7 @@ static void test_dpe_exceptions(void)
/* Disable DEP */
val = MEM_EXECUTE_OPTION_ENABLE;
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
- ok(stat == STATUS_SUCCESS, "disabling DEP: status %08x\n", stat);
+ ok(stat == STATUS_SUCCESS, "disabling DEP: status %08lx\n", stat);
}
/* page is read without exec here */
@@ -1621,18 +1622,18 @@ static void test_dpe_exceptions(void)
/* Turn off DEP permanently */
val = MEM_EXECUTE_OPTION_ENABLE | MEM_EXECUTE_OPTION_PERMANENT;
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
- ok(stat == STATUS_SUCCESS, "disabling DEP permanently: status %08x\n", stat);
+ ok(stat == STATUS_SUCCESS, "disabling DEP permanently: status %08lx\n", stat);
}
/* Try to turn off DEP */
val = MEM_EXECUTE_OPTION_ENABLE;
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
- ok(stat == STATUS_ACCESS_DENIED, "disabling DEP while permanent: status %08x\n", stat);
+ ok(stat == STATUS_ACCESS_DENIED, "disabling DEP while permanent: status %08lx\n", stat);
/* Try to turn on DEP */
val = MEM_EXECUTE_OPTION_DISABLE;
stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val);
- ok(stat == STATUS_ACCESS_DENIED, "enabling DEP while permanent: status %08x\n", stat);
+ ok(stat == STATUS_ACCESS_DENIED, "enabling DEP while permanent: status %08lx\n", stat);
}
static void test_thread_context(void)
@@ -1699,25 +1700,25 @@ static void test_thread_context(void)
memcpy( func_ptr, call_func, sizeof(call_func) );
#define COMPARE(reg) \
- ok( context.reg == expect.reg, "wrong " #reg " %08x/%08x\n", context.reg, expect.reg )
+ ok( context.reg == expect.reg, "wrong " #reg " %08lx/%08lx\n", context.reg, expect.reg )
memset( &context, 0xcc, sizeof(context) );
memset( &expect, 0xcc, sizeof(expect) );
func_ptr( &expect, pRtlCaptureContext, &context, 0, &new_x87_control );
- trace( "expect: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x ebp=%08x esp=%08x "
- "eip=%08x cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x prev=%08x\n",
+ trace( "expect: eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx esp=%08lx "
+ "eip=%08lx cs=%04lx ds=%04lx es=%04lx fs=%04lx gs=%04lx ss=%04lx flags=%08lx prev=%08lx\n",
expect.Eax, expect.Ebx, expect.Ecx, expect.Edx, expect.Esi, expect.Edi,
expect.Ebp, expect.Esp, expect.Eip, expect.SegCs, expect.SegDs, expect.SegEs,
expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, expect.prev_frame );
- trace( "actual: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x ebp=%08x esp=%08x "
- "eip=%08x cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n",
+ trace( "actual: eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx esp=%08lx "
+ "eip=%08lx cs=%04lx ds=%04lx es=%04lx fs=%04lx gs=%04lx ss=%04lx flags=%08lx\n",
context.Eax, context.Ebx, context.Ecx, context.Edx, context.Esi, context.Edi,
context.Ebp, context.Esp, context.Eip, context.SegCs, context.SegDs, context.SegEs,
context.SegFs, context.SegGs, context.SegSs, context.EFlags );
ok( context.ContextFlags == (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS) ||
broken( context.ContextFlags == 0xcccccccc ), /* <= vista */
- "wrong flags %08x\n", context.ContextFlags );
+ "wrong flags %08lx\n", context.ContextFlags );
COMPARE( Eax );
COMPARE( Ebx );
COMPARE( Ecx );
@@ -1733,23 +1734,23 @@ static void test_thread_context(void)
COMPARE( SegSs );
COMPARE( EFlags );
/* Ebp is from the previous stackframe */
- ok( context.Ebp == expect.prev_frame, "wrong Ebp %08x/%08x\n", context.Ebp, expect.prev_frame );
+ ok( context.Ebp == expect.prev_frame, "wrong Ebp %08lx/%08lx\n", context.Ebp, expect.prev_frame );
/* Esp is the value on entry to the previous stackframe */
- ok( context.Esp == expect.Ebp + 8, "wrong Esp %08x/%08x\n", context.Esp, expect.Ebp + 8 );
+ ok( context.Esp == expect.Ebp + 8, "wrong Esp %08lx/%08lx\n", context.Esp, expect.Ebp + 8 );
memset( &context, 0xcc, sizeof(context) );
memset( &expect, 0xcc, sizeof(expect) );
context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT;
status = func_ptr( &expect, pNtGetContextThread, (void *)GetCurrentThread(), &context, &new_x87_control );
- ok( status == STATUS_SUCCESS, "NtGetContextThread failed %08x\n", status );
- trace( "expect: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x ebp=%08x esp=%08x "
- "eip=%08x cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x prev=%08x\n",
+ ok( status == STATUS_SUCCESS, "NtGetContextThread failed %08lx\n", status );
+ trace( "expect: eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx esp=%08lx "
+ "eip=%08lx cs=%04lx ds=%04lx es=%04lx fs=%04lx gs=%04lx ss=%04lx flags=%08lx prev=%08lx\n",
expect.Eax, expect.Ebx, expect.Ecx, expect.Edx, expect.Esi, expect.Edi,
expect.Ebp, expect.Esp, expect.Eip, expect.SegCs, expect.SegDs, expect.SegEs,
expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, expect.prev_frame );
- trace( "actual: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x ebp=%08x esp=%08x "
- "eip=%08x cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n",
+ trace( "actual: eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx ebp=%08lx esp=%08lx "
+ "eip=%08lx cs=%04lx ds=%04lx es=%04lx fs=%04lx gs=%04lx ss=%04lx flags=%08lx\n",
context.Eax, context.Ebx, context.Ecx, context.Edx, context.Esi, context.Edi,
context.Ebp, context.Esp, context.Eip, context.SegCs, context.SegDs, context.SegEs,
context.SegFs, context.SegGs, context.SegSs, context.EFlags );
@@ -1760,21 +1761,21 @@ static void test_thread_context(void)
COMPARE( Ebp );
/* Esp is the stack upon entry to NtGetContextThread */
ok( context.Esp == expect.Esp - 12 || context.Esp == expect.Esp - 16,
- "wrong Esp %08x/%08x\n", context.Esp, expect.Esp );
+ "wrong Esp %08lx/%08lx\n", context.Esp, expect.Esp );
/* Eip is somewhere close to the NtGetContextThread implementation */
ok( (char *)context.Eip >= (char *)pNtGetContextThread - 0x40000 &&
(char *)context.Eip <= (char *)pNtGetContextThread + 0x40000,
- "wrong Eip %08x/%08x\n", context.Eip, (DWORD)pNtGetContextThread );
+ "wrong Eip %08lx/%08lx\n", context.Eip, (DWORD)pNtGetContextThread );
/* segment registers clear the high word */
- ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs );
- ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs );
- ok( context.SegEs == LOWORD(expect.SegEs), "wrong SegEs %08x/%08x\n", context.SegEs, expect.SegEs );
- ok( context.SegFs == LOWORD(expect.SegFs), "wrong SegFs %08x/%08x\n", context.SegFs, expect.SegFs );
- ok( context.SegGs == LOWORD(expect.SegGs), "wrong SegGs %08x/%08x\n", context.SegGs, expect.SegGs );
- ok( context.SegSs == LOWORD(expect.SegSs), "wrong SegSs %08x/%08x\n", context.SegSs, expect.SegGs );
+ ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08lx/%08lx\n", context.SegCs, expect.SegCs );
+ ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08lx/%08lx\n", context.SegDs, expect.SegDs );
+ ok( context.SegEs == LOWORD(expect.SegEs), "wrong SegEs %08lx/%08lx\n", context.SegEs, expect.SegEs );
+ ok( context.SegFs == LOWORD(expect.SegFs), "wrong SegFs %08lx/%08lx\n", context.SegFs, expect.SegFs );
+ ok( context.SegGs == LOWORD(expect.SegGs), "wrong SegGs %08lx/%08lx\n", context.SegGs, expect.SegGs );
+ ok( context.SegSs == LOWORD(expect.SegSs), "wrong SegSs %08lx/%08lx\n", context.SegSs, expect.SegGs );
ok( LOWORD(context.FloatSave.ControlWord) == LOWORD(expect.x87_control),
- "wrong x87 control word %#x/%#x.\n", context.FloatSave.ControlWord, expect.x87_control );
+ "wrong x87 control word %#lx/%#lx.\n", context.FloatSave.ControlWord, expect.x87_control );
ok( LOWORD(expect.x87_control) == LOWORD(new_x87_control),
"x87 control word changed in NtGetContextThread() %#x/%#x.\n",
LOWORD(expect.x87_control), LOWORD(new_x87_control) );
@@ -1811,7 +1812,7 @@ static DWORD dbg_except_continue_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGIST
{
ok(hook_called, "Hook was not called.\n");
- ok(rec->ExceptionCode == 0x80000003, "Got unexpected ExceptionCode %#x.\n", rec->ExceptionCode);
+ ok(rec->ExceptionCode == 0x80000003, "Got unexpected ExceptionCode %#lx.\n", rec->ExceptionCode);
got_exception = 1;
dbg_except_continue_handler_eip = (void *)context->Eip;
@@ -1829,10 +1830,10 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
EXCEPTION_RECORD *rec = e->ExceptionRecord;
CONTEXT *context = e->ContextRecord;
- trace("dbg_except_continue_vectored_handler, code %#x, eip %#x, ExceptionAddress %p.\n",
+ trace("dbg_except_continue_vectored_handler, code %#lx, eip %#lx, ExceptionAddress %p.\n",
rec->ExceptionCode, context->Eip, rec->ExceptionAddress);
- ok(rec->ExceptionCode == 0x80000003, "Got unexpected ExceptionCode %#x.\n", rec->ExceptionCode);
+ ok(rec->ExceptionCode == 0x80000003, "Got unexpected ExceptionCode %#lx.\n", rec->ExceptionCode);
got_exception = 1;
@@ -1853,13 +1854,13 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
static void CDECL hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *context)
{
trace("rec %p, context %p.\n", rec, context);
- trace("context->Eip %#x, context->Esp %#x, ContextFlags %#x.\n",
+ trace("context->Eip %#lx, context->Esp %#lx, ContextFlags %#lx.\n",
context->Eip, context->Esp, context->ContextFlags);
hook_called = TRUE;
/* Broken on Win2008, probably rec offset in stack is different. */
ok(rec->ExceptionCode == 0x80000003 || broken(!rec->ExceptionCode),
- "Got unexpected ExceptionCode %#x.\n", rec->ExceptionCode);
+ "Got unexpected ExceptionCode %#lx.\n", rec->ExceptionCode);
hook_KiUserExceptionDispatcher_eip = (void *)context->Eip;
hook_exception_address = rec->ExceptionAddress;
@@ -1945,11 +1946,11 @@ static void test_kiuserexceptiondispatcher(void)
*(unsigned int *)(hook_trampoline + 8) = (ULONG_PTR)&pKiUserExceptionDispatcher;
ret = VirtualProtect(hook_trampoline, ARRAY_SIZE(hook_trampoline), PAGE_EXECUTE_READWRITE, &old_protect1);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
PAGE_EXECUTE_READWRITE, &old_protect2);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
memcpy(saved_KiUserExceptionDispatcher_bytes, pKiUserExceptionDispatcher,
sizeof(saved_KiUserExceptionDispatcher_bytes));
@@ -1972,9 +1973,9 @@ static void test_kiuserexceptiondispatcher(void)
ok(got_exception, "Handler was not called.\n");
ok(hook_called, "Hook was not called.\n");
- ok(test_kiuserexceptiondispatcher_regs.new_eax == 0xdeadbeef, "Got unexpected eax %#x.\n",
+ ok(test_kiuserexceptiondispatcher_regs.new_eax == 0xdeadbeef, "Got unexpected eax %#lx.\n",
test_kiuserexceptiondispatcher_regs.new_eax);
- ok(test_kiuserexceptiondispatcher_regs.new_esi == 0xdeadbeef, "Got unexpected esi %#x.\n",
+ ok(test_kiuserexceptiondispatcher_regs.new_esi == 0xdeadbeef, "Got unexpected esi %#lx.\n",
test_kiuserexceptiondispatcher_regs.new_esi);
ok(test_kiuserexceptiondispatcher_regs.old_edi
== test_kiuserexceptiondispatcher_regs.new_edi, "edi does not match.\n");
@@ -2015,9 +2016,9 @@ static void test_kiuserexceptiondispatcher(void)
RemoveVectoredExceptionHandler(vectored_handler);
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
old_protect2, &old_protect2);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = VirtualProtect(hook_trampoline, ARRAY_SIZE(hook_trampoline), old_protect1, &old_protect1);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
}
#elif defined(__x86_64__)
@@ -2186,7 +2187,7 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
if (ctx_ptr.IntegerContext[j])
{
- ok( k < nb_regs || broken( broken_k < nb_regs ), "%u/%u: register %s should not be set to %lx\n",
+ ok( k < nb_regs || broken( broken_k < nb_regs ), "%u/%u: register %s should not be set to %Ix\n",
testnum, i, reg_names[j], *(&context.Rax + j) );
ok( k == nb_regs || *(&context.Rax + j) == test->results[i].regs[k][1]
|| broken( broken_k == nb_regs || *(&context.Rax + j)
@@ -2415,7 +2416,7 @@ static PVOID CALLBACK test_consolidate_dummy(EXCEPTION_RECORD *rec)
{
CONTEXT *ctx = (CONTEXT *)rec->ExceptionInformation[1];
consolidate_dummy_called = 1;
- ok(ctx->Rip == 0xdeadbeef, "test_consolidate_dummy failed for Rip, expected: 0xdeadbeef, got: %lx\n", ctx->Rip);
+ ok(ctx->Rip == 0xdeadbeef, "test_consolidate_dummy failed for Rip, expected: 0xdeadbeef, got: %Ix\n", ctx->Rip);
return (PVOID)rec->ExceptionInformation[2];
}
@@ -2446,7 +2447,7 @@ static void test_restore_context(void)
ok(0, "shouldn't be reached\n");
}
else
- ok(pass < 4, "unexpected pass %d\n", pass);
+ ok(pass < 4, "unexpected pass %ld\n", pass);
/* test with jmp using RltRestoreContext */
pass = 0;
@@ -2461,7 +2462,7 @@ static void test_restore_context(void)
rec.NumberParameters = 1;
rec.ExceptionInformation[0] = (DWORD64)&buf;
- ok(buf.MxCsr == 0x1f80, "Got unexpected MxCsr %#x.\n", buf.MxCsr);
+ ok(buf.MxCsr == 0x1f80, "Got unexpected MxCsr %#lx.\n", buf.MxCsr);
ok(buf.FpCsr == 0x27f, "Got unexpected FpCsr %#x.\n", buf.FpCsr);
buf.FpCsr = 0x7f;
buf.MxCsr = 0x3f80;
@@ -2471,30 +2472,30 @@ static void test_restore_context(void)
}
else if (pass == 4)
{
- ok(buf.Rbx == ctx.Rbx, "longjmp failed for Rbx, expected: %lx, got: %lx\n", buf.Rbx, ctx.Rbx);
- ok(buf.Rsp == ctx.Rsp, "longjmp failed for Rsp, expected: %lx, got: %lx\n", buf.Rsp, ctx.Rsp);
- ok(buf.Rbp == ctx.Rbp, "longjmp failed for Rbp, expected: %lx, got: %lx\n", buf.Rbp, ctx.Rbp);
- ok(buf.Rsi == ctx.Rsi, "longjmp failed for Rsi, expected: %lx, got: %lx\n", buf.Rsi, ctx.Rsi);
- ok(buf.Rdi == ctx.Rdi, "longjmp failed for Rdi, expected: %lx, got: %lx\n", buf.Rdi, ctx.Rdi);
- ok(buf.R12 == ctx.R12, "longjmp failed for R12, expected: %lx, got: %lx\n", buf.R12, ctx.R12);
- ok(buf.R13 == ctx.R13, "longjmp failed for R13, expected: %lx, got: %lx\n", buf.R13, ctx.R13);
- ok(buf.R14 == ctx.R14, "longjmp failed for R14, expected: %lx, got: %lx\n", buf.R14, ctx.R14);
- ok(buf.R15 == ctx.R15, "longjmp failed for R15, expected: %lx, got: %lx\n", buf.R15, ctx.R15);
+ ok(buf.Rbx == ctx.Rbx, "longjmp failed for Rbx, expected: %Ix, got: %Ix\n", buf.Rbx, ctx.Rbx);
+ ok(buf.Rsp == ctx.Rsp, "longjmp failed for Rsp, expected: %Ix, got: %Ix\n", buf.Rsp, ctx.Rsp);
+ ok(buf.Rbp == ctx.Rbp, "longjmp failed for Rbp, expected: %Ix, got: %Ix\n", buf.Rbp, ctx.Rbp);
+ ok(buf.Rsi == ctx.Rsi, "longjmp failed for Rsi, expected: %Ix, got: %Ix\n", buf.Rsi, ctx.Rsi);
+ ok(buf.Rdi == ctx.Rdi, "longjmp failed for Rdi, expected: %Ix, got: %Ix\n", buf.Rdi, ctx.Rdi);
+ ok(buf.R12 == ctx.R12, "longjmp failed for R12, expected: %Ix, got: %Ix\n", buf.R12, ctx.R12);
+ ok(buf.R13 == ctx.R13, "longjmp failed for R13, expected: %Ix, got: %Ix\n", buf.R13, ctx.R13);
+ ok(buf.R14 == ctx.R14, "longjmp failed for R14, expected: %Ix, got: %Ix\n", buf.R14, ctx.R14);
+ ok(buf.R15 == ctx.R15, "longjmp failed for R15, expected: %Ix, got: %Ix\n", buf.R15, ctx.R15);
fltsave = &buf.Xmm6;
for (i = 0; i < 10; i++)
{
ok(fltsave[i].Part[0] == ctx.FltSave.XmmRegisters[i + 6].Low,
- "longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
+ "longjmp failed for Xmm%d, expected %Ix, got %Ix\n", i + 6,
fltsave[i].Part[0], ctx.FltSave.XmmRegisters[i + 6].Low);
ok(fltsave[i].Part[1] == ctx.FltSave.XmmRegisters[i + 6].High,
- "longjmp failed for Xmm%d, expected %lx, got %lx\n", i + 6,
+ "longjmp failed for Xmm%d, expected %Ix, got %Ix\n", i + 6,
fltsave[i].Part[1], ctx.FltSave.XmmRegisters[i + 6].High);
}
ok(ctx.FltSave.ControlWord == 0x7f, "Got unexpected float control word %#x.\n", ctx.FltSave.ControlWord);
- ok(ctx.MxCsr == 0x3f80, "Got unexpected MxCsr %#x.\n", ctx.MxCsr);
- ok(ctx.FltSave.MxCsr == 0x3f80, "Got unexpected MxCsr %#x.\n", ctx.FltSave.MxCsr);
+ ok(ctx.MxCsr == 0x3f80, "Got unexpected MxCsr %#lx.\n", ctx.MxCsr);
+ ok(ctx.FltSave.MxCsr == 0x3f80, "Got unexpected MxCsr %#lx.\n", ctx.FltSave.MxCsr);
buf.FpCsr = 0x27f;
buf.MxCsr = 0x1f80;
pRtlRestoreContext(&ctx, &rec);
@@ -2503,10 +2504,10 @@ static void test_restore_context(void)
else if (pass == 5)
{
ok(ctx.FltSave.ControlWord == 0x27f, "Got unexpected float control word %#x.\n", ctx.FltSave.ControlWord);
- ok(ctx.FltSave.MxCsr == 0x1f80, "Got unexpected MxCsr %#x.\n", ctx.MxCsr);
+ ok(ctx.FltSave.MxCsr == 0x1f80, "Got unexpected MxCsr %#lx.\n", ctx.MxCsr);
}
else
- ok(0, "unexpected pass %d\n", pass);
+ ok(0, "unexpected pass %ld\n", pass);
/* test with jmp through RtlUnwindEx */
pass = 0;
@@ -2526,7 +2527,7 @@ static void test_restore_context(void)
ok(0, "shouldn't be reached\n");
}
else
- ok(pass == 4, "unexpected pass %d\n", pass);
+ ok(pass == 4, "unexpected pass %ld\n", pass);
/* test with consolidate */
@@ -2549,7 +2550,7 @@ static void test_restore_context(void)
else if (pass == 3)
ok(consolidate_dummy_called, "test_consolidate_dummy not called\n");
else
- ok(0, "unexpected pass %d\n", pass);
+ ok(0, "unexpected pass %ld\n", pass);
}
static RUNTIME_FUNCTION* CALLBACK dynamic_unwind_callback( DWORD64 pc, PVOID context )
@@ -2588,7 +2589,7 @@ static void test_dynamic_unwind(void)
ok( func == NULL,
"RtlLookupFunctionEntry returned unexpected function, expected: NULL, got: %p\n", func );
ok( !base || broken(base == 0xdeadbeef),
- "RtlLookupFunctionEntry modified base address, expected: 0, got: %lx\n", base );
+ "RtlLookupFunctionEntry modified base address, expected: 0, got: %Ix\n", base );
/* Test with pointer inside of our function */
base = 0xdeadbeef;
@@ -2596,7 +2597,7 @@ static void test_dynamic_unwind(void)
ok( func == runtime_func,
"RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func, func );
ok( base == (ULONG_PTR)code_mem,
- "RtlLookupFunctionEntry returned invalid base, expected: %lx, got: %lx\n", (ULONG_PTR)code_mem, base );
+ "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (ULONG_PTR)code_mem, base );
/* Test RtlDeleteFunctionTable */
ok( pRtlDeleteFunctionTable( runtime_func ),
@@ -2641,12 +2642,12 @@ static void test_dynamic_unwind(void)
/* Test RtlInstallFunctionTableCallback with both low bits unset */
table = (ULONG_PTR)code_mem;
ok( !pRtlInstallFunctionTableCallback( table, (ULONG_PTR)code_mem, code_offset + 32, &dynamic_unwind_callback, (PVOID*)&count, NULL ),
- "RtlInstallFunctionTableCallback returned success for table = %lx\n", table );
+ "RtlInstallFunctionTableCallback returned success for table = %Ix\n", table );
/* Test RtlInstallFunctionTableCallback with both low bits set */
table = (ULONG_PTR)code_mem | 0x3;
ok( pRtlInstallFunctionTableCallback( table, (ULONG_PTR)code_mem, code_offset + 32, &dynamic_unwind_callback, (PVOID*)&count, NULL ),
- "RtlInstallFunctionTableCallback failed for table = %lx\n", table );
+ "RtlInstallFunctionTableCallback failed for table = %Ix\n", table );
/* Lookup function outside of any function table */
count = 0;
@@ -2655,9 +2656,9 @@ static void test_dynamic_unwind(void)
ok( func == NULL,
"RtlLookupFunctionEntry returned unexpected function, expected: NULL, got: %p\n", func );
ok( !base || broken(base == 0xdeadbeef),
- "RtlLookupFunctionEntry modified base address, expected: 0, got: %lx\n", base );
+ "RtlLookupFunctionEntry modified base address, expected: 0, got: %Ix\n", base );
ok( !count,
- "RtlLookupFunctionEntry issued %d unexpected calls to dynamic_unwind_callback\n", count );
+ "RtlLookupFunctionEntry issued %ld unexpected calls to dynamic_unwind_callback\n", count );
/* Test with pointer inside of our function */
count = 0;
@@ -2666,9 +2667,9 @@ static void test_dynamic_unwind(void)
ok( func != NULL && func->BeginAddress == code_offset + 16 && func->EndAddress == code_offset + 32,
"RtlLookupFunctionEntry didn't return expected function, got: %p\n", func );
ok( base == (ULONG_PTR)code_mem,
- "RtlLookupFunctionEntry returned invalid base, expected: %lx, got: %lx\n", (ULONG_PTR)code_mem, base );
+ "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (ULONG_PTR)code_mem, base );
ok( count == 1,
- "RtlLookupFunctionEntry issued %d calls to dynamic_unwind_callback, expected: 1\n", count );
+ "RtlLookupFunctionEntry issued %ld calls to dynamic_unwind_callback, expected: 1\n", count );
/* Clean up again */
ok( pRtlDeleteFunctionTable( (PRUNTIME_FUNCTION)table ),
@@ -2694,26 +2695,26 @@ static void test_dynamic_unwind(void)
growable_table = NULL;
status = pRtlAddGrowableFunctionTable( &growable_table, runtime_func, 1, 1, (ULONG_PTR)code_mem, (ULONG_PTR)code_mem + 64 );
- ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#x.\n", runtime_func, status );
+ ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func, status );
ok(growable_table != 0, "Unexpected table value.\n");
pRtlDeleteGrowableFunctionTable( growable_table );
growable_table = NULL;
status = pRtlAddGrowableFunctionTable( &growable_table, runtime_func, 2, 2, (ULONG_PTR)code_mem, (ULONG_PTR)code_mem + 64 );
- ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#x.\n", runtime_func, status );
+ ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func, status );
ok(growable_table != 0, "Unexpected table value.\n");
pRtlDeleteGrowableFunctionTable( growable_table );
growable_table = NULL;
status = pRtlAddGrowableFunctionTable( &growable_table, runtime_func, 1, 2, (ULONG_PTR)code_mem, (ULONG_PTR)code_mem + 64 );
- ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#x.\n", runtime_func, status );
+ ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func, status );
ok(growable_table != 0, "Unexpected table value.\n");
pRtlDeleteGrowableFunctionTable( growable_table );
growable_table = NULL;
status = pRtlAddGrowableFunctionTable( &growable_table, runtime_func, 0, 2, (ULONG_PTR)code_mem,
(ULONG_PTR)code_mem + code_offset + 64 );
- ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#x.\n", runtime_func, status );
+ ok(!status, "RtlAddGrowableFunctionTable failed for runtime_func = %p (aligned), %#lx.\n", runtime_func, status );
ok(growable_table != 0, "Unexpected table value.\n");
/* Current count is 0. */
@@ -2728,7 +2729,7 @@ static void test_dynamic_unwind(void)
ok( func == runtime_func,
"RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func, func );
ok( base == (ULONG_PTR)code_mem,
- "RtlLookupFunctionEntry returned invalid base, expected: %lx, got: %lx\n", (ULONG_PTR)code_mem, base );
+ "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (ULONG_PTR)code_mem, base );
/* Second function is inaccessible yet. */
base = 0xdeadbeef;
@@ -2743,7 +2744,7 @@ static void test_dynamic_unwind(void)
ok( func == runtime_func + 1,
"RtlLookupFunctionEntry didn't return expected function, expected: %p, got: %p\n", runtime_func, func );
ok( base == (ULONG_PTR)code_mem,
- "RtlLookupFunctionEntry returned invalid base, expected: %lx, got: %lx\n", (ULONG_PTR)code_mem, base );
+ "RtlLookupFunctionEntry returned invalid base, expected: %Ix, got: %Ix\n", (ULONG_PTR)code_mem, base );
pRtlDeleteGrowableFunctionTable( growable_table );
}
@@ -2753,7 +2754,7 @@ static void WINAPI termination_handler(ULONG flags, ULONG64 frame)
{
termination_handler_called++;
- ok(flags == 1 || broken(flags == 0x401), "flags = %x\n", flags);
+ ok(flags == 1 || broken(flags == 0x401), "flags = %lx\n", flags);
ok(frame == 0x1234, "frame = %p\n", (void*)frame);
}
@@ -2792,13 +2793,13 @@ static void test___C_specific_handler(void)
ok(ret == ExceptionContinueSearch, "__C_specific_handler returned %x\n", ret);
ok(termination_handler_called == 1, "termination_handler_called = %d\n",
termination_handler_called);
- ok(dispatch.ScopeIndex == 1, "dispatch.ScopeIndex = %d\n", dispatch.ScopeIndex);
+ ok(dispatch.ScopeIndex == 1, "dispatch.ScopeIndex = %ld\n", dispatch.ScopeIndex);
ret = p__C_specific_handler(&rec, frame, &context, &dispatch);
ok(ret == ExceptionContinueSearch, "__C_specific_handler returned %x\n", ret);
ok(termination_handler_called == 1, "termination_handler_called = %d\n",
termination_handler_called);
- ok(dispatch.ScopeIndex == 1, "dispatch.ScopeIndex = %d\n", dispatch.ScopeIndex);
+ ok(dispatch.ScopeIndex == 1, "dispatch.ScopeIndex = %ld\n", dispatch.ScopeIndex);
}
/* This is heavily based on the i386 exception tests. */
@@ -3016,14 +3017,14 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
USHORT ds, es, fs, gs, ss;
got_exception++;
- trace( "exception %u: %x flags:%x addr:%p\n",
+ trace( "exception %u: %lx flags:%lx addr:%p\n",
entry, rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress );
ok( rec->ExceptionCode == except->status ||
(except->alt_status != 0 && rec->ExceptionCode == except->alt_status),
- "%u: Wrong exception code %x/%x\n", entry, rec->ExceptionCode, except->status );
+ "%u: Wrong exception code %lx/%lx\n", entry, rec->ExceptionCode, except->status );
ok( context->Rip == (DWORD_PTR)code_mem + except->offset,
- "%u: Unexpected eip %#lx/%#lx\n", entry,
+ "%u: Unexpected eip %#Ix/%#Ix\n", entry,
context->Rip, (DWORD_PTR)code_mem + except->offset );
ok( rec->ExceptionAddress == (char*)context->Rip ||
(rec->ExceptionCode == STATUS_BREAKPOINT && rec->ExceptionAddress == (char*)context->Rip + 1),
@@ -3057,7 +3058,7 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
parameter_count = except->alt_nb_params;
ok( rec->NumberParameters == parameter_count,
- "%u: Unexpected parameter count %u/%u\n", entry, rec->NumberParameters, parameter_count );
+ "%u: Unexpected parameter count %lu/%u\n", entry, rec->NumberParameters, parameter_count );
/* Most CPUs (except Intel Core apparently) report a segment limit violation */
/* instead of page faults for accesses beyond 0xffffffffffffffff */
@@ -3079,14 +3080,14 @@ static DWORD WINAPI handler( EXCEPTION_RECORD *rec, ULONG64 frame,
{
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: %Ix/%Ix\n",
entry, i, rec->ExceptionInformation[i], except->params[i] );
}
else
{
for (i = 0; i < rec->NumberParameters; i++)
ok( rec->ExceptionInformation[i] == except->alt_params[i],
- "%u: Wrong parameter %d: %lx/%lx\n",
+ "%u: Wrong parameter %d: %Ix/%Ix\n",
entry, i, rec->ExceptionInformation[i], except->alt_params[i] );
}
@@ -3136,7 +3137,7 @@ static int check_debug_registers(int test_num, const struct dbgreg_test *test)
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
status = pNtGetContextThread(GetCurrentThread(), &ctx);
- ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", status);
if (!ctx.Dr0 && !ctx.Dr1 && !ctx.Dr2 && !ctx.Dr3 && !ctx.Dr6 && !ctx.Dr7)
{
@@ -3179,7 +3180,7 @@ static DWORD WINAPI single_step_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
/* show that the last single step exception on the popf instruction
* (which removed the TF bit), still is a EXCEPTION_SINGLE_STEP exception */
ok( rec->ExceptionCode == EXCEPTION_SINGLE_STEP,
- "exception is not EXCEPTION_SINGLE_STEP: %x\n", rec->ExceptionCode);
+ "exception is not EXCEPTION_SINGLE_STEP: %lx\n", rec->ExceptionCode);
}
return ExceptionContinueExecution;
}
@@ -3245,7 +3246,7 @@ static DWORD WINAPI bpx_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
{
got_exception++;
ok( rec->ExceptionCode == EXCEPTION_SINGLE_STEP,
- "wrong exception code: %x\n", rec->ExceptionCode);
+ "wrong exception code: %lx\n", rec->ExceptionCode);
if(got_exception == 1) {
/* hw bp exception on first nop */
@@ -3298,7 +3299,7 @@ static DWORD WINAPI int3_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
/* trap unhandled exceptions */
static LONG CALLBACK exc_filter( EXCEPTION_POINTERS *ptrs )
{
- printf( "%04x unhandled exception %08x at %p rip %p eflags %x\n",
+ printf( "%04lx unhandled exception %08lx at %p rip %p eflags %lx\n",
GetCurrentProcessId(),
ptrs->ExceptionRecord->ExceptionCode, ptrs->ExceptionRecord->ExceptionAddress,
(void *)ptrs->ContextRecord->Rip, ptrs->ContextRecord->EFlags );
@@ -3336,7 +3337,7 @@ static void test_exceptions(void)
ctx.Dr7 = 1;
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
res = pNtSetContextThread( GetCurrentThread(), &ctx );
- ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res);
+ ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", res);
got_exception = 0;
run_exception_test(bpx_handler, NULL, dummy_code, sizeof(dummy_code), 0);
@@ -3368,7 +3369,7 @@ static void test_exceptions(void)
/* test segment registers */
ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_SEGMENTS;
res = pNtGetContextThread( GetCurrentThread(), &ctx );
- ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", res );
+ ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", res );
__asm__ volatile( "movw %%ds,%0" : "=g" (ds) );
__asm__ volatile( "movw %%es,%0" : "=g" (es) );
__asm__ volatile( "movw %%fs,%0" : "=g" (fs) );
@@ -3389,14 +3390,14 @@ static void test_exceptions(void)
ctx.SegEs = ctx.SegFs;
ctx.SegFs = ctx.SegSs;
res = pNtSetContextThread( GetCurrentThread(), &ctx );
- ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", res );
+ ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", res );
__asm__ volatile( "movw %%ds,%0" : "=g" (ds) );
__asm__ volatile( "movw %%es,%0" : "=g" (es) );
__asm__ volatile( "movw %%fs,%0" : "=g" (fs) );
__asm__ volatile( "movw %%gs,%0" : "=g" (gs) );
__asm__ volatile( "movw %%ss,%0" : "=g" (ss) );
res = pNtGetContextThread( GetCurrentThread(), &ctx );
- ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", res );
+ ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", res );
ok( ctx.SegDs == ds, "wrong ds %04x / %04x\n", ctx.SegDs, ds );
ok( ctx.SegEs == es, "wrong es %04x / %04x\n", ctx.SegEs, es );
ok( ctx.SegFs == fs, "wrong fs %04x / %04x\n", ctx.SegFs, fs );
@@ -3431,11 +3432,11 @@ static DWORD WINAPI simd_fault_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
else
{
ULONG expect = *stage == 2 ? EXCEPTION_FLT_DIVIDE_BY_ZERO : EXCEPTION_FLT_INVALID_OPERATION;
- ok( rec->ExceptionCode == expect, "exception code: %#x, should be %#x\n",
+ ok( rec->ExceptionCode == expect, "exception code: %#lx, should be %#lx\n",
rec->ExceptionCode, expect );
- ok( rec->NumberParameters == 2, "# of params: %i, should be 2\n", rec->NumberParameters);
- ok( rec->ExceptionInformation[0] == 0, "param #0: %lx\n", rec->ExceptionInformation[0]);
- ok( rec->ExceptionInformation[1] == context->MxCsr, "param #1: %lx / %lx\n",
+ ok( rec->NumberParameters == 2, "# of params: %li, should be 2\n", rec->NumberParameters);
+ ok( rec->ExceptionInformation[0] == 0, "param #0: %Ix\n", rec->ExceptionInformation[0]);
+ ok( rec->ExceptionInformation[1] == context->MxCsr, "param #1: %Ix / %lx\n",
rec->ExceptionInformation[1], context->MxCsr);
}
context->Rip += 3; /* skip divps */
@@ -3532,15 +3533,15 @@ static LONG CALLBACK dpe_handler(EXCEPTION_POINTERS *info)
EXCEPTION_RECORD *rec = info->ExceptionRecord;
DWORD old_prot;
- trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
+ trace("vect. handler %08lx addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
got_exception++;
ok(rec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION,
- "got %#x\n", rec->ExceptionCode);
- ok(rec->NumberParameters == 2, "got %u params\n", rec->NumberParameters);
+ "got %#lx\n", rec->ExceptionCode);
+ ok(rec->NumberParameters == 2, "got %lu params\n", rec->NumberParameters);
ok(rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT,
- "got %#lx\n", rec->ExceptionInformation[0]);
+ "got %#Ix\n", rec->ExceptionInformation[0]);
ok((void *)rec->ExceptionInformation[1] == code_mem,
"got %p\n", (void *)rec->ExceptionInformation[1]);
@@ -3558,19 +3559,19 @@ static void test_dpe_exceptions(void)
void *handler;
status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len );
- ok( status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, "got status %08x\n", status );
+ ok( status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, "got status %08lx\n", status );
if (!status)
{
- ok( len == sizeof(val), "wrong len %u\n", len );
+ ok( len == sizeof(val), "wrong len %lu\n", len );
ok( val == (MEM_EXECUTE_OPTION_DISABLE | MEM_EXECUTE_OPTION_PERMANENT |
MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION),
- "wrong val %08x\n", val );
+ "wrong val %08lx\n", val );
}
- else ok( len == 0xdeadbeef, "wrong len %u\n", len );
+ else ok( len == 0xdeadbeef, "wrong len %lu\n", len );
val = MEM_EXECUTE_OPTION_DISABLE;
status = pNtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val );
- ok( status == STATUS_INVALID_PARAMETER, "got status %08x\n", status );
+ ok( status == STATUS_INVALID_PARAMETER, "got status %08lx\n", status );
memcpy(code_mem, ret, sizeof(ret));
@@ -3622,7 +3623,7 @@ static void rtlraiseexception_handler_( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
if (unhandled_handler) rtlraiseexception_unhandled_handler_called = 1;
else rtlraiseexception_handler_called = 1;
- trace( "exception: %08x flags:%x addr:%p context: Rip:%p\n",
+ trace( "exception: %08lx flags:%lx addr:%p context: Rip:%p\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, (void *)context->Rip );
ok( rec->ExceptionAddress == (char *)code_mem + 0x10
@@ -3632,7 +3633,7 @@ static void rtlraiseexception_handler_( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
ok( context->ContextFlags == CONTEXT_ALL || context->ContextFlags == (CONTEXT_ALL | CONTEXT_XSTATE)
|| context->ContextFlags == (CONTEXT_FULL | CONTEXT_SEGMENTS)
|| context->ContextFlags == (CONTEXT_FULL | CONTEXT_SEGMENTS | CONTEXT_XSTATE),
- "wrong context flags %x\n", context->ContextFlags );
+ "wrong context flags %lx\n", context->ContextFlags );
/* check that pc is fixed up only for EXCEPTION_BREAKPOINT
* even if raised by RtlRaiseException
@@ -3679,7 +3680,7 @@ static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *Exce
PCONTEXT context = ExceptionInfo->ContextRecord;
PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord;
- trace( "vect. handler %08x addr:%p Rip:%p\n", rec->ExceptionCode, rec->ExceptionAddress, (void *)context->Rip );
+ trace( "vect. handler %08lx addr:%p Rip:%p\n", rec->ExceptionCode, rec->ExceptionAddress, (void *)context->Rip );
ok( rec->ExceptionAddress == (char *)code_mem + 0x10
|| broken(rec->ExceptionAddress == code_mem || !rec->ExceptionAddress ) /* 2008 */,
@@ -3782,7 +3783,7 @@ static void test_debugger(DWORD cont_status)
sprintf(cmdline, "%s %s %s %p", my_argv[0], my_argv[1], "debuggee", &test_stage);
ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi);
- ok(ret, "could not create child process error: %u\n", GetLastError());
+ ok(ret, "could not create child process error: %lu\n", GetLastError());
if (!ret)
return;
@@ -3793,11 +3794,11 @@ static void test_debugger(DWORD cont_status)
ret = ContinueDebugEvent(de.dwProcessId, de.dwThreadId, 0xdeadbeef);
ok(!ret, "ContinueDebugEvent unexpectedly succeeded\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected last error: %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected last error: %lu\n", GetLastError());
if (de.dwThreadId != pi.dwThreadId)
{
- trace("event %d not coming from main thread, ignoring\n", de.dwDebugEventCode);
+ trace("event %ld not coming from main thread, ignoring\n", de.dwDebugEventCode);
ContinueDebugEvent(de.dwProcessId, de.dwThreadId, cont_status);
continue;
}
@@ -3818,16 +3819,16 @@ static void test_debugger(DWORD cont_status)
counter++;
status = pNtReadVirtualMemory(pi.hProcess, &code_mem, &code_mem_address,
sizeof(code_mem_address), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage,
sizeof(stage), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
ctx.ContextFlags = CONTEXT_FULL | CONTEXT_SEGMENTS;
status = pNtGetContextThread(pi.hThread, &ctx);
- ok(!status, "NtGetContextThread failed with 0x%x\n", status);
+ ok(!status, "NtGetContextThread failed with 0x%lx\n", status);
- trace("exception 0x%x at %p firstchance=%d Rip=%p, Rax=%p\n",
+ trace("exception 0x%lx at %p firstchance=%ld Rip=%p, Rax=%p\n",
de.u.Exception.ExceptionRecord.ExceptionCode,
de.u.Exception.ExceptionRecord.ExceptionAddress,
de.u.Exception.dwFirstChance, (char *)ctx.Rip, (char *)ctx.Rax);
@@ -3884,7 +3885,7 @@ static void test_debugger(DWORD cont_status)
(char *)ctx.Rip, (char *)code_mem_address + 0xf);
ctx.Rip += 1;
}
- else ok((char *)ctx.Rip == (char *)code_mem_address + 0x10, "Rip at 0x%x instead of %p\n",
+ else ok((char *)ctx.Rip == (char *)code_mem_address + 0x10, "Rip at 0x%I64x instead of %p\n",
ctx.Rip, (char *)code_mem_address + 0x10);
/* here we handle exception */
}
@@ -3892,7 +3893,7 @@ static void test_debugger(DWORD cont_status)
else if (stage == 7 || stage == 8)
{
ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT,
- "expected EXCEPTION_BREAKPOINT, got %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode);
+ "expected EXCEPTION_BREAKPOINT, got %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode);
ok((char *)ctx.Rip == (char *)code_mem_address + 0x30,
"expected Rip = %p, got %p\n", (char *)code_mem_address + 0x30, (char *)ctx.Rip);
if (stage == 8) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
@@ -3900,7 +3901,7 @@ static void test_debugger(DWORD cont_status)
else if (stage == 9 || stage == 10)
{
ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT,
- "expected EXCEPTION_BREAKPOINT, got %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode);
+ "expected EXCEPTION_BREAKPOINT, got %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode);
ok((char *)ctx.Rip == (char *)code_mem_address + 2,
"expected Rip = %p, got %p\n", (char *)code_mem_address + 2, (char *)ctx.Rip);
if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
@@ -3908,10 +3909,10 @@ static void test_debugger(DWORD cont_status)
else if (stage == 11 || stage == 12 || stage == 13)
{
ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE,
- "unexpected exception code %08x, expected %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode,
+ "unexpected exception code %08lx, expected %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode,
EXCEPTION_INVALID_HANDLE);
ok(de.u.Exception.ExceptionRecord.NumberParameters == 0,
- "unexpected number of parameters %d, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters);
+ "unexpected number of parameters %ld, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters);
if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED;
}
@@ -3933,9 +3934,9 @@ static void test_debugger(DWORD cont_status)
ctx.SegEs = ctx.SegFs;
ctx.SegGs = 0;
status = pNtSetContextThread( pi.hThread, &ctx );
- ok( status == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", status );
status = pNtGetContextThread( pi.hThread, &ctx );
- ok( status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", status );
todo_wine ok( ctx.SegSs == ss, "wrong ss %04x / %04x\n", ctx.SegSs, ss );
ok( ctx.SegDs == ctx.SegSs, "wrong ds %04x / %04x\n", ctx.SegDs, ctx.SegSs );
ok( ctx.SegEs == ctx.SegSs, "wrong es %04x / %04x\n", ctx.SegEs, ctx.SegSs );
@@ -3946,7 +3947,7 @@ static void test_debugger(DWORD cont_status)
ok(FALSE, "unexpected stage %u\n", stage);
status = pNtSetContextThread(pi.hThread, &ctx);
- ok(!status, "NtSetContextThread failed with 0x%x\n", status);
+ ok(!status, "NtSetContextThread failed with 0x%lx\n", status);
}
}
else if (de.dwDebugEventCode == OUTPUT_DEBUG_STRING_EVENT)
@@ -3956,7 +3957,7 @@ static void test_debugger(DWORD cont_status)
status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage,
sizeof(stage), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
ok(!de.u.DebugString.fUnicode, "unexpected unicode debug string event\n");
ok(de.u.DebugString.nDebugStringLength < sizeof(buffer) - 1, "buffer not large enough to hold %d bytes\n",
@@ -3965,7 +3966,7 @@ static void test_debugger(DWORD cont_status)
memset(buffer, 0, sizeof(buffer));
status = pNtReadVirtualMemory(pi.hProcess, de.u.DebugString.lpDebugStringData, buffer,
de.u.DebugString.nDebugStringLength, &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
if (stage == 3 || stage == 4)
ok(!strcmp(buffer, "Hello World"), "got unexpected debug string '%s'\n", buffer);
@@ -3980,13 +3981,13 @@ static void test_debugger(DWORD cont_status)
status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage,
sizeof(stage), &size_read);
- ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status);
+ ok(!status,"NtReadVirtualMemory failed with 0x%lx\n", status);
if (stage == 5 || stage == 6)
{
- ok(de.u.RipInfo.dwError == 0x11223344, "got unexpected rip error code %08x, expected %08x\n",
+ ok(de.u.RipInfo.dwError == 0x11223344, "got unexpected rip error code %08lx, expected %08x\n",
de.u.RipInfo.dwError, 0x11223344);
- ok(de.u.RipInfo.dwType == 0x55667788, "got unexpected rip type %08x, expected %08x\n",
+ ok(de.u.RipInfo.dwType == 0x55667788, "got unexpected rip type %08lx, expected %08x\n",
de.u.RipInfo.dwType, 0x55667788);
}
else
@@ -4001,9 +4002,9 @@ static void test_debugger(DWORD cont_status)
wait_child_process( pi.hProcess );
ret = CloseHandle(pi.hThread);
- ok(ret, "error %u\n", GetLastError());
+ ok(ret, "error %lu\n", GetLastError());
ret = CloseHandle(pi.hProcess);
- ok(ret, "error %u\n", GetLastError());
+ ok(ret, "error %lu\n", GetLastError());
}
static void test_thread_context(void)
@@ -4087,16 +4088,16 @@ static void test_thread_context(void)
func_ptr( &context, 0, &expect, pRtlCaptureContext );
trace( "expect: rax=%p rbx=%p rcx=%p rdx=%p rsi=%p rdi=%p "
"r8=%p r9=%p r10=%p r11=%p r12=%p r13=%p r14=%p r15=%p "
- "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x prev=%08x\n",
+ "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08I64x prev=%p\n",
(void *)expect.Rax, (void *)expect.Rbx, (void *)expect.Rcx, (void *)expect.Rdx,
(void *)expect.Rsi, (void *)expect.Rdi, (void *)expect.R8, (void *)expect.R9,
(void *)expect.R10, (void *)expect.R11, (void *)expect.R12, (void *)expect.R13,
(void *)expect.R14, (void *)expect.R15, (void *)expect.Rbp, (void *)expect.Rsp,
(void *)expect.Rip, expect.SegCs, expect.SegDs, expect.SegEs,
- expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, expect.prev_frame );
+ expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, (void*)expect.prev_frame );
trace( "actual: rax=%p rbx=%p rcx=%p rdx=%p rsi=%p rdi=%p "
"r8=%p r9=%p r10=%p r11=%p r12=%p r13=%p r14=%p r15=%p "
- "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n",
+ "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08lx\n",
(void *)context.Rax, (void *)context.Rbx, (void *)context.Rcx, (void *)context.Rdx,
(void *)context.Rsi, (void *)context.Rdi, (void *)context.R8, (void *)context.R9,
(void *)context.R10, (void *)context.R11, (void *)context.R12, (void *)context.R13,
@@ -4105,7 +4106,7 @@ static void test_thread_context(void)
context.SegFs, context.SegGs, context.SegSs, context.EFlags );
ok( context.ContextFlags == (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT),
- "wrong flags %08x\n", context.ContextFlags );
+ "wrong flags %08lx\n", context.ContextFlags );
COMPARE( Rax );
COMPARE( Rbx );
COMPARE( Rcx );
@@ -4144,19 +4145,19 @@ static void test_thread_context(void)
context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT;
status = func_ptr( GetCurrentThread(), &context, &expect, pNtGetContextThread );
- ok( status == STATUS_SUCCESS, "NtGetContextThread failed %08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtGetContextThread failed %08lx\n", status );
trace( "expect: rax=%p rbx=%p rcx=%p rdx=%p rsi=%p rdi=%p "
"r8=%p r9=%p r10=%p r11=%p r12=%p r13=%p r14=%p r15=%p "
- "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x prev=%08x\n",
+ "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08I64x prev=%p\n",
(void *)expect.Rax, (void *)expect.Rbx, (void *)expect.Rcx, (void *)expect.Rdx,
(void *)expect.Rsi, (void *)expect.Rdi, (void *)expect.R8, (void *)expect.R9,
(void *)expect.R10, (void *)expect.R11, (void *)expect.R12, (void *)expect.R13,
(void *)expect.R14, (void *)expect.R15, (void *)expect.Rbp, (void *)expect.Rsp,
(void *)expect.Rip, expect.SegCs, expect.SegDs, expect.SegEs,
- expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, expect.prev_frame );
+ expect.SegFs, expect.SegGs, expect.SegSs, expect.EFlags, (void*)expect.prev_frame );
trace( "actual: rax=%p rbx=%p rcx=%p rdx=%p rsi=%p rdi=%p "
"r8=%p r9=%p r10=%p r11=%p r12=%p r13=%p r14=%p r15=%p "
- "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n",
+ "rbp=%p rsp=%p rip=%p cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08lx\n",
(void *)context.Rax, (void *)context.Rbx, (void *)context.Rcx, (void *)context.Rdx,
(void *)context.Rsi, (void *)context.Rdi, (void *)context.R8, (void *)context.R9,
(void *)context.R10, (void *)context.R11, (void *)context.R12, (void *)context.R13,
@@ -4221,45 +4222,45 @@ static void test_wow64_context(void)
memset(&ctx, 0x55, sizeof(ctx));
ctx.ContextFlags = WOW64_CONTEXT_ALL;
ret = pRtlWow64GetThreadContext( GetCurrentThread(), &ctx );
- ok(ret == STATUS_INVALID_PARAMETER || broken(ret == STATUS_PARTIAL_COPY), "got %#x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER || broken(ret == STATUS_PARTIAL_COPY), "got %#lx\n", ret);
sprintf( cmdline, "\"%s\" /c for /l %%n in () do @echo >nul", appname );
r = CreateProcessA( appname, cmdline, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi);
- ok( r, "failed to start %s err %u\n", appname, GetLastError() );
+ ok( r, "failed to start %s err %lu\n", appname, GetLastError() );
ret = pRtlWow64GetThreadContext( pi.hThread, &ctx );
- ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
- ok(ctx.ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#x\n", ctx.ContextFlags);
- ok(!ctx.Ebp, "got ebp %08x\n", ctx.Ebp);
- ok(!ctx.Ecx, "got ecx %08x\n", ctx.Ecx);
- ok(!ctx.Edx, "got edx %08x\n", ctx.Edx);
- ok(!ctx.Esi, "got esi %08x\n", ctx.Esi);
- ok(!ctx.Edi, "got edi %08x\n", ctx.Edi);
- ok((ctx.EFlags & ~2) == 0x200, "got eflags %08x\n", ctx.EFlags);
- ok((WORD) ctx.FloatSave.ControlWord == 0x27f, "got control word %08x\n",
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(ctx.ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#lx\n", ctx.ContextFlags);
+ ok(!ctx.Ebp, "got ebp %08lx\n", ctx.Ebp);
+ ok(!ctx.Ecx, "got ecx %08lx\n", ctx.Ecx);
+ ok(!ctx.Edx, "got edx %08lx\n", ctx.Edx);
+ ok(!ctx.Esi, "got esi %08lx\n", ctx.Esi);
+ ok(!ctx.Edi, "got edi %08lx\n", ctx.Edi);
+ ok((ctx.EFlags & ~2) == 0x200, "got eflags %08lx\n", ctx.EFlags);
+ ok((WORD) ctx.FloatSave.ControlWord == 0x27f, "got control word %08lx\n",
ctx.FloatSave.ControlWord);
ok(*(WORD *)ctx.ExtendedRegisters == 0x27f, "got SSE control word %04x\n",
*(WORD *)ctx.ExtendedRegisters);
ret = pRtlWow64SetThreadContext( pi.hThread, &ctx );
- ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
pNtQueryInformationThread( pi.hThread, ThreadBasicInformation, &info, sizeof(info), NULL );
if (!ReadProcessMemory( pi.hProcess, info.TebBaseAddress, &teb, sizeof(teb), &res )) res = 0;
- ok( res == sizeof(teb), "wrong len %lx\n", res );
+ ok( res == sizeof(teb), "wrong len %Ix\n", res );
memset( &teb32, 0, sizeof(teb32) );
if (teb.WowTebOffset > 1)
{
if (!ReadProcessMemory( pi.hProcess, (char *)info.TebBaseAddress + teb.WowTebOffset,
&teb32, sizeof(teb32), &res )) res = 0;
- ok( res == sizeof(teb32), "wrong len %lx\n", res );
+ ok( res == sizeof(teb32), "wrong len %Ix\n", res );
ok( ((ctx.Esp + 0xfff) & ~0xfff) == teb32.Tib.StackBase,
- "esp is not at top of stack: %08x / %08x\n", ctx.Esp, teb32.Tib.StackBase );
+ "esp is not at top of stack: %08lx / %08lx\n", ctx.Esp, teb32.Tib.StackBase );
ok( ULongToPtr( teb32.Tib.StackBase ) <= teb.DeallocationStack ||
ULongToPtr( teb32.DeallocationStack ) >= teb.Tib.StackBase,
- "stacks overlap %08x-%08x / %p-%p\n", teb32.DeallocationStack, teb32.Tib.StackBase,
+ "stacks overlap %08lx-%08lx / %p-%p\n", teb32.DeallocationStack, teb32.Tib.StackBase,
teb.DeallocationStack, teb.Tib.StackBase );
}
@@ -4270,29 +4271,29 @@ static void test_wow64_context(void)
cpu_size = 0x1000 - ((ULONG_PTR)teb.TlsSlots[WOW64_TLS_CPURESERVED] & 0xfff);
cpu = malloc( cpu_size );
if (!ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED], cpu, cpu_size, &res )) res = 0;
- ok( res == cpu_size, "wrong len %lx\n", res );
+ ok( res == cpu_size, "wrong len %Ix\n", res );
ok( cpu->Machine == IMAGE_FILE_MACHINE_I386, "wrong machine %04x\n", cpu->Machine );
ret = pRtlWow64GetCpuAreaInfo( cpu, 0, &cpu_info );
- ok( !ret, "RtlWow64GetCpuAreaInfo failed %x\n", ret );
+ ok( !ret, "RtlWow64GetCpuAreaInfo failed %lx\n", ret );
ctx_ptr = (WOW64_CONTEXT *)cpu_info.Context;
ok(!*(void **)cpu_info.ContextEx, "got context_ex %p\n", *(void **)cpu_info.ContextEx);
- ok(ctx_ptr->ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#x\n", ctx_ptr->ContextFlags);
- ok(ctx_ptr->Eax == ctx.Eax, "got eax %08x / %08x\n", ctx_ptr->Eax, ctx.Eax);
- ok(ctx_ptr->Ebx == ctx.Ebx, "got ebx %08x / %08x\n", ctx_ptr->Ebx, ctx.Ebx);
- ok(ctx_ptr->Ecx == ctx.Ecx, "got ecx %08x / %08x\n", ctx_ptr->Ecx, ctx.Ecx);
- ok(ctx_ptr->Edx == ctx.Edx, "got edx %08x / %08x\n", ctx_ptr->Edx, ctx.Edx);
- ok(ctx_ptr->Ebp == ctx.Ebp, "got ebp %08x / %08x\n", ctx_ptr->Ebp, ctx.Ebp);
- ok(ctx_ptr->Esi == ctx.Esi, "got esi %08x / %08x\n", ctx_ptr->Esi, ctx.Esi);
- ok(ctx_ptr->Edi == ctx.Edi, "got edi %08x / %08x\n", ctx_ptr->Edi, ctx.Edi);
- ok(ctx_ptr->SegCs == ctx.SegCs, "got cs %04x / %04x\n", ctx_ptr->SegCs, ctx.SegCs);
- ok(ctx_ptr->SegDs == ctx.SegDs, "got ds %04x / %04x\n", ctx_ptr->SegDs, ctx.SegDs);
- ok(ctx_ptr->SegEs == ctx.SegEs, "got es %04x / %04x\n", ctx_ptr->SegEs, ctx.SegEs);
- ok(ctx_ptr->SegFs == ctx.SegFs, "got fs %04x / %04x\n", ctx_ptr->SegFs, ctx.SegFs);
- ok(ctx_ptr->SegGs == ctx.SegGs, "got gs %04x / %04x\n", ctx_ptr->SegGs, ctx.SegGs);
- ok(ctx_ptr->SegSs == ctx.SegSs, "got ss %04x / %04x\n", ctx_ptr->SegSs, ctx.SegSs);
- ok(ctx_ptr->EFlags == ctx.EFlags, "got eflags %08x / %08x\n", ctx_ptr->EFlags, ctx.EFlags);
+ ok(ctx_ptr->ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#lx\n", ctx_ptr->ContextFlags);
+ ok(ctx_ptr->Eax == ctx.Eax, "got eax %08lx / %08lx\n", ctx_ptr->Eax, ctx.Eax);
+ ok(ctx_ptr->Ebx == ctx.Ebx, "got ebx %08lx / %08lx\n", ctx_ptr->Ebx, ctx.Ebx);
+ ok(ctx_ptr->Ecx == ctx.Ecx, "got ecx %08lx / %08lx\n", ctx_ptr->Ecx, ctx.Ecx);
+ ok(ctx_ptr->Edx == ctx.Edx, "got edx %08lx / %08lx\n", ctx_ptr->Edx, ctx.Edx);
+ ok(ctx_ptr->Ebp == ctx.Ebp, "got ebp %08lx / %08lx\n", ctx_ptr->Ebp, ctx.Ebp);
+ ok(ctx_ptr->Esi == ctx.Esi, "got esi %08lx / %08lx\n", ctx_ptr->Esi, ctx.Esi);
+ ok(ctx_ptr->Edi == ctx.Edi, "got edi %08lx / %08lx\n", ctx_ptr->Edi, ctx.Edi);
+ ok(ctx_ptr->SegCs == ctx.SegCs, "got cs %04lx / %04lx\n", ctx_ptr->SegCs, ctx.SegCs);
+ ok(ctx_ptr->SegDs == ctx.SegDs, "got ds %04lx / %04lx\n", ctx_ptr->SegDs, ctx.SegDs);
+ ok(ctx_ptr->SegEs == ctx.SegEs, "got es %04lx / %04lx\n", ctx_ptr->SegEs, ctx.SegEs);
+ ok(ctx_ptr->SegFs == ctx.SegFs, "got fs %04lx / %04lx\n", ctx_ptr->SegFs, ctx.SegFs);
+ ok(ctx_ptr->SegGs == ctx.SegGs, "got gs %04lx / %04lx\n", ctx_ptr->SegGs, ctx.SegGs);
+ ok(ctx_ptr->SegSs == ctx.SegSs, "got ss %04lx / %04lx\n", ctx_ptr->SegSs, ctx.SegSs);
+ ok(ctx_ptr->EFlags == ctx.EFlags, "got eflags %08lx / %08lx\n", ctx_ptr->EFlags, ctx.EFlags);
ok((WORD)ctx_ptr->FloatSave.ControlWord == ctx.FloatSave.ControlWord,
- "got control word %08x / %08x\n", ctx_ptr->FloatSave.ControlWord, ctx.FloatSave.ControlWord);
+ "got control word %08lx / %08lx\n", ctx_ptr->FloatSave.ControlWord, ctx.FloatSave.ControlWord);
ok(*(WORD *)ctx_ptr->ExtendedRegisters == *(WORD *)ctx.ExtendedRegisters,
"got SSE control word %04x / %04x\n", *(WORD *)ctx_ptr->ExtendedRegisters,
*(WORD *)ctx.ExtendedRegisters);
@@ -4300,11 +4301,11 @@ static void test_wow64_context(void)
ecx = ctx.Ecx;
ctx.Ecx = 0x12345678;
ret = pRtlWow64SetThreadContext( pi.hThread, &ctx );
- ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
if (!ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED], cpu, cpu_size, &res )) res = 0;
- ok( res == cpu_size, "wrong len %lx\n", res );
+ ok( res == cpu_size, "wrong len %Ix\n", res );
todo_wine
- ok( ctx_ptr->Ecx == 0x12345678, "got ecx %08x\n", ctx_ptr->Ecx );
+ ok( ctx_ptr->Ecx == 0x12345678, "got ecx %08lx\n", ctx_ptr->Ecx );
ctx.Ecx = ecx;
pRtlWow64SetThreadContext( pi.hThread, &ctx );
}
@@ -4313,37 +4314,37 @@ static void test_wow64_context(void)
memset( &context, 0x55, sizeof(context) );
context.ContextFlags = CONTEXT_ALL;
ret = pNtGetContextThread( pi.hThread, &context );
- ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
- ok( context.ContextFlags == CONTEXT_ALL, "got context flags %#x\n", context.ContextFlags );
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok( context.ContextFlags == CONTEXT_ALL, "got context flags %#lx\n", context.ContextFlags );
todo_wine
- ok( !context.Rax, "rax is not zero %lx\n", context.Rax );
+ ok( !context.Rax, "rax is not zero %Ix\n", context.Rax );
todo_wine
- ok( !context.Rbx, "rbx is not zero %lx\n", context.Rbx );
- ok( !context.Rsi, "rsi is not zero %lx\n", context.Rsi );
- ok( !context.Rdi, "rdi is not zero %lx\n", context.Rdi );
- ok( !context.Rbp, "rbp is not zero %lx\n", context.Rbp );
- ok( !context.R8, "r8 is not zero %lx\n", context.R8 );
- ok( !context.R9, "r9 is not zero %lx\n", context.R9 );
- ok( !context.R10, "r10 is not zero %lx\n", context.R10 );
- ok( !context.R11, "r11 is not zero %lx\n", context.R11 );
- ok( !context.R12, "r12 is not zero %lx\n", context.R12 );
- ok( !context.R13, "r13 is not zero %lx\n", context.R13 );
- ok( !context.R14, "r14 is not zero %lx\n", context.R14 );
- ok( !context.R15, "r15 is not zero %lx\n", context.R15 );
+ ok( !context.Rbx, "rbx is not zero %Ix\n", context.Rbx );
+ ok( !context.Rsi, "rsi is not zero %Ix\n", context.Rsi );
+ ok( !context.Rdi, "rdi is not zero %Ix\n", context.Rdi );
+ ok( !context.Rbp, "rbp is not zero %Ix\n", context.Rbp );
+ ok( !context.R8, "r8 is not zero %Ix\n", context.R8 );
+ ok( !context.R9, "r9 is not zero %Ix\n", context.R9 );
+ ok( !context.R10, "r10 is not zero %Ix\n", context.R10 );
+ ok( !context.R11, "r11 is not zero %Ix\n", context.R11 );
+ ok( !context.R12, "r12 is not zero %Ix\n", context.R12 );
+ ok( !context.R13, "r13 is not zero %Ix\n", context.R13 );
+ ok( !context.R14, "r14 is not zero %Ix\n", context.R14 );
+ ok( !context.R15, "r15 is not zero %Ix\n", context.R15 );
todo_wine
ok( ((ULONG_PTR)context.Rsp & ~0xfff) == ((ULONG_PTR)teb.Tib.StackBase & ~0xfff),
"rsp is not at top of stack %p / %p\n", (void *)context.Rsp, teb.Tib.StackBase );
todo_wine
- ok( context.EFlags == 0x200, "wrong flags %08x\n", context.EFlags );
- ok( context.MxCsr == 0x1f80, "wrong mxcsr %08x\n", context.MxCsr );
+ ok( context.EFlags == 0x200, "wrong flags %08lx\n", context.EFlags );
+ ok( context.MxCsr == 0x1f80, "wrong mxcsr %08lx\n", context.MxCsr );
ok( context.FltSave.ControlWord == 0x27f, "wrong control %08x\n", context.FltSave.ControlWord );
todo_wine
ok( context.SegCs != ctx.SegCs, "wrong cs %04x\n", context.SegCs );
- ok( context.SegDs == ctx.SegDs, "wrong ds %04x / %04x\n", context.SegDs, ctx.SegDs );
- ok( context.SegEs == ctx.SegEs, "wrong es %04x / %04x\n", context.SegEs, ctx.SegEs );
- ok( context.SegFs == ctx.SegFs, "wrong fs %04x / %04x\n", context.SegFs, ctx.SegFs );
- ok( context.SegGs == ctx.SegGs, "wrong gs %04x / %04x\n", context.SegGs, ctx.SegGs );
- ok( context.SegSs == ctx.SegSs, "wrong ss %04x / %04x\n", context.SegSs, ctx.SegSs );
+ ok( context.SegDs == ctx.SegDs, "wrong ds %04x / %04lx\n", context.SegDs, ctx.SegDs );
+ ok( context.SegEs == ctx.SegEs, "wrong es %04x / %04lx\n", context.SegEs, ctx.SegEs );
+ ok( context.SegFs == ctx.SegFs, "wrong fs %04x / %04lx\n", context.SegFs, ctx.SegFs );
+ ok( context.SegGs == ctx.SegGs, "wrong gs %04x / %04lx\n", context.SegGs, ctx.SegGs );
+ ok( context.SegSs == ctx.SegSs, "wrong ss %04x / %04lx\n", context.SegSs, ctx.SegSs );
cs32 = ctx.SegCs;
cs64 = context.SegCs;
@@ -4361,7 +4362,7 @@ static void test_wow64_context(void)
memset( &context, 0x55, sizeof(context) );
context.ContextFlags = CONTEXT_ALL;
ret = pNtGetContextThread( pi.hThread, &context );
- ok( ret == STATUS_SUCCESS, "got %#x\n", ret );
+ ok( ret == STATUS_SUCCESS, "got %#lx\n", ret );
if (ret) break;
if (context.SegCs == cs32 && got32) continue;
if (context.SegCs == cs64 && got64) continue;
@@ -4374,30 +4375,30 @@ static void test_wow64_context(void)
memset( &ctx, 0x55, sizeof(ctx) );
ctx.ContextFlags = WOW64_CONTEXT_ALL;
ret = pRtlWow64GetThreadContext( pi.hThread, &ctx );
- ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
- ok( ctx.ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#x\n", ctx.ContextFlags );
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok( ctx.ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#lx\n", ctx.ContextFlags );
if (context.SegCs == cs32)
{
trace( "in 32-bit mode %04x\n", context.SegCs );
- ok( ctx.Eip == context.Rip, "cs32: eip %08x / %p\n", ctx.Eip, (void *)context.Rip );
- ok( ctx.Ebp == context.Rbp, "cs32: ebp %08x / %p\n", ctx.Ebp, (void *)context.Rbp );
- ok( ctx.Esp == context.Rsp, "cs32: esp %08x / %p\n", ctx.Esp, (void *)context.Rsp );
- ok( ctx.Eax == context.Rax, "cs32: eax %08x / %p\n", ctx.Eax, (void *)context.Rax );
- ok( ctx.Ebx == context.Rbx, "cs32: ebx %08x / %p\n", ctx.Ebx, (void *)context.Rbx );
+ ok( ctx.Eip == context.Rip, "cs32: eip %08lx / %p\n", ctx.Eip, (void *)context.Rip );
+ ok( ctx.Ebp == context.Rbp, "cs32: ebp %08lx / %p\n", ctx.Ebp, (void *)context.Rbp );
+ ok( ctx.Esp == context.Rsp, "cs32: esp %08lx / %p\n", ctx.Esp, (void *)context.Rsp );
+ ok( ctx.Eax == context.Rax, "cs32: eax %08lx / %p\n", ctx.Eax, (void *)context.Rax );
+ ok( ctx.Ebx == context.Rbx, "cs32: ebx %08lx / %p\n", ctx.Ebx, (void *)context.Rbx );
ok( ctx.Ecx == context.Rcx || broken(ctx.Ecx == (ULONG)context.Rcx),
- "cs32: ecx %08x / %p\n", ctx.Ecx, (void *)context.Rcx );
- ok( ctx.Edx == context.Rdx, "cs32: edx %08x / %p\n", ctx.Edx, (void *)context.Rdx );
- ok( ctx.Esi == context.Rsi, "cs32: esi %08x / %p\n", ctx.Esi, (void *)context.Rsi );
- ok( ctx.Edi == context.Rdi, "cs32: edi %08x / %p\n", ctx.Edi, (void *)context.Rdi );
- ok( ctx.SegCs == cs32, "cs32: wrong cs %04x / %04x\n", ctx.SegCs, cs32 );
- ok( ctx.SegDs == context.SegDs, "cs32: wrong ds %04x / %04x\n", ctx.SegDs, context.SegDs );
- ok( ctx.SegEs == context.SegEs, "cs32: wrong es %04x / %04x\n", ctx.SegEs, context.SegEs );
- ok( ctx.SegFs == context.SegFs, "cs32: wrong fs %04x / %04x\n", ctx.SegFs, context.SegFs );
- ok( ctx.SegGs == context.SegGs, "cs32: wrong gs %04x / %04x\n", ctx.SegGs, context.SegGs );
- ok( ctx.SegSs == context.SegSs, "cs32: wrong ss %04x / %04x\n", ctx.SegSs, context.SegSs );
+ "cs32: ecx %08lx / %p\n", ctx.Ecx, (void *)context.Rcx );
+ ok( ctx.Edx == context.Rdx, "cs32: edx %08lx / %p\n", ctx.Edx, (void *)context.Rdx );
+ ok( ctx.Esi == context.Rsi, "cs32: esi %08lx / %p\n", ctx.Esi, (void *)context.Rsi );
+ ok( ctx.Edi == context.Rdi, "cs32: edi %08lx / %p\n", ctx.Edi, (void *)context.Rdi );
+ ok( ctx.SegCs == cs32, "cs32: wrong cs %04lx / %04x\n", ctx.SegCs, cs32 );
+ ok( ctx.SegDs == context.SegDs, "cs32: wrong ds %04lx / %04x\n", ctx.SegDs, context.SegDs );
+ ok( ctx.SegEs == context.SegEs, "cs32: wrong es %04lx / %04x\n", ctx.SegEs, context.SegEs );
+ ok( ctx.SegFs == context.SegFs, "cs32: wrong fs %04lx / %04x\n", ctx.SegFs, context.SegFs );
+ ok( ctx.SegGs == context.SegGs, "cs32: wrong gs %04lx / %04x\n", ctx.SegGs, context.SegGs );
+ ok( ctx.SegSs == context.SegSs, "cs32: wrong ss %04lx / %04x\n", ctx.SegSs, context.SegSs );
if (teb32.DeallocationStack)
ok( ctx.Esp >= teb32.DeallocationStack && ctx.Esp <= teb32.Tib.StackBase,
- "cs32: esp not inside 32-bit stack %08x / %08x-%08x\n", ctx.Esp,
+ "cs32: esp not inside 32-bit stack %08lx / %08lx-%08lx\n", ctx.Esp,
teb32.DeallocationStack, teb32.Tib.StackBase );
/* r12 points to the TEB */
ok( (void *)context.R12 == info.TebBaseAddress,
@@ -4417,9 +4418,9 @@ static void test_wow64_context(void)
/* in 32-bit mode, the 32-bit context is the current cpu context, not the stored one */
if (!ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED],
cpu, cpu_size, &res )) res = 0;
- ok( res == cpu_size, "wrong len %lx\n", res );
+ ok( res == cpu_size, "wrong len %Ix\n", res );
ok(ctx_ptr->ContextFlags == WOW64_CONTEXT_ALL,
- "cs32: got context flags %#x\n", ctx_ptr->ContextFlags);
+ "cs32: got context flags %#lx\n", ctx_ptr->ContextFlags);
/* changing either context changes the actual cpu context */
rcx = context.Rcx;
@@ -4429,17 +4430,17 @@ static void test_wow64_context(void)
memset( &ctx, 0x55, sizeof(ctx) );
ctx.ContextFlags = WOW64_CONTEXT_ALL;
pRtlWow64GetThreadContext( pi.hThread, &ctx );
- ok( ctx.Ecx == 0x87654321, "cs64: ecx set to %08x\n", ctx.Ecx );
+ ok( ctx.Ecx == 0x87654321, "cs64: ecx set to %08lx\n", ctx.Ecx );
ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED], cpu, cpu_size, &res );
- ok( ctx_ptr->Ecx == ecx, "cs64: ecx set to %08x\n", ctx_ptr->Ecx );
+ ok( ctx_ptr->Ecx == ecx, "cs64: ecx set to %08lx\n", ctx_ptr->Ecx );
ctx.Ecx = 0x33334444;
pRtlWow64SetThreadContext( pi.hThread, &ctx );
memset( &ctx, 0x55, sizeof(ctx) );
ctx.ContextFlags = WOW64_CONTEXT_ALL;
pRtlWow64GetThreadContext( pi.hThread, &ctx );
- ok( ctx.Ecx == 0x33334444, "cs64: ecx set to %08x\n", ctx.Ecx );
+ ok( ctx.Ecx == 0x33334444, "cs64: ecx set to %08lx\n", ctx.Ecx );
ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED], cpu, cpu_size, &res );
- ok( ctx_ptr->Ecx == ecx, "cs64: ecx set to %08x\n", ctx_ptr->Ecx );
+ ok( ctx_ptr->Ecx == ecx, "cs64: ecx set to %08lx\n", ctx_ptr->Ecx );
memset( &context, 0x55, sizeof(context) );
context.ContextFlags = CONTEXT_ALL;
pNtGetContextThread( pi.hThread, &context );
@@ -4453,16 +4454,16 @@ static void test_wow64_context(void)
else
{
trace( "in 64-bit mode %04x\n", context.SegCs );
- ok( ctx.Eip != context.Rip, "cs64: eip %08x / %p\n", ctx.Eip, (void *)context.Rip);
- ok( ctx.SegCs == cs32, "cs64: wrong cs %04x / %04x\n", ctx.SegCs, cs32 );
- ok( ctx.SegDs == context.SegDs, "cs64: wrong ds %04x / %04x\n", ctx.SegDs, context.SegDs );
- ok( ctx.SegEs == context.SegEs, "cs64: wrong es %04x / %04x\n", ctx.SegEs, context.SegEs );
- ok( ctx.SegFs == context.SegFs, "cs64: wrong fs %04x / %04x\n", ctx.SegFs, context.SegFs );
- ok( ctx.SegGs == context.SegGs, "cs64: wrong gs %04x / %04x\n", ctx.SegGs, context.SegGs );
- ok( ctx.SegSs == context.SegSs, "cs64: wrong ss %04x / %04x\n", ctx.SegSs, context.SegSs );
+ ok( ctx.Eip != context.Rip, "cs64: eip %08lx / %p\n", ctx.Eip, (void *)context.Rip);
+ ok( ctx.SegCs == cs32, "cs64: wrong cs %04lx / %04x\n", ctx.SegCs, cs32 );
+ ok( ctx.SegDs == context.SegDs, "cs64: wrong ds %04lx / %04x\n", ctx.SegDs, context.SegDs );
+ ok( ctx.SegEs == context.SegEs, "cs64: wrong es %04lx / %04x\n", ctx.SegEs, context.SegEs );
+ ok( ctx.SegFs == context.SegFs, "cs64: wrong fs %04lx / %04x\n", ctx.SegFs, context.SegFs );
+ ok( ctx.SegGs == context.SegGs, "cs64: wrong gs %04lx / %04x\n", ctx.SegGs, context.SegGs );
+ ok( ctx.SegSs == context.SegSs, "cs64: wrong ss %04lx / %04x\n", ctx.SegSs, context.SegSs );
if (teb32.DeallocationStack)
ok( ctx.Esp >= teb32.DeallocationStack && ctx.Esp <= teb32.Tib.StackBase,
- "cs64: esp not inside 32-bit stack %08x / %08x-%08x\n", ctx.Esp,
+ "cs64: esp not inside 32-bit stack %08lx / %08lx-%08lx\n", ctx.Esp,
teb32.DeallocationStack, teb32.Tib.StackBase );
ok( ((void *)context.Rsp >= teb.DeallocationStack && (void *)context.Rsp <= teb.Tib.StackBase) ||
(context.Rsp >= teb32.DeallocationStack && context.Rsp <= teb32.Tib.StackBase),
@@ -4475,18 +4476,18 @@ static void test_wow64_context(void)
/* in 64-bit mode, the 32-bit context is stored in the cpu area */
if (!ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED],
cpu, cpu_size, &res )) res = 0;
- ok( res == cpu_size, "wrong len %lx\n", res );
+ ok( res == cpu_size, "wrong len %Ix\n", res );
ok(ctx_ptr->ContextFlags == WOW64_CONTEXT_ALL,
- "cs64: got context flags %#x\n", ctx_ptr->ContextFlags);
- ok(ctx_ptr->Eip == ctx.Eip, "cs64: got eip %08x / %08x\n", ctx_ptr->Eip, ctx.Eip);
- ok(ctx_ptr->Eax == ctx.Eax, "cs64: got eax %08x / %08x\n", ctx_ptr->Eax, ctx.Eax);
- ok(ctx_ptr->Ebx == ctx.Ebx, "cs64: got ebx %08x / %08x\n", ctx_ptr->Ebx, ctx.Ebx);
- ok(ctx_ptr->Ecx == ctx.Ecx, "cs64: got ecx %08x / %08x\n", ctx_ptr->Ecx, ctx.Ecx);
- ok(ctx_ptr->Edx == ctx.Edx, "cs64: got edx %08x / %08x\n", ctx_ptr->Edx, ctx.Edx);
- ok(ctx_ptr->Ebp == ctx.Ebp, "cs64: got ebp %08x / %08x\n", ctx_ptr->Ebp, ctx.Ebp);
- ok(ctx_ptr->Esi == ctx.Esi, "cs64: got esi %08x / %08x\n", ctx_ptr->Esi, ctx.Esi);
- ok(ctx_ptr->Edi == ctx.Edi, "cs64: got edi %08x / %08x\n", ctx_ptr->Edi, ctx.Edi);
- ok(ctx_ptr->EFlags == ctx.EFlags, "cs64: got eflags %08x / %08x\n", ctx_ptr->EFlags, ctx.EFlags);
+ "cs64: got context flags %#lx\n", ctx_ptr->ContextFlags);
+ ok(ctx_ptr->Eip == ctx.Eip, "cs64: got eip %08lx / %08lx\n", ctx_ptr->Eip, ctx.Eip);
+ ok(ctx_ptr->Eax == ctx.Eax, "cs64: got eax %08lx / %08lx\n", ctx_ptr->Eax, ctx.Eax);
+ ok(ctx_ptr->Ebx == ctx.Ebx, "cs64: got ebx %08lx / %08lx\n", ctx_ptr->Ebx, ctx.Ebx);
+ ok(ctx_ptr->Ecx == ctx.Ecx, "cs64: got ecx %08lx / %08lx\n", ctx_ptr->Ecx, ctx.Ecx);
+ ok(ctx_ptr->Edx == ctx.Edx, "cs64: got edx %08lx / %08lx\n", ctx_ptr->Edx, ctx.Edx);
+ ok(ctx_ptr->Ebp == ctx.Ebp, "cs64: got ebp %08lx / %08lx\n", ctx_ptr->Ebp, ctx.Ebp);
+ ok(ctx_ptr->Esi == ctx.Esi, "cs64: got esi %08lx / %08lx\n", ctx_ptr->Esi, ctx.Esi);
+ ok(ctx_ptr->Edi == ctx.Edi, "cs64: got edi %08lx / %08lx\n", ctx_ptr->Edi, ctx.Edi);
+ ok(ctx_ptr->EFlags == ctx.EFlags, "cs64: got eflags %08lx / %08lx\n", ctx_ptr->EFlags, ctx.EFlags);
/* changing one context doesn't change the other one */
rcx = context.Rcx;
@@ -4496,17 +4497,17 @@ static void test_wow64_context(void)
memset( &ctx, 0x55, sizeof(ctx) );
ctx.ContextFlags = WOW64_CONTEXT_ALL;
pRtlWow64GetThreadContext( pi.hThread, &ctx );
- ok( ctx.Ecx == ecx, "cs64: ecx set to %08x\n", ctx.Ecx );
+ ok( ctx.Ecx == ecx, "cs64: ecx set to %08lx\n", ctx.Ecx );
ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED], cpu, cpu_size, &res );
- ok( ctx_ptr->Ecx == ecx, "cs64: ecx set to %08x\n", ctx_ptr->Ecx );
+ ok( ctx_ptr->Ecx == ecx, "cs64: ecx set to %08lx\n", ctx_ptr->Ecx );
ctx.Ecx = 0x22223333;
pRtlWow64SetThreadContext( pi.hThread, &ctx );
memset( &ctx, 0x55, sizeof(ctx) );
ctx.ContextFlags = WOW64_CONTEXT_ALL;
pRtlWow64GetThreadContext( pi.hThread, &ctx );
- ok( ctx.Ecx == 0x22223333, "cs64: ecx set to %08x\n", ctx.Ecx );
+ ok( ctx.Ecx == 0x22223333, "cs64: ecx set to %08lx\n", ctx.Ecx );
ReadProcessMemory( pi.hProcess, teb.TlsSlots[WOW64_TLS_CPURESERVED], cpu, cpu_size, &res );
- ok( ctx_ptr->Ecx == 0x22223333, "cs64: ecx set to %08x\n", ctx_ptr->Ecx );
+ ok( ctx_ptr->Ecx == 0x22223333, "cs64: ecx set to %08lx\n", ctx_ptr->Ecx );
memset( &context, 0x55, sizeof(context) );
context.ContextFlags = CONTEXT_ALL;
pNtGetContextThread( pi.hThread, &context );
@@ -4556,7 +4557,7 @@ static ULONG64 test_kiuserexceptiondispatcher_saved_r12;
static DWORD dbg_except_continue_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher)
{
- trace("handler context->Rip %#lx, codemem %p.\n", context->Rip, code_mem);
+ trace("handler context->Rip %#Ix, codemem %p.\n", context->Rip, code_mem);
got_exception = 1;
dbg_except_continue_handler_rip = (void *)context->Rip;
++context->Rip;
@@ -4573,16 +4574,16 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
EXCEPTION_RECORD *rec = e->ExceptionRecord;
CONTEXT *context = e->ContextRecord;
- trace("dbg_except_continue_vectored_handler, code %#x, Rip %#lx.\n", rec->ExceptionCode, context->Rip);
+ trace("dbg_except_continue_vectored_handler, code %#lx, Rip %#Ix.\n", rec->ExceptionCode, context->Rip);
if (rec->ExceptionCode == 0xceadbeef)
{
- ok(context->P1Home == (ULONG64)0xdeadbeeffeedcafe, "Got unexpected context->P1Home %#lx.\n", context->P1Home);
+ ok(context->P1Home == (ULONG64)0xdeadbeeffeedcafe, "Got unexpected context->P1Home %#Ix.\n", context->P1Home);
context->R12 = test_kiuserexceptiondispatcher_saved_r12;
return EXCEPTION_CONTINUE_EXECUTION;
}
- ok(rec->ExceptionCode == 0x80000003, "Got unexpected exception code %#x.\n", rec->ExceptionCode);
+ ok(rec->ExceptionCode == 0x80000003, "Got unexpected exception code %#lx.\n", rec->ExceptionCode);
got_exception = 1;
dbg_except_continue_handler_rip = (void *)context->Rip;
@@ -4599,13 +4600,13 @@ static LONG WINAPI dbg_except_continue_vectored_handler(struct _EXCEPTION_POINTE
static void WINAPI hook_KiUserExceptionDispatcher(EXCEPTION_RECORD *rec, CONTEXT *context)
{
trace("rec %p, context %p.\n", rec, context);
- trace("context->Rip %#lx, context->Rsp %#lx, ContextFlags %#lx.\n",
+ trace("context->Rip %#Ix, context->Rsp %#Ix, ContextFlags %#lx.\n",
context->Rip, context->Rsp, context->ContextFlags);
hook_called = TRUE;
/* Broken on Win2008, probably rec offset in stack is different. */
ok(rec->ExceptionCode == 0x80000003 || rec->ExceptionCode == 0xceadbeef || broken(!rec->ExceptionCode),
- "Got unexpected ExceptionCode %#x.\n", rec->ExceptionCode);
+ "Got unexpected ExceptionCode %#lx.\n", rec->ExceptionCode);
hook_KiUserExceptionDispatcher_rip = (void *)context->Rip;
hook_exception_address = rec->ExceptionAddress;
@@ -4691,7 +4692,7 @@ static void test_kiuserexceptiondispatcher(void)
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
PAGE_EXECUTE_READWRITE, &old_protect);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
memcpy(saved_KiUserExceptionDispatcher_bytes, pKiUserExceptionDispatcher,
sizeof(saved_KiUserExceptionDispatcher_bytes));
@@ -4712,7 +4713,7 @@ static void test_kiuserexceptiondispatcher(void)
ok(got_exception, "Handler was not called.\n");
ok(hook_called, "Hook was not called.\n");
- ok(test_kiuserexceptiondispatcher_regs.new_rax == 0xdeadbeef, "Got unexpected rax %#lx.\n",
+ ok(test_kiuserexceptiondispatcher_regs.new_rax == 0xdeadbeef, "Got unexpected rax %#Ix.\n",
test_kiuserexceptiondispatcher_regs.new_rax);
ok(test_kiuserexceptiondispatcher_regs.old_rsi
== test_kiuserexceptiondispatcher_regs.new_rsi, "rsi does not match.\n");
@@ -4781,7 +4782,7 @@ static void test_kiuserexceptiondispatcher(void)
ok(dbg_except_continue_handler_rip == bpt_address, "Got unexpected exception address %p, expected %p.\n",
dbg_except_continue_handler_rip, bpt_address);
- ok(test_kiuserexceptiondispatcher_regs.new_rax == 0xdeadbeef, "Got unexpected rax %#lx.\n",
+ ok(test_kiuserexceptiondispatcher_regs.new_rax == 0xdeadbeef, "Got unexpected rax %#Ix.\n",
test_kiuserexceptiondispatcher_regs.new_rax);
ok(test_kiuserexceptiondispatcher_regs.old_rsi
== test_kiuserexceptiondispatcher_regs.new_rsi, "rsi does not match.\n");
@@ -4816,14 +4817,14 @@ static void test_kiuserexceptiondispatcher(void)
}
else
{
- ok(pass == 3, "Got unexpected pass %d.\n", pass);
+ ok(pass == 3, "Got unexpected pass %ld.\n", pass);
}
ok(hook_called, "Hook was not called.\n");
RemoveVectoredExceptionHandler(vectored_handler);
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
old_protect, &old_protect);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
}
static BOOL got_nested_exception, got_prev_frame_exception;
@@ -4832,16 +4833,16 @@ static void *nested_exception_initial_frame;
static DWORD nested_exception_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher)
{
- trace("nested_exception_handler Rip %p, Rsp %p, code %#x, flags %#x, ExceptionAddress %p.\n",
+ trace("nested_exception_handler Rip %p, Rsp %p, code %#lx, flags %#lx, ExceptionAddress %p.\n",
(void *)context->Rip, (void *)context->Rsp, rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress);
if (rec->ExceptionCode == 0x80000003
&& !(rec->ExceptionFlags & EH_NESTED_CALL))
{
- ok(rec->NumberParameters == 1, "Got unexpected rec->NumberParameters %u.\n", rec->NumberParameters);
+ ok(rec->NumberParameters == 1, "Got unexpected rec->NumberParameters %lu.\n", rec->NumberParameters);
ok((void *)context->Rsp == frame, "Got unexpected frame %p.\n", frame);
ok(*(void **)frame == (char *)code_mem + 5, "Got unexpected *frame %p.\n", *(void **)frame);
- ok(context->Rip == (ULONG_PTR)((char *)code_mem + 7), "Got unexpected Rip %#lx.\n", context->Rip);
+ ok(context->Rip == (ULONG_PTR)((char *)code_mem + 7), "Got unexpected Rip %#Ix.\n", context->Rip);
nested_exception_initial_frame = frame;
RaiseException(0xdeadbeef, 0, 0, 0);
@@ -4851,15 +4852,15 @@ static DWORD nested_exception_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRAT
if (rec->ExceptionCode == 0xdeadbeef && rec->ExceptionFlags == EH_NESTED_CALL)
{
- ok(!rec->NumberParameters, "Got unexpected rec->NumberParameters %u.\n", rec->NumberParameters);
+ ok(!rec->NumberParameters, "Got unexpected rec->NumberParameters %lu.\n", rec->NumberParameters);
got_nested_exception = TRUE;
ok(frame == nested_exception_initial_frame, "Got unexpected frame %p.\n", frame);
return ExceptionContinueSearch;
}
ok(rec->ExceptionCode == 0xdeadbeef && !rec->ExceptionFlags,
- "Got unexpected exception code %#x, flags %#x.\n", rec->ExceptionCode, rec->ExceptionFlags);
- ok(!rec->NumberParameters, "Got unexpected rec->NumberParameters %u.\n", rec->NumberParameters);
+ "Got unexpected exception code %#lx, flags %#lx.\n", rec->ExceptionCode, rec->ExceptionFlags);
+ ok(!rec->NumberParameters, "Got unexpected rec->NumberParameters %lu.\n", rec->NumberParameters);
ok(frame == (void *)((BYTE *)nested_exception_initial_frame + 8),
"Got unexpected frame %p.\n", frame);
got_prev_frame_exception = TRUE;
@@ -4918,7 +4919,7 @@ static void test_unwind_from_apc(void)
{
test_unwind_apc_called = FALSE;
status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
SleepEx(0, TRUE);
ok(0, "Should not get here.\n");
}
@@ -4927,11 +4928,11 @@ static void test_unwind_from_apc(void)
ok(test_unwind_apc_called, "Test user APC was not called.\n");
test_unwind_apc_called = FALSE;
status = pNtQueueApcThread(GetCurrentThread(), test_unwind_apc, 0, 0, 0);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
NtContinue(&test_unwind_apc_context, TRUE );
ok(0, "Should not get here.\n");
}
- ok(pass == 4, "Got unexpected pass %d.\n", pass);
+ ok(pass == 4, "Got unexpected pass %ld.\n", pass);
ok(test_unwind_apc_called, "Test user APC was not called.\n");
}
@@ -4975,36 +4976,36 @@ static void test_syscall_clobbered_regs(void)
func = code_mem;
memset(®s, 0, sizeof(regs));
status = func((HANDLE)0xdeadbeef, NULL, ®s, pNtCancelTimer);
- ok(status == STATUS_INVALID_HANDLE, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Got unexpected status %#lx.\n", status);
/* After the syscall instruction rcx contains the address of the instruction next after syscall. */
ok((BYTE *)regs.rcx > (BYTE *)pNtCancelTimer && (BYTE *)regs.rcx < (BYTE *)pNtCancelTimer + 0x20,
"Got unexpected rcx %s, pNtCancelTimer %p.\n", wine_dbgstr_longlong(regs.rcx), pNtCancelTimer);
status = func((HANDLE)0xdeadbeef, (BOOLEAN *)0xdeadbeef, ®s, pNtCancelTimer);
- ok(status == STATUS_ACCESS_VIOLATION, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_ACCESS_VIOLATION, "Got unexpected status %#lx.\n", status);
ok((BYTE *)regs.rcx > (BYTE *)pNtCancelTimer && (BYTE *)regs.rcx < (BYTE *)pNtCancelTimer + 0x20,
"Got unexpected rcx %s, pNtCancelTimer %p.\n", wine_dbgstr_longlong(regs.rcx), pNtCancelTimer);
context.ContextFlags = CONTEXT_CONTROL;
status = func(GetCurrentThread(), &context, ®s, pNtGetContextThread);
- ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
ok((BYTE *)regs.rcx > (BYTE *)pNtGetContextThread && (BYTE *)regs.rcx < (BYTE *)pNtGetContextThread + 0x20,
"Got unexpected rcx %s, pNtGetContextThread %p.\n", wine_dbgstr_longlong(regs.rcx), pNtGetContextThread);
status = func(GetCurrentThread(), &context, ®s, pNtSetContextThread);
- ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
ok((BYTE *)regs.rcx > (BYTE *)pNtGetContextThread && (BYTE *)regs.rcx < (BYTE *)pNtGetContextThread + 0x20,
"Got unexpected rcx %s, pNtGetContextThread %p.\n", wine_dbgstr_longlong(regs.rcx), pNtGetContextThread);
context.ContextFlags = CONTEXT_INTEGER;
status = func(GetCurrentThread(), &context, ®s, pNtGetContextThread);
- ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
ok((BYTE *)regs.rcx > (BYTE *)pNtGetContextThread && (BYTE *)regs.rcx < (BYTE *)pNtGetContextThread + 0x20,
"Got unexpected rcx %s, pNtGetContextThread %p.\n", wine_dbgstr_longlong(regs.rcx), pNtGetContextThread);
status = func(GetCurrentThread(), &context, ®s, pNtSetContextThread);
- ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status);
ok((BYTE *)regs.rcx > (BYTE *)pNtSetContextThread && (BYTE *)regs.rcx < (BYTE *)pNtSetContextThread + 0x20,
"Got unexpected rcx %s, pNtSetContextThread %p.\n", wine_dbgstr_longlong(regs.rcx), pNtSetContextThread);
@@ -7944,13 +7945,13 @@ static DWORD WINAPI register_check_thread(void *arg)
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
status = pNtGetContextThread(GetCurrentThread(), &ctx);
- ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
- ok(!ctx.Dr0, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr0);
- ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1);
- ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2);
- ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3);
- ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
- ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
+ ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", status);
+ ok(!ctx.Dr0, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr0);
+ ok(!ctx.Dr1, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr1);
+ ok(!ctx.Dr2, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr2);
+ ok(!ctx.Dr3, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr3);
+ ok(!ctx.Dr6, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr6);
+ ok(!ctx.Dr7, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr7);
return 0;
}
@@ -7983,19 +7984,19 @@ static void test_debug_registers(void)
ctx.Dr7 = tests[i].dr7;
status = pNtSetContextThread(GetCurrentThread(), &ctx);
- ok(status == STATUS_SUCCESS, "NtSetContextThread failed with %08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetContextThread failed with %08lx\n", status);
memset(&ctx, 0, sizeof(ctx));
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
status = pNtGetContextThread(GetCurrentThread(), &ctx);
- ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %08x\n", status);
- ok(ctx.Dr0 == tests[i].dr0, "test %d: expected %lx, got %lx\n", i, tests[i].dr0, (DWORD_PTR)ctx.Dr0);
- ok(ctx.Dr1 == tests[i].dr1, "test %d: expected %lx, got %lx\n", i, tests[i].dr1, (DWORD_PTR)ctx.Dr1);
- ok(ctx.Dr2 == tests[i].dr2, "test %d: expected %lx, got %lx\n", i, tests[i].dr2, (DWORD_PTR)ctx.Dr2);
- ok(ctx.Dr3 == tests[i].dr3, "test %d: expected %lx, got %lx\n", i, tests[i].dr3, (DWORD_PTR)ctx.Dr3);
- ok((ctx.Dr6 & 0xf00f) == tests[i].dr6, "test %d: expected %lx, got %lx\n", i, tests[i].dr6, (DWORD_PTR)ctx.Dr6);
- ok((ctx.Dr7 & ~0xdc00) == tests[i].dr7, "test %d: expected %lx, got %lx\n", i, tests[i].dr7, (DWORD_PTR)ctx.Dr7);
+ ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %08lx\n", status);
+ ok(ctx.Dr0 == tests[i].dr0, "test %d: expected %Ix, got %Ix\n", i, tests[i].dr0, (DWORD_PTR)ctx.Dr0);
+ ok(ctx.Dr1 == tests[i].dr1, "test %d: expected %Ix, got %Ix\n", i, tests[i].dr1, (DWORD_PTR)ctx.Dr1);
+ ok(ctx.Dr2 == tests[i].dr2, "test %d: expected %Ix, got %Ix\n", i, tests[i].dr2, (DWORD_PTR)ctx.Dr2);
+ ok(ctx.Dr3 == tests[i].dr3, "test %d: expected %Ix, got %Ix\n", i, tests[i].dr3, (DWORD_PTR)ctx.Dr3);
+ ok((ctx.Dr6 & 0xf00f) == tests[i].dr6, "test %d: expected %Ix, got %Ix\n", i, tests[i].dr6, (DWORD_PTR)ctx.Dr6);
+ ok((ctx.Dr7 & ~0xdc00) == tests[i].dr7, "test %d: expected %Ix, got %Ix\n", i, tests[i].dr7, (DWORD_PTR)ctx.Dr7);
}
memset(&ctx, 0, sizeof(ctx));
@@ -8007,20 +8008,20 @@ static void test_debug_registers(void)
ctx.Dr6 = 0xffffffff;
ctx.Dr7 = 0x00000400;
status = pNtSetContextThread(GetCurrentThread(), &ctx);
- ok(status == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetContextThread failed with %lx\n", status);
thread = CreateThread(NULL, 0, register_check_thread, NULL, CREATE_SUSPENDED, NULL);
- ok(thread != INVALID_HANDLE_VALUE, "CreateThread failed with %d\n", GetLastError());
+ ok(thread != INVALID_HANDLE_VALUE, "CreateThread failed with %ld\n", GetLastError());
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
status = pNtGetContextThread(thread, &ctx);
- ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status);
- ok(!ctx.Dr0, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr0);
- ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1);
- ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2);
- ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3);
- ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6);
- ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7);
+ ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %lx\n", status);
+ ok(!ctx.Dr0, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr0);
+ ok(!ctx.Dr1, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr1);
+ ok(!ctx.Dr2, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr2);
+ ok(!ctx.Dr3, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr3);
+ ok(!ctx.Dr6, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr6);
+ ok(!ctx.Dr7, "expected 0, got %Ix\n", (DWORD_PTR)ctx.Dr7);
ResumeThread(thread);
WaitForSingleObject(thread, 10000);
@@ -8069,11 +8070,11 @@ static void test_debug_registers_wow64(void)
ok(bret, "GetThreadContext failed\n");
if (bret)
{
- ok(ctx.Dr0 == 0x12340000, "expected 0x12340000, got %lx\n", ctx.Dr0);
- ok(ctx.Dr1 == 0x12340001, "expected 0x12340001, got %lx\n", ctx.Dr1);
- ok(ctx.Dr2 == 0x12340002, "expected 0x12340002, got %lx\n", ctx.Dr2);
- ok(ctx.Dr3 == 0x12340003, "expected 0x12340003, got %lx\n", ctx.Dr3);
- ok(ctx.Dr7 == 0x155, "expected 0x155, got %lx\n", ctx.Dr7);
+ ok(ctx.Dr0 == 0x12340000, "expected 0x12340000, got %Ix\n", ctx.Dr0);
+ ok(ctx.Dr1 == 0x12340001, "expected 0x12340001, got %Ix\n", ctx.Dr1);
+ ok(ctx.Dr2 == 0x12340002, "expected 0x12340002, got %Ix\n", ctx.Dr2);
+ ok(ctx.Dr3 == 0x12340003, "expected 0x12340003, got %Ix\n", ctx.Dr3);
+ ok(ctx.Dr7 == 0x155, "expected 0x155, got %Ix\n", ctx.Dr7);
}
ZeroMemory(&wow64_ctx, sizeof(wow64_ctx));
@@ -8117,11 +8118,11 @@ static void test_debug_registers_wow64(void)
ok(bret, "GetThreadContext failed\n");
if (bret)
{
- ok(ctx.Dr0 == 0x56780000, "expected 0x56780000, got %lx\n", ctx.Dr0);
- ok(ctx.Dr1 == 0x56780001, "expected 0x56780001, got %lx\n", ctx.Dr1);
- ok(ctx.Dr2 == 0x56780002, "expected 0x56780002, got %lx\n", ctx.Dr2);
- ok(ctx.Dr3 == 0x56780003, "expected 0x56780003, got %lx\n", ctx.Dr3);
- ok(ctx.Dr7 == 0x101, "expected 0x101, got %lx\n", ctx.Dr7);
+ ok(ctx.Dr0 == 0x56780000, "expected 0x56780000, got %Ix\n", ctx.Dr0);
+ ok(ctx.Dr1 == 0x56780001, "expected 0x56780001, got %Ix\n", ctx.Dr1);
+ ok(ctx.Dr2 == 0x56780002, "expected 0x56780002, got %Ix\n", ctx.Dr2);
+ ok(ctx.Dr3 == 0x56780003, "expected 0x56780003, got %Ix\n", ctx.Dr3);
+ ok(ctx.Dr7 == 0x101, "expected 0x101, got %Ix\n", ctx.Dr7);
}
ResumeThread(pi.hThread);
@@ -8137,18 +8138,18 @@ static DWORD debug_service_exceptions;
static LONG CALLBACK debug_service_handler(EXCEPTION_POINTERS *ExceptionInfo)
{
EXCEPTION_RECORD *rec = ExceptionInfo->ExceptionRecord;
- trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
+ trace("vect. handler %08lx addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
- ok(rec->ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode is %08x instead of %08x\n",
+ ok(rec->ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode is %08lx instead of %08lx\n",
rec->ExceptionCode, EXCEPTION_BREAKPOINT);
#ifdef __i386__
ok(ExceptionInfo->ContextRecord->Eip == (DWORD)code_mem + 0x1c,
- "expected Eip = %x, got %x\n", (DWORD)code_mem + 0x1c, ExceptionInfo->ContextRecord->Eip);
+ "expected Eip = %lx, got %lx\n", (DWORD)code_mem + 0x1c, ExceptionInfo->ContextRecord->Eip);
ok(rec->NumberParameters == (is_wow64 ? 1 : 3),
- "ExceptionParameters is %d instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3);
+ "ExceptionParameters is %ld instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3);
ok(rec->ExceptionInformation[0] == ExceptionInfo->ContextRecord->Eax,
- "expected ExceptionInformation[0] = %x, got %lx\n",
+ "expected ExceptionInformation[0] = %lx, got %lx\n",
ExceptionInfo->ContextRecord->Eax, rec->ExceptionInformation[0]);
if (!is_wow64)
{
@@ -8159,11 +8160,11 @@ static LONG CALLBACK debug_service_handler(EXCEPTION_POINTERS *ExceptionInfo)
}
#else
ok(ExceptionInfo->ContextRecord->Rip == (DWORD_PTR)code_mem + 0x2f,
- "expected Rip = %lx, got %lx\n", (DWORD_PTR)code_mem + 0x2f, ExceptionInfo->ContextRecord->Rip);
+ "expected Rip = %Ix, got %Ix\n", (DWORD_PTR)code_mem + 0x2f, ExceptionInfo->ContextRecord->Rip);
ok(rec->NumberParameters == 1,
- "ExceptionParameters is %d instead of 1\n", rec->NumberParameters);
+ "ExceptionParameters is %ld instead of 1\n", rec->NumberParameters);
ok(rec->ExceptionInformation[0] == ExceptionInfo->ContextRecord->Rax,
- "expected ExceptionInformation[0] = %lx, got %lx\n",
+ "expected ExceptionInformation[0] = %Ix, got %Ix\n",
ExceptionInfo->ContextRecord->Rax, rec->ExceptionInformation[0]);
#endif
@@ -8242,28 +8243,28 @@ static void test_debug_service(DWORD numexc)
debug_service_exceptions = 0;
ret = func(0);
ok(debug_service_exceptions == expected_exc,
- "BREAKPOINT_BREAK generated %u exceptions, expected %u\n",
+ "BREAKPOINT_BREAK generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret,
- "BREAKPOINT_BREAK returned %u, expected %u\n", ret, expected_ret);
+ "BREAKPOINT_BREAK returned %lu, expected %lu\n", ret, expected_ret);
/* BREAKPOINT_PROMPT */
debug_service_exceptions = 0;
ret = func(2);
ok(debug_service_exceptions == expected_exc,
- "BREAKPOINT_PROMPT generated %u exceptions, expected %u\n",
+ "BREAKPOINT_PROMPT generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret,
- "BREAKPOINT_PROMPT returned %u, expected %u\n", ret, expected_ret);
+ "BREAKPOINT_PROMPT returned %lu, expected %lu\n", ret, expected_ret);
/* invalid debug service */
debug_service_exceptions = 0;
ret = func(6);
ok(debug_service_exceptions == expected_exc,
- "invalid debug service generated %u exceptions, expected %u\n",
+ "invalid debug service generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret,
- "invalid debug service returned %u, expected %u\n", ret, expected_ret);
+ "invalid debug service returned %lu, expected %lu\n", ret, expected_ret);
expected_exc = (is_wow64 ? numexc : 0);
expected_ret = (is_wow64 && numexc);
@@ -8272,37 +8273,37 @@ static void test_debug_service(DWORD numexc)
debug_service_exceptions = 0;
ret = func(1);
ok(debug_service_exceptions == expected_exc,
- "BREAKPOINT_PRINT generated %u exceptions, expected %u\n",
+ "BREAKPOINT_PRINT generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret,
- "BREAKPOINT_PRINT returned %u, expected %u\n", ret, expected_ret);
+ "BREAKPOINT_PRINT returned %lu, expected %lu\n", ret, expected_ret);
/* BREAKPOINT_LOAD_SYMBOLS */
debug_service_exceptions = 0;
ret = func(3);
ok(debug_service_exceptions == expected_exc,
- "BREAKPOINT_LOAD_SYMBOLS generated %u exceptions, expected %u\n",
+ "BREAKPOINT_LOAD_SYMBOLS generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret,
- "BREAKPOINT_LOAD_SYMBOLS returned %u, expected %u\n", ret, expected_ret);
+ "BREAKPOINT_LOAD_SYMBOLS returned %lu, expected %lu\n", ret, expected_ret);
/* BREAKPOINT_UNLOAD_SYMBOLS */
debug_service_exceptions = 0;
ret = func(4);
ok(debug_service_exceptions == expected_exc,
- "BREAKPOINT_UNLOAD_SYMBOLS generated %u exceptions, expected %u\n",
+ "BREAKPOINT_UNLOAD_SYMBOLS generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret,
- "BREAKPOINT_UNLOAD_SYMBOLS returned %u, expected %u\n", ret, expected_ret);
+ "BREAKPOINT_UNLOAD_SYMBOLS returned %lu, expected %lu\n", ret, expected_ret);
/* BREAKPOINT_COMMAND_STRING */
debug_service_exceptions = 0;
ret = func(5);
ok(debug_service_exceptions == expected_exc || broken(debug_service_exceptions == numexc),
- "BREAKPOINT_COMMAND_STRING generated %u exceptions, expected %u\n",
+ "BREAKPOINT_COMMAND_STRING generated %lu exceptions, expected %lu\n",
debug_service_exceptions, expected_exc);
ok(ret == expected_ret || broken(ret == (numexc != 0)),
- "BREAKPOINT_COMMAND_STRING returned %u, expected %u\n", ret, expected_ret);
+ "BREAKPOINT_COMMAND_STRING returned %lu, expected %lu\n", ret, expected_ret);
pRtlRemoveVectoredExceptionHandler(vectored_handler);
}
@@ -8313,12 +8314,12 @@ static DWORD outputdebugstring_exceptions;
static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo)
{
PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord;
- trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
+ trace("vect. handler %08lx addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
- ok(rec->ExceptionCode == DBG_PRINTEXCEPTION_C, "ExceptionCode is %08x instead of %08x\n",
+ ok(rec->ExceptionCode == DBG_PRINTEXCEPTION_C, "ExceptionCode is %08lx instead of %08lx\n",
rec->ExceptionCode, DBG_PRINTEXCEPTION_C);
- ok(rec->NumberParameters == 2, "ExceptionParameters is %d instead of 2\n", rec->NumberParameters);
- ok(rec->ExceptionInformation[0] == 12, "ExceptionInformation[0] = %d instead of 12\n", (DWORD)rec->ExceptionInformation[0]);
+ ok(rec->NumberParameters == 2, "ExceptionParameters is %ld instead of 2\n", rec->NumberParameters);
+ ok(rec->ExceptionInformation[0] == 12, "ExceptionInformation[0] = %ld instead of 12\n", (DWORD)rec->ExceptionInformation[0]);
ok(!strcmp((char *)rec->ExceptionInformation[1], "Hello World"),
"ExceptionInformation[1] = '%s' instead of 'Hello World'\n", (char *)rec->ExceptionInformation[1]);
@@ -8343,7 +8344,7 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
OutputDebugStringA("Hello World");
todo_wine_if(todo)
- ok(outputdebugstring_exceptions == numexc, "OutputDebugStringA generated %d exceptions, expected %d\n",
+ ok(outputdebugstring_exceptions == numexc, "OutputDebugStringA generated %ld exceptions, expected %ld\n",
outputdebugstring_exceptions, numexc);
pRtlRemoveVectoredExceptionHandler(vectored_handler);
@@ -8354,14 +8355,14 @@ static DWORD ripevent_exceptions;
static LONG CALLBACK ripevent_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo)
{
PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord;
- trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
+ trace("vect. handler %08lx addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
- ok(rec->ExceptionCode == DBG_RIPEXCEPTION, "ExceptionCode is %08x instead of %08x\n",
+ ok(rec->ExceptionCode == DBG_RIPEXCEPTION, "ExceptionCode is %08lx instead of %08lx\n",
rec->ExceptionCode, DBG_RIPEXCEPTION);
- ok(rec->NumberParameters == 2, "ExceptionParameters is %d instead of 2\n", rec->NumberParameters);
- ok(rec->ExceptionInformation[0] == 0x11223344, "ExceptionInformation[0] = %08x instead of %08x\n",
+ ok(rec->NumberParameters == 2, "ExceptionParameters is %ld instead of 2\n", rec->NumberParameters);
+ ok(rec->ExceptionInformation[0] == 0x11223344, "ExceptionInformation[0] = %08lx instead of %08x\n",
(NTSTATUS)rec->ExceptionInformation[0], 0x11223344);
- ok(rec->ExceptionInformation[1] == 0x55667788, "ExceptionInformation[1] = %08x instead of %08x\n",
+ ok(rec->ExceptionInformation[1] == 0x55667788, "ExceptionInformation[1] = %08lx instead of %08x\n",
(NTSTATUS)rec->ExceptionInformation[1], 0x55667788);
ripevent_exceptions++;
@@ -8392,7 +8393,7 @@ static void test_ripevent(DWORD numexc)
ripevent_exceptions = 0;
pRtlRaiseException(&record);
- ok(ripevent_exceptions == numexc, "RtlRaiseException generated %d exceptions, expected %d\n",
+ ok(ripevent_exceptions == numexc, "RtlRaiseException generated %ld exceptions, expected %ld\n",
ripevent_exceptions, numexc);
pRtlRemoveVectoredExceptionHandler(vectored_handler);
@@ -8403,26 +8404,26 @@ static DWORD breakpoint_exceptions;
static LONG CALLBACK breakpoint_handler(EXCEPTION_POINTERS *ExceptionInfo)
{
EXCEPTION_RECORD *rec = ExceptionInfo->ExceptionRecord;
- trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
+ trace("vect. handler %08lx addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
- ok(rec->ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode is %08x instead of %08x\n",
+ ok(rec->ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode is %08lx instead of %08lx\n",
rec->ExceptionCode, EXCEPTION_BREAKPOINT);
#ifdef __i386__
ok(ExceptionInfo->ContextRecord->Eip == (DWORD)code_mem + 1,
- "expected Eip = %x, got %x\n", (DWORD)code_mem + 1, ExceptionInfo->ContextRecord->Eip);
+ "expected Eip = %lx, got %lx\n", (DWORD)code_mem + 1, ExceptionInfo->ContextRecord->Eip);
ok(rec->NumberParameters == (is_wow64 ? 1 : 3),
- "ExceptionParameters is %d instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3);
+ "ExceptionParameters is %ld instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3);
ok(rec->ExceptionInformation[0] == 0,
"got ExceptionInformation[0] = %lx\n", rec->ExceptionInformation[0]);
ExceptionInfo->ContextRecord->Eip = (DWORD)code_mem + 2;
#elif defined(__x86_64__)
ok(ExceptionInfo->ContextRecord->Rip == (DWORD_PTR)code_mem + 1,
- "expected Rip = %lx, got %lx\n", (DWORD_PTR)code_mem + 1, ExceptionInfo->ContextRecord->Rip);
+ "expected Rip = %Ix, got %Ix\n", (DWORD_PTR)code_mem + 1, ExceptionInfo->ContextRecord->Rip);
ok(rec->NumberParameters == 1,
- "ExceptionParameters is %d instead of 1\n", rec->NumberParameters);
+ "ExceptionParameters is %ld instead of 1\n", rec->NumberParameters);
ok(rec->ExceptionInformation[0] == 0,
- "got ExceptionInformation[0] = %lx\n", rec->ExceptionInformation[0]);
+ "got ExceptionInformation[0] = %Ix\n", rec->ExceptionInformation[0]);
ExceptionInfo->ContextRecord->Rip = (DWORD_PTR)code_mem + 2;
#elif defined(__arm__)
ok(ExceptionInfo->ContextRecord->Pc == (DWORD)code_mem + 1,
@@ -8468,7 +8469,7 @@ static void test_breakpoint(DWORD numexc)
breakpoint_exceptions = 0;
func();
- ok(breakpoint_exceptions == numexc, "int $0x3 generated %u exceptions, expected %u\n",
+ ok(breakpoint_exceptions == numexc, "int $0x3 generated %lu exceptions, expected %lu\n",
breakpoint_exceptions, numexc);
pRtlRemoveVectoredExceptionHandler(vectored_handler);
@@ -8565,11 +8566,11 @@ static DWORD invalid_handle_exceptions;
static LONG CALLBACK invalid_handle_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo)
{
PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord;
- trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
+ trace("vect. handler %08lx addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress);
- ok(rec->ExceptionCode == EXCEPTION_INVALID_HANDLE, "ExceptionCode is %08x instead of %08x\n",
+ ok(rec->ExceptionCode == EXCEPTION_INVALID_HANDLE, "ExceptionCode is %08lx instead of %08lx\n",
rec->ExceptionCode, EXCEPTION_INVALID_HANDLE);
- ok(rec->NumberParameters == 0, "ExceptionParameters is %d instead of 0\n", rec->NumberParameters);
+ ok(rec->NumberParameters == 0, "ExceptionParameters is %ld instead of 0\n", rec->NumberParameters);
invalid_handle_exceptions++;
return (rec->ExceptionCode == EXCEPTION_INVALID_HANDLE) ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_CONTINUE_SEARCH;
@@ -8590,12 +8591,12 @@ static void test_closehandle(DWORD numexc, HANDLE handle)
invalid_handle_exceptions = 0;
CloseHandle(handle);
- ok(invalid_handle_exceptions == numexc, "CloseHandle generated %d exceptions, expected %d\n",
+ ok(invalid_handle_exceptions == numexc, "CloseHandle generated %ld exceptions, expected %ld\n",
invalid_handle_exceptions, numexc);
invalid_handle_exceptions = 0;
pNtClose(handle);
- ok(invalid_handle_exceptions == numexc, "NtClose generated %d exceptions, expected %d\n",
+ ok(invalid_handle_exceptions == numexc, "NtClose generated %ld exceptions, expected %ld\n",
invalid_handle_exceptions, numexc);
pRtlRemoveVectoredExceptionHandler(vectored_handler);
@@ -8671,26 +8672,26 @@ static void test_user_apc(void)
test_apc_called = FALSE;
status = pNtQueueApcThread(GetCurrentThread(), test_apc, 0, 0, 0);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
SleepEx(0, TRUE);
ok(test_apc_called, "Test user APC was not called.\n");
test_apc_called = FALSE;
status = pNtQueueApcThread(GetCurrentThread(), test_apc, 0, 0, 0);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
status = NtContinue(&c[0], TRUE );
/* Broken before Win7, in that case NtContinue returns here instead of restoring context after calling APC. */
- ok(broken(TRUE), "Should not get here, status %#x.\n", status);
+ ok(broken(TRUE), "Should not get here, status %#lx.\n", status);
return;
}
- ok(pass == 3, "Got unexpected pass %d.\n", pass);
+ ok(pass == 3, "Got unexpected pass %ld.\n", pass);
ok(test_apc_called, "Test user APC was not called.\n");
}
static void test_user_callback(void)
{
NTSTATUS status = pNtCallbackReturn( NULL, 0, STATUS_SUCCESS );
- ok( status == STATUS_NO_CALLBACK_ACTIVE, "failed %x\n", status );
+ ok( status == STATUS_NO_CALLBACK_ACTIVE, "failed %lx\n", status );
}
static DWORD WINAPI suspend_thread_test( void *arg )
@@ -8718,8 +8719,8 @@ static void test_suspend_count(HANDLE hthread, ULONG expected_count, int line)
return;
}
- ok_(__FILE__, line)(!status, "Failed to get suspend count, status %#x.\n", status);
- ok_(__FILE__, line)(count == expected_count, "Unexpected suspend count %u.\n", count);
+ ok_(__FILE__, line)(!status, "Failed to get suspend count, status %#lx.\n", status);
+ ok_(__FILE__, line)(count == expected_count, "Unexpected suspend count %lu.\n", count);
}
static void test_suspend_thread(void)
@@ -8731,10 +8732,10 @@ static void test_suspend_thread(void)
DWORD ret;
status = NtSuspendThread(0, NULL);
- ok(status == STATUS_INVALID_HANDLE, "Unexpected return value %#x.\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Unexpected return value %#lx.\n", status);
status = NtResumeThread(0, NULL);
- ok(status == STATUS_INVALID_HANDLE, "Unexpected return value %#x.\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Unexpected return value %#lx.\n", status);
event = CreateEventW(NULL, FALSE, FALSE, NULL);
@@ -8742,61 +8743,61 @@ static void test_suspend_thread(void)
ok(thread != NULL, "Failed to create a thread.\n");
ret = WaitForSingleObject(thread, 0);
- ok(ret == WAIT_TIMEOUT, "Unexpected status %d.\n", ret);
+ ok(ret == WAIT_TIMEOUT, "Unexpected status %ld.\n", ret);
status = pNtQueryInformationThread(thread, ThreadSuspendCount, &count, sizeof(count), NULL);
if (!status)
{
status = pNtQueryInformationThread(thread, ThreadSuspendCount, NULL, sizeof(count), NULL);
- ok(status == STATUS_ACCESS_VIOLATION, "Unexpected status %#x.\n", status);
+ ok(status == STATUS_ACCESS_VIOLATION, "Unexpected status %#lx.\n", status);
status = pNtQueryInformationThread(thread, ThreadSuspendCount, &count, sizeof(count) / 2, NULL);
- ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#x.\n", status);
+ ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#lx.\n", status);
len = 123;
status = pNtQueryInformationThread(thread, ThreadSuspendCount, &count, sizeof(count) / 2, &len);
- ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#x.\n", status);
- ok(len == 123, "Unexpected info length %u.\n", len);
+ ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#lx.\n", status);
+ ok(len == 123, "Unexpected info length %lu.\n", len);
len = 123;
status = pNtQueryInformationThread(thread, ThreadSuspendCount, NULL, 0, &len);
- ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#x.\n", status);
- ok(len == 123, "Unexpected info length %u.\n", len);
+ ok(status == STATUS_INFO_LENGTH_MISMATCH, "Unexpected status %#lx.\n", status);
+ ok(len == 123, "Unexpected info length %lu.\n", len);
count = 10;
status = pNtQueryInformationThread(0, ThreadSuspendCount, &count, sizeof(count), NULL);
- ok(status, "Unexpected status %#x.\n", status);
- ok(count == 10, "Unexpected suspend count %u.\n", count);
+ ok(status, "Unexpected status %#lx.\n", status);
+ ok(count == 10, "Unexpected suspend count %lu.\n", count);
}
status = NtResumeThread(thread, NULL);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(!status, "Unexpected status %#lx.\n", status);
status = NtResumeThread(thread, &count);
- ok(!status, "Unexpected status %#x.\n", status);
- ok(count == 0, "Unexpected suspended count %u.\n", count);
+ ok(!status, "Unexpected status %#lx.\n", status);
+ ok(count == 0, "Unexpected suspended count %lu.\n", count);
TEST_SUSPEND_COUNT(thread, 0);
status = NtSuspendThread(thread, NULL);
- ok(!status, "Failed to suspend a thread, status %#x.\n", status);
+ ok(!status, "Failed to suspend a thread, status %#lx.\n", status);
TEST_SUSPEND_COUNT(thread, 1);
status = NtSuspendThread(thread, &count);
- ok(!status, "Failed to suspend a thread, status %#x.\n", status);
- ok(count == 1, "Unexpected suspended count %u.\n", count);
+ ok(!status, "Failed to suspend a thread, status %#lx.\n", status);
+ ok(count == 1, "Unexpected suspended count %lu.\n", count);
TEST_SUSPEND_COUNT(thread, 2);
status = NtResumeThread(thread, &count);
- ok(!status, "Failed to resume a thread, status %#x.\n", status);
- ok(count == 2, "Unexpected suspended count %u.\n", count);
+ ok(!status, "Failed to resume a thread, status %#lx.\n", status);
+ ok(count == 2, "Unexpected suspended count %lu.\n", count);
TEST_SUSPEND_COUNT(thread, 1);
status = NtResumeThread(thread, NULL);
- ok(!status, "Failed to resume a thread, status %#x.\n", status);
+ ok(!status, "Failed to resume a thread, status %#lx.\n", status);
TEST_SUSPEND_COUNT(thread, 0);
@@ -8832,7 +8833,7 @@ static void suspend_process_proc(void)
/* Suspend up to limit. */
while (!(status = NtSuspendThread(thread, NULL)))
;
- ok(status == STATUS_SUSPEND_COUNT_EXCEEDED, "Unexpected status %#x.\n", status);
+ ok(status == STATUS_SUSPEND_COUNT_EXCEEDED, "Unexpected status %#lx.\n", status);
for (;;)
{
@@ -8842,11 +8843,11 @@ static void suspend_process_proc(void)
}
status = NtSuspendThread(thread, &count);
- ok(!status, "Failed to suspend a thread, status %#x.\n", status);
- ok(count == 125, "Unexpected suspend count %u.\n", count);
+ ok(!status, "Failed to suspend a thread, status %#lx.\n", status);
+ ok(count == 125, "Unexpected suspend count %lu.\n", count);
status = NtResumeThread(thread, NULL);
- ok(!status, "Failed to resume a thread, status %#x.\n", status);
+ ok(!status, "Failed to resume a thread, status %#lx.\n", status);
CloseHandle(event);
CloseHandle(event2);
@@ -8879,50 +8880,50 @@ static void test_suspend_process(void)
/* New process signals this event. */
ResetEvent(event2);
ret = WaitForSingleObject(event2, INFINITE);
- ok(ret == WAIT_OBJECT_0, "Wait failed, %#x.\n", ret);
+ ok(ret == WAIT_OBJECT_0, "Wait failed, %#lx.\n", ret);
/* Suspend main thread */
status = NtSuspendThread(info.hThread, &ret);
- ok(!status && !ret, "Failed to suspend main thread, status %#x.\n", status);
+ ok(!status && !ret, "Failed to suspend main thread, status %#lx.\n", status);
/* Process wasn't suspended yet. */
status = pNtResumeProcess(info.hProcess);
- ok(!status, "Failed to resume a process, status %#x.\n", status);
+ ok(!status, "Failed to resume a process, status %#lx.\n", status);
status = pNtSuspendProcess(0);
- ok(status == STATUS_INVALID_HANDLE, "Unexpected status %#x.\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Unexpected status %#lx.\n", status);
status = pNtResumeProcess(info.hProcess);
- ok(!status, "Failed to resume a process, status %#x.\n", status);
+ ok(!status, "Failed to resume a process, status %#lx.\n", status);
ResetEvent(event2);
ret = WaitForSingleObject(event2, 200);
ok(ret == WAIT_OBJECT_0, "Wait failed.\n");
status = pNtSuspendProcess(info.hProcess);
- ok(!status, "Failed to suspend a process, status %#x.\n", status);
+ ok(!status, "Failed to suspend a process, status %#lx.\n", status);
status = NtSuspendThread(info.hThread, &ret);
- ok(!status && ret == 1, "Failed to suspend main thread, status %#x.\n", status);
+ ok(!status && ret == 1, "Failed to suspend main thread, status %#lx.\n", status);
status = NtResumeThread(info.hThread, &ret);
- ok(!status && ret == 2, "Failed to resume main thread, status %#x.\n", status);
+ ok(!status && ret == 2, "Failed to resume main thread, status %#lx.\n", status);
ResetEvent(event2);
ret = WaitForSingleObject(event2, 200);
ok(ret == WAIT_TIMEOUT, "Wait failed.\n");
status = pNtSuspendProcess(info.hProcess);
- ok(!status, "Failed to suspend a process, status %#x.\n", status);
+ ok(!status, "Failed to suspend a process, status %#lx.\n", status);
status = pNtResumeProcess(info.hProcess);
- ok(!status, "Failed to resume a process, status %#x.\n", status);
+ ok(!status, "Failed to resume a process, status %#lx.\n", status);
ResetEvent(event2);
ret = WaitForSingleObject(event2, 200);
ok(ret == WAIT_TIMEOUT, "Wait failed.\n");
status = pNtResumeProcess(info.hProcess);
- ok(!status, "Failed to resume a process, status %#x.\n", status);
+ ok(!status, "Failed to resume a process, status %#lx.\n", status);
ResetEvent(event2);
ret = WaitForSingleObject(event2, 1000);
@@ -8954,7 +8955,7 @@ static void test_unload_trace(void)
{
pRtlGetUnloadEventTraceEx(&element_size, &element_count, (void **)&unload_trace_ex);
ok(*element_size >= sizeof(*ptr), "Unexpected element size.\n");
- ok(*element_count == RTL_UNLOAD_EVENT_TRACE_NUMBER, "Unexpected trace element count %u.\n", *element_count);
+ ok(*element_count == RTL_UNLOAD_EVENT_TRACE_NUMBER, "Unexpected trace element count %lu.\n", *element_count);
ok(unload_trace_ex != NULL, "Unexpected pointer %p.\n", unload_trace_ex);
size = *element_size;
}
@@ -9014,7 +9015,7 @@ static DWORD test_extended_context_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGI
XSTATE *xs;
ok((context->ContextFlags & (CONTEXT_FULL | CONTEXT_XSTATE)) == (CONTEXT_FULL | CONTEXT_XSTATE),
- "Got unexpected ContextFlags %#x.\n", context->ContextFlags);
+ "Got unexpected ContextFlags %#lx.\n", context->ContextFlags);
if ((context->ContextFlags & (CONTEXT_FULL | CONTEXT_XSTATE)) != (CONTEXT_FULL | CONTEXT_XSTATE))
goto done;
@@ -9024,20 +9025,20 @@ static DWORD test_extended_context_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGI
/* Unwind contexts do not inherit xstate information. */
DISPATCHER_CONTEXT *dispatch = (DISPATCHER_CONTEXT *)dispatcher;
- ok(!(dispatch->ContextRecord->ContextFlags & 0x40), "Got unexpected ContextRecord->ContextFlags %#x.\n",
+ ok(!(dispatch->ContextRecord->ContextFlags & 0x40), "Got unexpected ContextRecord->ContextFlags %#lx.\n",
dispatch->ContextRecord->ContextFlags);
}
#endif
- ok(xctx->Legacy.Offset == -(int)(sizeof(CONTEXT)), "Got unexpected Legacy.Offset %d.\n", xctx->Legacy.Offset);
- ok(xctx->Legacy.Length == sizeof(CONTEXT), "Got unexpected Legacy.Length %d.\n", xctx->Legacy.Length);
- ok(xctx->All.Offset == -(int)sizeof(CONTEXT), "Got unexpected All.Offset %d.\n", xctx->All.Offset);
+ ok(xctx->Legacy.Offset == -(int)(sizeof(CONTEXT)), "Got unexpected Legacy.Offset %ld.\n", xctx->Legacy.Offset);
+ ok(xctx->Legacy.Length == sizeof(CONTEXT), "Got unexpected Legacy.Length %ld.\n", xctx->Legacy.Length);
+ ok(xctx->All.Offset == -(int)sizeof(CONTEXT), "Got unexpected All.Offset %ld.\n", xctx->All.Offset);
ok(xctx->All.Length == sizeof(CONTEXT) + xctx->XState.Offset + xctx->XState.Length,
- "Got unexpected All.Offset %d.\n", xctx->All.Offset);
+ "Got unexpected All.Offset %ld.\n", xctx->All.Offset);
expected_min_offset = sizeof(void *) == 8 ? sizeof(CONTEXT_EX) + sizeof(EXCEPTION_RECORD) : sizeof(CONTEXT_EX);
ok(xctx->XState.Offset >= expected_min_offset,
- "Got unexpected XState.Offset %d.\n", xctx->XState.Offset);
- ok(xctx->XState.Length >= sizeof(XSTATE), "Got unexpected XState.Length %d.\n", xctx->XState.Length);
+ "Got unexpected XState.Offset %ld.\n", xctx->XState.Offset);
+ ok(xctx->XState.Length >= sizeof(XSTATE), "Got unexpected XState.Length %ld.\n", xctx->XState.Length);
xs = (XSTATE *)((char *)xctx + xctx->XState.Offset);
context_ymm_data = (unsigned int *)&xs->YmmContext;
@@ -9233,7 +9234,7 @@ static void wait_for_thread_next_suspend(HANDLE thread)
DWORD result;
result = ResumeThread(thread);
- ok(result == 1, "Got unexpexted suspend count %u.\n", result);
+ ok(result == 1, "Got unexpexted suspend count %lu.\n", result);
/* NtQueryInformationThread(ThreadSuspendCount, ...) is not supported on older Windows. */
while (!(result = SuspendThread(thread)))
@@ -9241,9 +9242,9 @@ static void wait_for_thread_next_suspend(HANDLE thread)
ResumeThread(thread);
Sleep(1);
}
- ok(result == 1, "Got unexpexted suspend count %u.\n", result);
+ ok(result == 1, "Got unexpexted suspend count %lu.\n", result);
result = ResumeThread(thread);
- ok(result == 2, "Got unexpexted suspend count %u.\n", result);
+ ok(result == 2, "Got unexpexted suspend count %lu.\n", result);
}
#define CONTEXT_NATIVE (CONTEXT_XSTATE & CONTEXT_CONTROL)
@@ -9350,7 +9351,7 @@ static void test_extended_context(void)
/* Test context manipulation functions. */
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength(0, &length);
- ok(ret == STATUS_INVALID_PARAMETER && length == 0xdeadbeef, "Got unexpected result ret %#x, length %#x.\n",
+ ok(ret == STATUS_INVALID_PARAMETER && length == 0xdeadbeef, "Got unexpected result ret %#lx, length %#lx.\n",
ret, length);
for (test = 0; test < ARRAY_SIZE(context_arch); ++test)
@@ -9362,7 +9363,7 @@ static void test_extended_context(void)
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength(context_arch[test].flag, &length);
- ok(!ret && length == expected_length, "Got unexpected result ret %#x, length %#x.\n",
+ ok(!ret && length == expected_length, "Got unexpected result ret %#lx, length %#lx.\n",
ret, length);
for (i = 0; i < 32; ++i)
@@ -9379,20 +9380,20 @@ static void test_extended_context(void)
ok((!ret && length == expected_length)
|| broken((context_arch[test].broken_flags & (1 << i))
&& ret == STATUS_INVALID_PARAMETER && length == 0xdeadbeef),
- "Got unexpected result ret %#x, length %#x, flags 0x%08x.\n",
+ "Got unexpected result ret %#lx, length %#lx, flags 0x%08lx.\n",
ret, length, flags);
}
else
{
ok(ret == STATUS_INVALID_PARAMETER && length == 0xdeadbeef,
- "Got unexpected result ret %#x, length %#x, flags 0x%08x.\n", ret, length, flags);
+ "Got unexpected result ret %#lx, length %#lx, flags 0x%08lx.\n", ret, length, flags);
}
SetLastError(0xdeadbeef);
bret = pInitializeContext(NULL, flags, NULL, &length2);
ok(!bret && length2 == length && GetLastError()
== (!ret ? ERROR_INSUFFICIENT_BUFFER : ERROR_INVALID_PARAMETER),
- "Got unexpected bret %#x, length2 %#x, GetLastError() %u, flags %#x.\n",
+ "Got unexpected bret %#x, length2 %#lx, GetLastError() %lu, flags %#lx.\n",
bret, length2, GetLastError(), flags);
if (GetLastError() == ERROR_INVALID_PARAMETER)
@@ -9403,7 +9404,7 @@ static void test_extended_context(void)
length2 = expected_length - 1;
bret = pInitializeContext(context_buffer, flags, &context, &length2);
ok(!bret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
ok(context == (void *)0xdeadbeef, "Got unexpected context %p.\n", context);
SetLastError(0xdeadbeef);
@@ -9411,30 +9412,30 @@ static void test_extended_context(void)
length2 = expected_length;
bret = pInitializeContext(context_buffer, flags, &context, &length2);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
- ok(length2 == expected_length, "Got unexpexted length %#x.\n", length);
- ok((BYTE *)context == context_buffer, "Got unexpected context %p, flags %#x.\n", context, flags);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
+ ok(length2 == expected_length, "Got unexpexted length %#lx.\n", length);
+ ok((BYTE *)context == context_buffer, "Got unexpected context %p, flags %#lx.\n", context, flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == flags, "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ ok(context_flags == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
context_ex = (CONTEXT_EX *)(context_buffer + context_arch[test].context_length);
ok(context_ex->Legacy.Offset == -(int)context_arch[test].context_length,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->Legacy.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->Legacy.Offset, flags);
ok(context_ex->Legacy.Length == ((flags & 0x20) ? context_arch[test].context_length
: context_arch[test].legacy_length),
- "Got unexpected Length %#x, flags %#x.\n", context_ex->Legacy.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->Legacy.Length, flags);
ok(context_ex->All.Offset == -(int)context_arch[test].context_length,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->All.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->All.Offset, flags);
/* No extra 8 bytes in x64 CONTEXT_EX here. */
ok(context_ex->All.Length == context_arch[test].context_length + context_arch[1].context_ex_length,
- "Got unexpected Length %#x, flags %#x.\n", context_ex->All.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->All.Length, flags);
ok(context_ex->XState.Offset == 25,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->XState.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->XState.Offset, flags);
ok(!context_ex->XState.Length,
- "Got unexpected Length %#x, flags %#x.\n", context_ex->XState.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->XState.Length, flags);
if (0)
{
@@ -9442,11 +9443,11 @@ static void test_extended_context(void)
pRtlLocateLegacyContext(NULL, NULL);
}
p = pRtlLocateLegacyContext(context_ex, NULL);
- ok(p == context, "Got unexpected p %p, flags %#x.\n", p, flags);
+ ok(p == context, "Got unexpected p %p, flags %#lx.\n", p, flags);
length2 = 0xdeadbeef;
p = pRtlLocateLegacyContext(context_ex, &length2);
ok(p == context && length2 == context_ex->Legacy.Length,
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = expected_length;
if (0)
@@ -9464,34 +9465,34 @@ static void test_extended_context(void)
SetLastError(0xdeadbeef);
if (flags & CONTEXT_NATIVE)
ok(bret && mask == ((flags & flags_fpx) == flags_fpx ? 0x3 : 0),
- "Got unexpected bret %#x, mask %s, flags %#x.\n", bret, wine_dbgstr_longlong(mask), flags);
+ "Got unexpected bret %#x, mask %s, flags %#lx.\n", bret, wine_dbgstr_longlong(mask), flags);
else
ok(!bret && mask == 0xdeadbeef && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, mask %s, GetLastError() %#x, flags %#x.\n",
+ "Got unexpected bret %#x, mask %s, GetLastError() %#lx, flags %#lx.\n",
bret, wine_dbgstr_longlong(mask), GetLastError(), flags);
bret = pSetXStateFeaturesMask(context, 0);
- ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x, flags %#x.\n", bret, flags);
+ ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x, flags %#lx.\n", bret, flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == flags, "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ ok(context_flags == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
bret = pSetXStateFeaturesMask(context, 1);
- ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x, flags %#x.\n", bret, flags);
+ ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x, flags %#lx.\n", bret, flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
ok(context_flags == (bret ? flags_fpx : flags),
- "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
bret = pSetXStateFeaturesMask(context, 2);
- ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x, flags %#x.\n", bret, flags);
+ ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x, flags %#lx.\n", bret, flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
ok(context_flags == (bret ? flags_fpx : flags),
- "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
bret = pSetXStateFeaturesMask(context, 4);
ok(!bret, "Got unexpected bret %#x.\n", bret);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
ok(context_flags == (flags & CONTEXT_NATIVE ? flags_fpx : flags),
- "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
*(DWORD *)(context_buffer + context_arch[test].flags_offset) = flags;
for (j = 0; j < context_arch[test].flags_offset; ++j)
@@ -9523,49 +9524,49 @@ static void test_extended_context(void)
memset(context_buffer2, 0xcc, sizeof(context_buffer2));
ret2 = pRtlInitializeExtendedContext(context_buffer2, flags, &context_ex);
- ok(!ret2, "Got unexpected ret2 %#x, flags %#x.\n", ret2, flags);
+ ok(!ret2, "Got unexpected ret2 %#lx, flags %#lx.\n", ret2, flags);
ok(!memcmp(context_buffer2, context_buffer, sizeof(context_buffer2)),
- "Context data do not match, flags %#x.\n", flags);
+ "Context data do not match, flags %#lx.\n", flags);
memset(context_buffer2, 0xcc, sizeof(context_buffer2));
ret2 = pRtlInitializeExtendedContext(context_buffer2 + 2, flags, &context_ex);
- ok(!ret2, "Got unexpected ret2 %#x, flags %#x.\n", ret2, flags);
+ ok(!ret2, "Got unexpected ret2 %#lx, flags %#lx.\n", ret2, flags);
/* Buffer gets aligned to 16 bytes on x64, while returned context length suggests it should be 8. */
align = test ? 4 : 16;
ok(!memcmp(context_buffer2 + align, context_buffer,
sizeof(context_buffer2) - align),
- "Context data do not match, flags %#x.\n", flags);
+ "Context data do not match, flags %#lx.\n", flags);
SetLastError(0xdeadbeef);
memset(context_buffer2, 0xcc, sizeof(context_buffer2));
bret = pInitializeContext(context_buffer2 + 2, flags, &context, &length2);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
- ok(length2 == expected_length, "Got unexpexted length %#x.\n", length);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
+ ok(length2 == expected_length, "Got unexpexted length %#lx.\n", length);
ok(!memcmp(context_buffer2 + align, context_buffer,
sizeof(context_buffer2) - align),
- "Context data do not match, flags %#x.\n", flags);
+ "Context data do not match, flags %#lx.\n", flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 0, &length2);
if (flags & CONTEXT_NATIVE)
ok(p == (BYTE *)context + context_arch[test].xsavearea_offset
&& length2 == offsetof(XSAVE_FORMAT, XmmRegisters),
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 1, &length2);
if (flags & CONTEXT_NATIVE)
ok(p == (BYTE *)context + context_arch[test].xsavearea_offset + offsetof(XSAVE_FORMAT, XmmRegisters)
&& length2 == sizeof(M128A) * context_arch[test].vector_reg_count,
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 2, &length2);
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
if (!pRtlInitializeExtendedContext2 || !pInitializeContext2)
{
@@ -9579,28 +9580,28 @@ static void test_extended_context(void)
length2 = expected_length;
memset(context_buffer2, 0xcc, sizeof(context_buffer2));
ret2 = pRtlInitializeExtendedContext2(context_buffer2 + 2, flags, &context_ex, ~(ULONG64)0);
- ok(!ret2, "Got unexpected ret2 %#x, flags %#x.\n", ret2, flags);
+ ok(!ret2, "Got unexpected ret2 %#lx, flags %#lx.\n", ret2, flags);
ok(!memcmp(context_buffer2 + align, context_buffer,
sizeof(context_buffer2) - align),
- "Context data do not match, flags %#x.\n", flags);
+ "Context data do not match, flags %#lx.\n", flags);
memset(context_buffer2, 0xcc, sizeof(context_buffer2));
bret = pInitializeContext2(context_buffer2 + 2, flags, &context, &length2, 0);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
- ok(length2 == expected_length, "Got unexpexted length %#x.\n", length);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
+ ok(length2 == expected_length, "Got unexpexted length %#lx.\n", length);
ok(!memcmp(context_buffer2 + align, context_buffer,
sizeof(context_buffer2) - align),
- "Context data do not match, flags %#x.\n", flags);
+ "Context data do not match, flags %#lx.\n", flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 0, &length2);
if (flags & CONTEXT_NATIVE)
ok(p == (BYTE *)context + context_arch[test].xsavearea_offset
&& length2 == offsetof(XSAVE_FORMAT, XmmRegisters),
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
}
flags = context_arch[test].flag | 0x40;
@@ -9612,19 +9613,19 @@ static void test_extended_context(void)
if (!enabled_features)
{
ok(ret == STATUS_NOT_SUPPORTED && length == 0xdeadbeef,
- "Got unexpected result ret %#x, length %#x.\n", ret, length);
+ "Got unexpected result ret %#lx, length %#lx.\n", ret, length);
context_ex = (void *)0xdeadbeef;
ret2 = pRtlInitializeExtendedContext(context_buffer, flags, &context_ex);
- ok(ret2 == STATUS_NOT_SUPPORTED, "Got unexpected result ret %#x, test %u.\n", ret2, test);
+ ok(ret2 == STATUS_NOT_SUPPORTED, "Got unexpected result ret %#lx, test %u.\n", ret2, test);
SetLastError(0xdeadbeef);
length2 = sizeof(context_buffer);
bret = pInitializeContext(context_buffer, flags, &context, &length2);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == (flags & ~0x40), "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(context_flags == (flags & ~0x40), "Got unexpected ContextFlags %#lx, flags %#lx.\n",
context_flags, flags);
if (pInitializeContext2)
@@ -9633,16 +9634,16 @@ static void test_extended_context(void)
length2 = sizeof(context_buffer);
bret = pInitializeContext2(context_buffer, flags, &context, &length2, ~(ULONG64)0);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == (flags & ~0x40), "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(context_flags == (flags & ~0x40), "Got unexpected ContextFlags %#lx, flags %#lx.\n",
context_flags, flags);
}
continue;
}
ok(!ret && length >= expected_length_xstate,
- "Got unexpected result ret %#x, length %#x, test %u.\n", ret, length, test);
+ "Got unexpected result ret %#lx, length %#lx, test %u.\n", ret, length, test);
if (!pRtlGetExtendedContextLength2)
{
@@ -9653,36 +9654,36 @@ static void test_extended_context(void)
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength2(flags, &length, 7);
ok(!ret && length == expected_length_xstate,
- "Got unexpected result ret %#x, length %#x, test %u.\n", ret, length, test);
+ "Got unexpected result ret %#lx, length %#lx, test %u.\n", ret, length, test);
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength2(flags, &length, ~0);
ok(!ret && length >= expected_length_xstate,
- "Got unexpected result ret %#x, length %#x, test %u.\n", ret, length, test);
+ "Got unexpected result ret %#lx, length %#lx, test %u.\n", ret, length, test);
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength2(flags, &length, 0);
ok((!ret && length == expected_length_xstate - sizeof(YMMCONTEXT))
|| broken(!ret && length == expected_length_xstate) /* win10pro */,
- "Got unexpected result ret %#x, length %#x, test %u.\n", ret, length, test);
+ "Got unexpected result ret %#lx, length %#lx, test %u.\n", ret, length, test);
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength2(flags, &length, 3);
ok((!ret && length == expected_length_xstate - sizeof(YMMCONTEXT))
|| broken(!ret && length == expected_length_xstate) /* win10pro */,
- "Got unexpected result ret %#x, length %#x, test %u.\n", ret, length, test);
+ "Got unexpected result ret %#lx, length %#lx, test %u.\n", ret, length, test);
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength2(flags, &length, 4);
ok(!ret && length == expected_length_xstate,
- "Got unexpected result ret %#x, length %#x, test %u.\n", ret, length, test);
+ "Got unexpected result ret %#lx, length %#lx, test %u.\n", ret, length, test);
}
pRtlGetExtendedContextLength(flags, &length);
SetLastError(0xdeadbeef);
bret = pInitializeContext(NULL, flags, NULL, &length2);
ok(!bret && length2 == length && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "Got unexpected bret %#x, length2 %#x, GetLastError() %u, flags %#x.\n",
+ "Got unexpected bret %#x, length2 %#lx, GetLastError() %lu, flags %#lx.\n",
bret, length2, GetLastError(), flags);
SetLastError(0xdeadbeef);
@@ -9690,7 +9691,7 @@ static void test_extended_context(void)
length2 = length - 1;
bret = pInitializeContext(context_buffer, flags, &context, &length2);
ok(!bret && GetLastError() == ERROR_INSUFFICIENT_BUFFER && length2 == length && context == (void *)0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, length2 %#x, flags %#x.\n",
+ "Got unexpected bret %#x, GetLastError() %lu, length2 %#lx, flags %#lx.\n",
bret, GetLastError(), length2, flags);
SetLastError(0xdeadbeef);
@@ -9698,45 +9699,45 @@ static void test_extended_context(void)
length2 = length + 1;
bret = pInitializeContext(context_buffer, flags, &context, &length2);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
- ok(length2 == length, "Got unexpexted length %#x.\n", length);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
+ ok(length2 == length, "Got unexpexted length %#lx.\n", length);
ok((BYTE *)context == context_buffer, "Got unexpected context %p.\n", context);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == flags, "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ ok(context_flags == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
context_ex = (CONTEXT_EX *)(context_buffer + context_arch[test].context_length);
ok(context_ex->Legacy.Offset == -(int)context_arch[test].context_length,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->Legacy.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->Legacy.Offset, flags);
ok(context_ex->Legacy.Length == ((flags & 0x20) ? context_arch[test].context_length
: context_arch[test].legacy_length),
- "Got unexpected Length %#x, flags %#x.\n", context_ex->Legacy.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->Legacy.Length, flags);
expected_offset = (((ULONG_PTR)context + context_arch[test].context_length
+ context_arch[test].context_ex_length + 63) & ~(ULONG64)63) - (ULONG_PTR)context
- context_arch[test].context_length;
ok(context_ex->XState.Offset == expected_offset,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->XState.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->XState.Offset, flags);
ok(context_ex->XState.Length >= sizeof(XSTATE),
- "Got unexpected Length %#x, flags %#x.\n", context_ex->XState.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->XState.Length, flags);
ok(context_ex->All.Offset == -(int)context_arch[test].context_length,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->All.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->All.Offset, flags);
/* No extra 8 bytes in x64 CONTEXT_EX here. */
ok(context_ex->All.Length == context_arch[test].context_length
+ context_ex->XState.Offset + context_ex->XState.Length,
- "Got unexpected Length %#x, flags %#x.\n", context_ex->All.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->All.Length, flags);
xs = (XSTATE *)((BYTE *)context_ex + context_ex->XState.Offset);
length2 = 0xdeadbeef;
for (i = 0; i < 2; ++i)
{
p = pRtlLocateExtendedFeature(context_ex, i, &length2);
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x.\n", p, length2);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx.\n", p, length2);
}
p = pRtlLocateExtendedFeature(context_ex, XSTATE_AVX, &length2);
- ok(length2 == sizeof(YMMCONTEXT), "Got unexpected length %#x.\n", length2);
+ ok(length2 == sizeof(YMMCONTEXT), "Got unexpected length %#lx.\n", length2);
ok(p == &xs->YmmContext, "Got unexpected p %p.\n", p);
p = pRtlLocateExtendedFeature(context_ex, XSTATE_AVX, NULL);
ok(p == &xs->YmmContext, "Got unexpected p %p.\n", p);
@@ -9746,35 +9747,35 @@ static void test_extended_context(void)
if (flags & CONTEXT_NATIVE)
ok(p == (BYTE *)context + context_arch[test].xsavearea_offset
&& length2 == offsetof(XSAVE_FORMAT, XmmRegisters),
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 1, &length2);
if (flags & CONTEXT_NATIVE)
ok(p == (BYTE *)context + context_arch[test].xsavearea_offset + offsetof(XSAVE_FORMAT, XmmRegisters)
&& length2 == sizeof(M128A) * context_arch[test].vector_reg_count,
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 2, &length2);
if (flags & CONTEXT_NATIVE)
ok(p == &xs->YmmContext && length2 == sizeof(YMMCONTEXT),
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
mask = 0xdeadbeef;
bret = pGetXStateFeaturesMask(context, &mask);
if (flags & CONTEXT_NATIVE)
ok(bret && !mask,
- "Got unexpected bret %#x, mask %s, flags %#x.\n", bret, wine_dbgstr_longlong(mask), flags);
+ "Got unexpected bret %#x, mask %s, flags %#lx.\n", bret, wine_dbgstr_longlong(mask), flags);
else
ok(!bret && mask == 0xdeadbeef,
- "Got unexpected bret %#x, mask %s, flags %#x.\n", bret, wine_dbgstr_longlong(mask), flags);
+ "Got unexpected bret %#x, mask %s, flags %#lx.\n", bret, wine_dbgstr_longlong(mask), flags);
expected_compaction = compaction_enabled ? ((ULONG64)1 << 63) | enabled_features : 0;
ok(!xs->Mask, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
@@ -9792,7 +9793,7 @@ static void test_extended_context(void)
ok(mask == (xs->Mask & ~(ULONG64)3), "Got unexpected mask %s.\n", wine_dbgstr_longlong(mask));
ok(xs->CompactionMask == 0xdeadbeef, "Got unexpected CompactionMask %s.\n", wine_dbgstr_longlong(xs->CompactionMask));
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == flags, "Got unexpected ContextFlags %#x, flags %#x.\n", context->ContextFlags, flags);
+ ok(context_flags == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n", context->ContextFlags, flags);
xs->Mask = 0xdeadbeef;
xs->CompactionMask = 0;
@@ -9803,7 +9804,7 @@ static void test_extended_context(void)
ok(!xs->CompactionMask, "Got unexpected CompactionMask %s.\n",
wine_dbgstr_longlong(xs->CompactionMask));
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == flags, "Got unexpected ContextFlags %#x, flags %#x.\n", context->ContextFlags, flags);
+ ok(context_flags == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n", context->ContextFlags, flags);
xs->Mask = 0xdeadbeef;
xs->CompactionMask = 0xdeadbeef;
@@ -9811,7 +9812,7 @@ static void test_extended_context(void)
ok(bret == !!(flags & CONTEXT_NATIVE), "Got unexpected bret %#x.\n", bret);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
ok(context_flags == (bret ? flags_fpx : flags),
- "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
ok(xs->Mask == bret ? 4 : 0xdeadbeef, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
mask = pRtlGetExtendedFeaturesMask(context_ex);
ok(mask == (xs->Mask & ~(ULONG64)3), "Got unexpected mask %s.\n", wine_dbgstr_longlong(mask));
@@ -9822,10 +9823,10 @@ static void test_extended_context(void)
bret = pGetXStateFeaturesMask(context, &mask);
if (flags & CONTEXT_NATIVE)
ok(bret && mask == enabled_features,
- "Got unexpected bret %#x, mask %s, flags %#x.\n", bret, wine_dbgstr_longlong(mask), flags);
+ "Got unexpected bret %#x, mask %s, flags %#lx.\n", bret, wine_dbgstr_longlong(mask), flags);
else
ok(!bret && mask == 0xdeadbeef,
- "Got unexpected bret %#x, mask %s, flags %#x.\n", bret, wine_dbgstr_longlong(mask), flags);
+ "Got unexpected bret %#x, mask %s, flags %#lx.\n", bret, wine_dbgstr_longlong(mask), flags);
if (pRtlGetExtendedContextLength2)
{
@@ -9836,8 +9837,8 @@ static void test_extended_context(void)
length2 = length;
bret = pInitializeContext2(context_buffer, flags, &context, &length2, 0);
ok(bret && GetLastError() == 0xdeadbeef,
- "Got unexpected bret %#x, GetLastError() %u, flags %#x.\n", bret, GetLastError(), flags);
- ok(length2 == length, "Got unexpexted length %#x.\n", length);
+ "Got unexpected bret %#x, GetLastError() %lu, flags %#lx.\n", bret, GetLastError(), flags);
+ ok(length2 == length, "Got unexpexted length %#lx.\n", length);
ok((BYTE *)context == context_buffer, "Got unexpected context %p.\n", context);
length2 = 0xdeadbeef;
@@ -9845,46 +9846,46 @@ static void test_extended_context(void)
if (flags & CONTEXT_NATIVE)
ok(p == (BYTE *)context + context_arch[test].xsavearea_offset
&& length2 == offsetof(XSAVE_FORMAT, XmmRegisters),
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
else
- ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ ok(!p && length2 == 0xdeadbeef, "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = 0xdeadbeef;
p = pRtlLocateExtendedFeature(context_ex, 2, &length2);
ok((!p && length2 == sizeof(YMMCONTEXT))
|| broken(p && length2 == sizeof(YMMCONTEXT)) /* win10pro */,
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
length2 = 0xdeadbeef;
p = pLocateXStateFeature(context, 2, &length2);
ok(!p && length2 == (flags & CONTEXT_NATIVE) ? sizeof(YMMCONTEXT) : 0xdeadbeef,
- "Got unexpected p %p, length %#x, flags %#x.\n", p, length2, flags);
+ "Got unexpected p %p, length %#lx, flags %#lx.\n", p, length2, flags);
context_flags = *(DWORD *)(context_buffer + context_arch[test].flags_offset);
- ok(context_flags == flags, "Got unexpected ContextFlags %#x, flags %#x.\n", context_flags, flags);
+ ok(context_flags == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n", context_flags, flags);
context_ex = (CONTEXT_EX *)(context_buffer + context_arch[test].context_length);
ok(context_ex->Legacy.Offset == -(int)context_arch[test].context_length,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->Legacy.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->Legacy.Offset, flags);
ok(context_ex->Legacy.Length == ((flags & 0x20) ? context_arch[test].context_length
: context_arch[test].legacy_length),
- "Got unexpected Length %#x, flags %#x.\n", context_ex->Legacy.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->Legacy.Length, flags);
expected_offset = (((ULONG_PTR)context + context_arch[test].context_length
+ context_arch[test].context_ex_length + 63) & ~(ULONG64)63) - (ULONG_PTR)context
- context_arch[test].context_length;
ok(context_ex->XState.Offset == expected_offset,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->XState.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->XState.Offset, flags);
ok(context_ex->XState.Length == sizeof(XSTATE) - sizeof(YMMCONTEXT)
|| broken(context_ex->XState.Length == sizeof(XSTATE)) /* win10pro */,
- "Got unexpected Length %#x, flags %#x.\n", context_ex->XState.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->XState.Length, flags);
ok(context_ex->All.Offset == -(int)context_arch[test].context_length,
- "Got unexpected Offset %d, flags %#x.\n", context_ex->All.Offset, flags);
+ "Got unexpected Offset %ld, flags %#lx.\n", context_ex->All.Offset, flags);
/* No extra 8 bytes in x64 CONTEXT_EX here. */
ok(context_ex->All.Length == context_arch[test].context_length
+ context_ex->XState.Offset + context_ex->XState.Length,
- "Got unexpected Length %#x, flags %#x.\n", context_ex->All.Length, flags);
+ "Got unexpected Length %#lx, flags %#lx.\n", context_ex->All.Length, flags);
expected_compaction = compaction_enabled ? (ULONG64)1 << 63 : 0;
xs = (XSTATE *)((BYTE *)context_ex + context_ex->XState.Offset);
@@ -9901,7 +9902,7 @@ static void test_extended_context(void)
length = 0xdeadbeef;
ret = pRtlGetExtendedContextLength(context_arch[0].flag | context_arch[1].flag, &length);
- ok(ret == STATUS_INVALID_PARAMETER && length == 0xdeadbeef, "Got unexpected result ret %#x, length %#x.\n",
+ ok(ret == STATUS_INVALID_PARAMETER && length == 0xdeadbeef, "Got unexpected result ret %#lx, length %#lx.\n",
ret, length);
if (0)
@@ -9935,7 +9936,7 @@ static void test_extended_context(void)
memcpy(data, test_extended_context_data, sizeof(data));
func();
- ok(context->ContextFlags == (CONTEXT_FULL | CONTEXT_SEGMENTS), "Got unexpected ContextFlags %#x.\n",
+ ok(context->ContextFlags == (CONTEXT_FULL | CONTEXT_SEGMENTS), "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
for (i = 0; i < 8; ++i)
ok(data[i] == test_extended_context_data[i], "Got unexpected data %#x, i %u.\n", data[i], i);
@@ -9953,7 +9954,7 @@ static void test_extended_context(void)
expected_flags |= CONTEXT_EXTENDED_REGISTERS;
#endif
pSetXStateFeaturesMask(context, ~(ULONG64)0);
- ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#x.\n",
+ ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
*(void **)(call_func_code_set_ymm0 + call_func_offsets.func_addr) = GetThreadContext;
*(void **)(call_func_code_set_ymm0 + call_func_offsets.func_param1) = (void *)GetCurrentThread();
@@ -9966,9 +9967,9 @@ static void test_extended_context(void)
context_ex->XState.Length = sizeof(XSTATE);
bret = func();
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
- ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#x.\n",
+ ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
expected_compaction = compaction_enabled ? (ULONG64)1 << 63 : 0;
@@ -9982,7 +9983,7 @@ static void test_extended_context(void)
for (i = 0; i < 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == (xs->Mask == 4 ? test_extended_context_data[i + 4] : 0xcccccccc),
- "Got unexpected data %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected data %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
expected_compaction = compaction_enabled ? ((ULONG64)1 << 63) | 4 : 0;
@@ -9991,8 +9992,8 @@ static void test_extended_context(void)
context_ex->XState.Length = sizeof(XSTATE) + 64;
bret = func();
ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER,
- "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
- ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#x.\n",
+ "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
+ ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
ok(xs->Mask == (compaction_enabled ? 0 : 4), "Got unexpected Mask %#I64x.\n", xs->Mask);
ok(xs->CompactionMask == 4, "Got unexpected CompactionMask %s.\n",
@@ -10000,31 +10001,31 @@ static void test_extended_context(void)
for (i = 0; i < 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == 0xcccccccc
|| broken(((ULONG *)&xs->YmmContext)[i] == test_extended_context_data[i + 4]) /* win10pro */,
- "Got unexpected data %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected data %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
xs->CompactionMask = 4;
xs->Mask = compaction_enabled ? 0 : 4;
context_ex->XState.Length = offsetof(XSTATE, YmmContext);
bret = func();
- ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#x.\n",
+ ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
ok(!bret && GetLastError() == ERROR_MORE_DATA,
- "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
ok(xs->Mask == 4, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
ok(xs->CompactionMask == expected_compaction, "Got unexpected CompactionMask %s.\n",
wine_dbgstr_longlong(xs->CompactionMask));
for (i = 0; i < 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == 0xcccccccc
|| broken(((ULONG *)&xs->YmmContext)[i] == test_extended_context_data[i + 4]) /* win10pro */,
- "Got unexpected data %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected data %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
context_ex->XState.Length = sizeof(XSTATE);
xs->CompactionMask = 4;
xs->Mask = compaction_enabled ? 0 : 4;
bret = func();
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
- ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#x.\n",
+ ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
ok(xs->Mask == 4, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
@@ -10036,7 +10037,7 @@ static void test_extended_context(void)
for (i = 0; i < 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == test_extended_context_data[i + 4],
- "Got unexpected data %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected data %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
/* Test GetThreadContext (current thread, ymm state cleared). */
length = sizeof(context_buffer);
@@ -10053,13 +10054,13 @@ static void test_extended_context(void)
memcpy(code_mem, call_func_code_reset_ymm_state, sizeof(call_func_code_reset_ymm_state));
bret = func();
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
expected_flags = CONTEXT_FULL | CONTEXT_XSTATE | CONTEXT_FLOATING_POINT;
#ifdef __i386__
expected_flags |= CONTEXT_EXTENDED_REGISTERS;
#endif
- ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#x.\n",
+ ok(context->ContextFlags == expected_flags, "Got unexpected ContextFlags %#lx.\n",
context->ContextFlags);
expected_compaction = compaction_enabled ? ((ULONG64)1 << 63) | 4 : 0;
@@ -10075,7 +10076,7 @@ static void test_extended_context(void)
for (i = 0; i < 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == ((xs->Mask & 4) ? 0 : 0xcccccccc)
|| broken(((ULONG *)&xs->YmmContext)[i] == test_extended_context_data[i + 4]),
- "Got unexpected data %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected data %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
/* Test fault exception context. */
memset(data, 0xff, sizeof(data));
@@ -10111,69 +10112,69 @@ static void test_extended_context(void)
pSetXStateFeaturesMask(context, 4);
bret = GetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
todo_wine_if (!xsaveopt_enabled)
ok(xs->Mask == (xsaveopt_enabled ? 0 : 4), "Got unexpected Mask %#I64x.\n", xs->Mask);
ok(xs->CompactionMask == expected_compaction, "Got unexpected CompactionMask %s.\n",
wine_dbgstr_longlong(xs->CompactionMask));
for (i = 0; i < 16 * 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == ((xs->Mask & 4) ? 0 : 0xcccccccc),
- "Got unexpected value %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected value %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
pSetXStateFeaturesMask(context, 4);
memset(&xs->YmmContext, 0, sizeof(xs->YmmContext));
bret = SetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
memset(&xs->YmmContext, 0xcc, sizeof(xs->YmmContext));
bret = GetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
ok(!xs->Mask || broken(xs->Mask == 4), "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
ok(xs->CompactionMask == expected_compaction, "Got unexpected CompactionMask %s.\n",
wine_dbgstr_longlong(xs->CompactionMask));
for (i = 0; i < 16 * 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == 0xcccccccc || broken(xs->Mask == 4 && !((ULONG *)&xs->YmmContext)[i]),
- "Got unexpected value %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected value %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
pSetXStateFeaturesMask(context, 4);
memset(&xs->YmmContext, 0x28, sizeof(xs->YmmContext));
bret = SetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
memset(&xs->YmmContext, 0xcc, sizeof(xs->YmmContext));
bret = GetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
ok(xs->Mask == 4, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
ok(xs->CompactionMask == expected_compaction, "Got unexpected CompactionMask %s.\n",
wine_dbgstr_longlong(xs->CompactionMask));
for (i = 0; i < 16 * 4; ++i)
- ok(((ULONG *)&xs->YmmContext)[i] == 0x28282828, "Got unexpected value %#x, i %u.\n",
+ ok(((ULONG *)&xs->YmmContext)[i] == 0x28282828, "Got unexpected value %#lx, i %u.\n",
((ULONG *)&xs->YmmContext)[i], i);
wait_for_thread_next_suspend(thread);
bret = GetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
pSetXStateFeaturesMask(context, 4);
memset(&xs->YmmContext, 0x48, sizeof(xs->YmmContext));
bret = SetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
wait_for_thread_next_suspend(thread);
memset(&xs->YmmContext, 0xcc, sizeof(xs->YmmContext));
bret = GetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
ok(xs->Mask == 4, "Got unexpected Mask %s.\n", wine_dbgstr_longlong(xs->Mask));
for (i = 0; i < 4; ++i)
- ok(((ULONG *)&xs->YmmContext)[i] == 0x68686868, "Got unexpected value %#x, i %u.\n",
+ ok(((ULONG *)&xs->YmmContext)[i] == 0x68686868, "Got unexpected value %#lx, i %u.\n",
((ULONG *)&xs->YmmContext)[i], i);
wait_for_thread_next_suspend(thread);
memset(&xs->YmmContext, 0xcc, sizeof(xs->YmmContext));
bret = GetThreadContext(thread, context);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
todo_wine_if (!xsaveopt_enabled && sizeof(void *) != 4)
ok(xs->Mask == (xsaveopt_enabled ? 0 : 4) || (sizeof(void *) == 4 && xs->Mask == 4),
"Got unexpected Mask %#I64x.\n", xs->Mask);
@@ -10181,20 +10182,20 @@ static void test_extended_context(void)
{
for (i = 0; i < 8 * sizeof(void *); ++i)
ok(((ULONG *)&xs->YmmContext)[i] == 0,
- "Got unexpected value %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected value %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
for (; i < 16 * 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == 0x48484848,
- "Got unexpected value %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected value %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
}
else
{
for (i = 0; i < 16 * 4; ++i)
ok(((ULONG *)&xs->YmmContext)[i] == 0xcccccccc,
- "Got unexpected value %#x, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
+ "Got unexpected value %#lx, i %u.\n", ((ULONG *)&xs->YmmContext)[i], i);
}
bret = ResumeThread(thread);
- ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError());
+ ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
WaitForSingleObject(thread, INFINITE);
CloseHandle(thread);
@@ -10231,7 +10232,7 @@ static void check_changes_in_range_(const char *file, unsigned int line, const B
if (flag & flags && p[i] == 0xcc)
{
if (!once++)
- ok(broken(1), "Matched broken result at %#x, flags %#x.\n", i, flags);
+ ok(broken(1), "Matched broken result at %#x, flags %#lx.\n", i, flags);
continue;
}
flag = 0;
@@ -10239,12 +10240,12 @@ static void check_changes_in_range_(const char *file, unsigned int line, const B
if (flag & flags && p[i] != 0xcc)
{
- ok_(file, line)(0, "Got unexpected byte %#x at %#x, flags %#x.\n", p[i], i, flags);
+ ok_(file, line)(0, "Got unexpected byte %#x at %#x, flags %#lx.\n", p[i], i, flags);
return;
}
else if (!(flag & flags) && p[i] != 0xdd)
{
- ok_(file, line)(0, "Got unexpected byte %#x at %#x, flags %#x.\n", p[i], i, flags);
+ ok_(file, line)(0, "Got unexpected byte %#x at %#x, flags %#lx.\n", p[i], i, flags);
return;
}
}
@@ -10330,15 +10331,15 @@ static void test_copy_context(void)
status = pRtlInitializeExtendedContext(src_context_buffer, flags, &src_ex);
if (enabled_features || !(flags & 0x40))
{
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
}
else
{
- ok(status == STATUS_NOT_SUPPORTED, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(status == STATUS_NOT_SUPPORTED, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
continue;
}
status = pRtlInitializeExtendedContext(dst_context_buffer, flags, &dst_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
src = pRtlLocateLegacyContext(src_ex, NULL);
dst = pRtlLocateLegacyContext(dst_ex, NULL);
@@ -10352,26 +10353,26 @@ static void test_copy_context(void)
src_xs->CompactionMask = ~(ULONG64)0;
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
context_length = (BYTE *)dst_ex - (BYTE *)dst + dst_ex->All.Length;
check_changes_in_range((BYTE *)dst, flags & CONTEXT_AMD64 ? &ranges_amd64[0] : &ranges_x86[0],
flags, context_length);
- ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
memset(dst_context_buffer, 0xdd, sizeof(dst_context_buffer));
status = pRtlInitializeExtendedContext(dst_context_buffer, flags, &dst_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
*(DWORD *)((BYTE *)src + flags_offset) = 0;
*(DWORD *)((BYTE *)dst + flags_offset) = 0;
SetLastError(0xdeadbeef);
status = pRtlCopyContext(dst, flags | 0x40, src);
ok(status == (enabled_features ? STATUS_INVALID_PARAMETER : STATUS_NOT_SUPPORTED)
|| broken(status == STATUS_INVALID_PARAMETER),
- "Got unexpected status %#x, flags %#x.\n", status, flags);
- ok(*(DWORD *)((BYTE *)dst + flags_offset) == 0, "Got unexpected ContextFlags %#x, flags %#x.\n",
+ "Got unexpected status %#lx, flags %#lx.\n", status, flags);
+ ok(*(DWORD *)((BYTE *)dst + flags_offset) == 0, "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
check_changes_in_range((BYTE *)dst, flags & CONTEXT_AMD64 ? &ranges_amd64[0] : &ranges_x86[0],
0, context_length);
@@ -10382,13 +10383,13 @@ static void test_copy_context(void)
if (flags & 0x40)
ok((status == STATUS_BUFFER_OVERFLOW)
|| broken(!(flags & CONTEXT_NATIVE) && status == STATUS_INVALID_PARAMETER),
- "Got unexpected status %#x, flags %#x.\n", status, flags);
+ "Got unexpected status %#lx, flags %#lx.\n", status, flags);
else
ok(!status || broken(!(flags & CONTEXT_NATIVE) && status == STATUS_INVALID_PARAMETER),
- "Got unexpected status %#x, flags %#x.\n", status, flags);
+ "Got unexpected status %#lx, flags %#lx.\n", status, flags);
if (!status)
{
- ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
check_changes_in_range((BYTE *)dst, flags & CONTEXT_AMD64 ? &ranges_amd64[0] : &ranges_x86[0],
flags, context_length);
@@ -10396,7 +10397,7 @@ static void test_copy_context(void)
else
{
ok(*(DWORD *)((BYTE *)dst + flags_offset) == (flags & 0x110000),
- "Got unexpected ContextFlags %#x, flags %#x.\n",
+ "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
check_changes_in_range((BYTE *)dst, flags & CONTEXT_AMD64 ? &ranges_amd64[0] : &ranges_x86[0],
0, context_length);
@@ -10414,11 +10415,11 @@ static void test_copy_context(void)
memset(src_context_buffer, 0xcc, sizeof(src_context_buffer));
length = sizeof(src_context_buffer);
bret = pInitializeContext(src_context_buffer, flags, &src, &length);
- ok(bret, "Got unexpected bret %#x, flags %#x.\n", bret, flags);
+ ok(bret, "Got unexpected bret %#x, flags %#lx.\n", bret, flags);
length = sizeof(dst_context_buffer);
bret = pInitializeContext(dst_context_buffer, flags, &dst, &length);
- ok(bret, "Got unexpected bret %#x, flags %#x.\n", bret, flags);
+ ok(bret, "Got unexpected bret %#x, flags %#lx.\n", bret, flags);
dst_ex = (CONTEXT_EX *)((BYTE *)dst + context_length);
src_ex = (CONTEXT_EX *)((BYTE *)src + context_length);
@@ -10442,12 +10443,12 @@ static void test_copy_context(void)
dst_ex->XState.Length = 0;
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
ok(status == (enabled_features ? STATUS_BUFFER_OVERFLOW : STATUS_NOT_SUPPORTED),
- "Got unexpected status %#x, flags %#x.\n", status, flags);
+ "Got unexpected status %#lx, flags %#lx.\n", status, flags);
if (!enabled_features)
continue;
- ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
src_xs->Mask = ~(ULONG64)0;
@@ -10457,8 +10458,8 @@ static void test_copy_context(void)
dst_xs->Mask = 0xdddddddddddddddd;
dst_ex->XState.Length = 0;
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(status == STATUS_BUFFER_OVERFLOW, "Got unexpected status %#x, flags %#x.\n", status, flags);
- ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(status == STATUS_BUFFER_OVERFLOW, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
+ ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
ok(dst_xs->Mask == 0xdddddddddddddddd, "Got unexpected Mask %s.\n",
@@ -10473,8 +10474,8 @@ static void test_copy_context(void)
dst_xs->Mask = 0xdddddddddddddddd;
dst_ex->XState.Length = offsetof(XSTATE, YmmContext);
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
- ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#x, flags %#x.\n",
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
+ ok(*(DWORD *)((BYTE *)dst + flags_offset) == flags, "Got unexpected ContextFlags %#lx, flags %#lx.\n",
*(DWORD *)((BYTE *)dst + flags_offset), flags);
ok(dst_xs->Mask == 0, "Got unexpected Mask %s.\n",
wine_dbgstr_longlong(dst_xs->Mask));
@@ -10487,7 +10488,7 @@ static void test_copy_context(void)
dst_xs->Mask = 0xdddddddddddddddd;
dst_ex->XState.Length = sizeof(XSTATE);
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
ok(dst_xs->Mask == 0, "Got unexpected Mask %s.\n",
wine_dbgstr_longlong(dst_xs->Mask));
ok(dst_xs->CompactionMask == expected_compaction,
@@ -10499,7 +10500,7 @@ static void test_copy_context(void)
dst_xs->CompactionMask = 0xdddddddddddddddd;
dst_xs->Mask = 0xdddddddddddddddd;
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
ok(dst_xs->Mask == 4, "Got unexpected Mask %s.\n",
wine_dbgstr_longlong(dst_xs->Mask));
ok(dst_xs->CompactionMask == expected_compaction,
@@ -10511,7 +10512,7 @@ static void test_copy_context(void)
dst_xs->CompactionMask = 0xdddddddddddddddd;
dst_xs->Mask = 0xdddddddddddddddd;
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
ok(dst_xs->Mask == 0, "Got unexpected Mask %s.\n",
wine_dbgstr_longlong(dst_xs->Mask));
ok(dst_xs->CompactionMask == expected_compaction,
@@ -10526,7 +10527,7 @@ static void test_copy_context(void)
dst_xs->CompactionMask = 0xdddddddddddddddd;
dst_xs->Mask = 0xdddddddddddddddd;
status = pRtlCopyExtendedContext(dst_ex, flags, src_ex);
- ok(!status, "Got unexpected status %#x, flags %#x.\n", status, flags);
+ ok(!status, "Got unexpected status %#lx, flags %#lx.\n", status, flags);
ok(dst_xs->Mask == 4, "Got unexpected Mask %s.\n",
wine_dbgstr_longlong(dst_xs->Mask));
ok(dst_xs->CompactionMask == expected_compaction,
@@ -10539,11 +10540,11 @@ static void test_copy_context(void)
dst_xs->Mask = 0xdddddddddddddddd;
status = pRtlCopyContext(dst, flags, src);
ok(!status || broken(!(flags & CONTEXT_NATIVE) && status == STATUS_INVALID_PARAMETER),
- "Got unexpected status %#x, flags %#x.\n", status, flags);
- ok(dst_xs->Mask == 0xdddddddddddddddd || broken(dst_xs->Mask == 4), "Got unexpected Mask %s, flags %#x.\n",
+ "Got unexpected status %#lx, flags %#lx.\n", status, flags);
+ ok(dst_xs->Mask == 0xdddddddddddddddd || broken(dst_xs->Mask == 4), "Got unexpected Mask %s, flags %#lx.\n",
wine_dbgstr_longlong(dst_xs->Mask), flags);
ok(dst_xs->CompactionMask == 0xdddddddddddddddd || broken(dst_xs->CompactionMask == expected_compaction),
- "Got unexpected CompactionMask %s, flags %#x.\n", wine_dbgstr_longlong(dst_xs->CompactionMask), flags);
+ "Got unexpected CompactionMask %s, flags %#lx.\n", wine_dbgstr_longlong(dst_xs->CompactionMask), flags);
check_changes_in_range((BYTE *)&dst_xs->YmmContext, single_range,
dst_xs->Mask == 4, sizeof(dst_xs->YmmContext));
}
1
0
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/error.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/error.c b/dlls/ntdll/tests/error.c
index 8f099e6903a..7784886c79b 100644
--- a/dlls/ntdll/tests/error.c
+++ b/dlls/ntdll/tests/error.c
@@ -18,6 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdarg.h>
#include <stdio.h>
@@ -75,7 +76,7 @@ static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message)
err = pRtlNtStatusToDosError(win_nt);
ok(err == win32,
- "%s (%x): got %u, expected %u\n",
+ "%s (%lx): got %lu, expected %lu\n",
message, win_nt, err, win32);
}
@@ -86,7 +87,7 @@ static void cmp_call2(NTSTATUS win_nt, ULONG win32, const char* message)
err = pRtlNtStatusToDosError(win_nt);
ok(err == win32 ||
(!strict && err == ERROR_MR_MID_NOT_FOUND),
- "%s (%x): got %u, expected %u (or MID_NOT_FOUND)\n",
+ "%s (%lx): got %lu, expected %lu (or MID_NOT_FOUND)\n",
message, win_nt, err, win32);
}
@@ -96,7 +97,7 @@ static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char*
err = pRtlNtStatusToDosError(win_nt);
ok(err == win32_1 || (!strict && err == win32_2),
- "%s (%x): got %u, expected %u or %u\n",
+ "%s (%lx): got %lu, expected %lu or %lu\n",
message, win_nt, err, win32_1, win32_2);
}
@@ -107,7 +108,7 @@ static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char*
err = pRtlNtStatusToDosError(win_nt);
ok(err == win32_1 ||
(!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)),
- "%s (%x): got %u, expected %u or %u\n",
+ "%s (%lx): got %lu, expected %lu or %lu\n",
message, win_nt, err, win32_1, win32_2);
}
1
0
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/env.c | 161 ++++++++++++++++++++++++------------------------
1 file changed, 81 insertions(+), 80 deletions(-)
diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c
index 9cfbf9eb435..09a91d35807 100644
--- a/dlls/ntdll/tests/env.c
+++ b/dlls/ntdll/tests/env.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
@@ -111,7 +112,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 || (test->alt && nts == test->alt),
- "[%d]: Wrong status for '%s', expecting %x got %x\n",
+ "[%d]: Wrong status for '%s', expecting %lx got %lx\n",
i, test->var, test->status, nts );
if (nts == test->status) switch (nts)
{
@@ -144,20 +145,20 @@ static void testQuery(void)
pRtlMultiByteToUnicodeN(bn, sizeof(bn), NULL, test->var, strlen(test->var) + 1);
nts = pRtlQueryEnvironmentVariable(small_env, bn, name_length, bv, value_length, &return_length);
ok(nts == test->status || (test->alt && nts == test->alt),
- "[%d]: Wrong status for '%s', expecting %x got %x\n",
+ "[%d]: Wrong status for '%s', expecting %lx got %lx\n",
i, test->var, test->status, nts);
if (nts == test->status) switch (nts)
{
case STATUS_SUCCESS:
pRtlMultiByteToUnicodeN(bn, sizeof(bn), NULL, test->val, strlen(test->val) + 1);
- ok(return_length == strlen(test->val), "Wrong length %ld for %s\n",
+ ok(return_length == strlen(test->val), "Wrong length %Id for %s\n",
return_length, test->var);
ok(!memcmp(bv, bn, return_length), "Wrong result for %s/%d\n", test->var, test->len);
ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len);
break;
case STATUS_BUFFER_TOO_SMALL:
ok(return_length == (strlen(test->val) + 1),
- "Wrong returned length %ld (too small buffer) for %s\n", return_length, test->var);
+ "Wrong returned length %Id (too small buffer) for %s\n", return_length, test->var);
break;
}
}
@@ -207,20 +208,20 @@ static void testExpand(void)
us_dst.Buffer = NULL;
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
- ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts);
+ ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
- "Wrong returned length for %s: %u\n", test->src, ul );
+ "Wrong returned length for %s: %lu\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 (%u)\n", nts);
+ ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts);
ok(ul == us_dst.Length + sizeof(WCHAR),
- "Wrong returned length for %s: %u\n", test->src, ul);
+ "Wrong returned length for %s: %lu\n", test->src, ul);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
- "Wrong returned length for %s: %u\n", test->src, ul);
+ "Wrong returned length for %s: %lu\n", test->src, ul);
ok(lstrcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n",
test->src, test->dst);
@@ -229,9 +230,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 (%u)\n", nts);
+ ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
- "Wrong returned length for %s (with buffer too small): %u\n", test->src, ul);
+ "Wrong returned length for %s (with buffer too small): %lu\n", test->src, ul);
ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)\n", dst[8], dst[8]);
}
@@ -273,7 +274,7 @@ static UINT_PTR check_string_( int line, RTL_USER_PROCESS_PARAMETERS *params, UN
}
ok_(__FILE__,line)( (UINT_PTR)str->Buffer == align(pos, sizeof(void *)) ||
(!expect && (UINT_PTR)str->Buffer == pos) || /* initial params are not aligned */
- broken( (UINT_PTR)str->Buffer == align(pos, 4) ), "wrong buffer %lx/%lx\n",
+ broken( (UINT_PTR)str->Buffer == align(pos, 4) ), "wrong buffer %Ix/%Ix\n",
(UINT_PTR)str->Buffer, pos );
if (str->Length < str->MaximumLength)
{
@@ -305,39 +306,39 @@ static void test_process_params(void)
MEMORY_BASIC_INFORMATION info;
NTSTATUS status = pRtlCreateProcessParameters( ¶ms, &image, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL );
- ok( !status, "failed %x\n", status );
+ ok( !status, "failed %lx\n", status );
if (VirtualQuery( params, &info, sizeof(info) ) && info.AllocationBase == params)
{
size = info.RegionSize;
ok( broken(TRUE), "not a heap block %p\n", params ); /* winxp */
ok( params->AllocationSize == info.RegionSize,
- "wrong AllocationSize %x/%lx\n", params->AllocationSize, info.RegionSize );
+ "wrong AllocationSize %lx/%Ix\n", params->AllocationSize, info.RegionSize );
}
else
{
size = HeapSize( GetProcessHeap(), 0, params );
ok( size != ~(SIZE_T)0, "not a heap block %p\n", params );
ok( params->AllocationSize == params->Size,
- "wrong AllocationSize %x/%x\n", params->AllocationSize, params->Size );
+ "wrong AllocationSize %lx/%lx\n", params->AllocationSize, params->Size );
}
ok( params->Size < size || broken(params->Size == size), /* <= win2k3 */
- "wrong Size %x/%lx\n", params->Size, size );
- ok( params->Flags == 0, "wrong Flags %u\n", params->Flags );
- ok( params->DebugFlags == 0, "wrong Flags %u\n", params->DebugFlags );
+ "wrong Size %lx/%Ix\n", params->Size, size );
+ ok( params->Flags == 0, "wrong Flags %lu\n", params->Flags );
+ ok( params->DebugFlags == 0, "wrong Flags %lu\n", params->DebugFlags );
ok( params->ConsoleHandle == 0, "wrong ConsoleHandle %p\n", params->ConsoleHandle );
- ok( params->ConsoleFlags == 0, "wrong ConsoleFlags %u\n", params->ConsoleFlags );
+ ok( params->ConsoleFlags == 0, "wrong ConsoleFlags %lu\n", params->ConsoleFlags );
ok( params->hStdInput == 0, "wrong hStdInput %p\n", params->hStdInput );
ok( params->hStdOutput == 0, "wrong hStdOutput %p\n", params->hStdOutput );
ok( params->hStdError == 0, "wrong hStdError %p\n", params->hStdError );
- ok( params->dwX == 0, "wrong dwX %u\n", params->dwX );
- ok( params->dwY == 0, "wrong dwY %u\n", params->dwY );
- ok( params->dwXSize == 0, "wrong dwXSize %u\n", params->dwXSize );
- ok( params->dwYSize == 0, "wrong dwYSize %u\n", params->dwYSize );
- ok( params->dwXCountChars == 0, "wrong dwXCountChars %u\n", params->dwXCountChars );
- ok( params->dwYCountChars == 0, "wrong dwYCountChars %u\n", params->dwYCountChars );
- ok( params->dwFillAttribute == 0, "wrong dwFillAttribute %u\n", params->dwFillAttribute );
- ok( params->dwFlags == 0, "wrong dwFlags %u\n", params->dwFlags );
- ok( params->wShowWindow == 0, "wrong wShowWindow %u\n", params->wShowWindow );
+ ok( params->dwX == 0, "wrong dwX %lu\n", params->dwX );
+ ok( params->dwY == 0, "wrong dwY %lu\n", params->dwY );
+ ok( params->dwXSize == 0, "wrong dwXSize %lu\n", params->dwXSize );
+ ok( params->dwYSize == 0, "wrong dwYSize %lu\n", params->dwYSize );
+ ok( params->dwXCountChars == 0, "wrong dwXCountChars %lu\n", params->dwXCountChars );
+ ok( params->dwYCountChars == 0, "wrong dwYCountChars %lu\n", params->dwYCountChars );
+ ok( params->dwFillAttribute == 0, "wrong dwFillAttribute %lu\n", params->dwFillAttribute );
+ ok( params->dwFlags == 0, "wrong dwFlags %lu\n", params->dwFlags );
+ ok( params->wShowWindow == 0, "wrong wShowWindow %lu\n", params->wShowWindow );
pos = (UINT_PTR)params->CurrentDirectory.DosPath.Buffer;
ok( params->CurrentDirectory.DosPath.MaximumLength == MAX_PATH * sizeof(WCHAR),
@@ -356,18 +357,18 @@ static void test_process_params(void)
pos = check_string( params, ¶ms->RuntimeInfo, &null_str, pos );
pos = align(pos, 4);
ok( pos == params->Size || pos + 4 == params->Size,
- "wrong pos %lx/%x\n", pos, params->Size );
+ "wrong pos %Ix/%lx\n", pos, params->Size );
pos = params->Size;
if ((char *)params->Environment > (char *)params &&
(char *)params->Environment < (char *)params + size)
{
ok( (char *)params->Environment - (char *)params == (UINT_PTR)pos,
- "wrong env %lx/%lx\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
+ "wrong env %Ix/%Ix\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
pos += get_env_length(params->Environment) * sizeof(WCHAR);
ok( align(pos, sizeof(void *)) == size ||
- broken( align(pos, 4) == size ), "wrong size %lx/%lx\n", pos, size );
+ broken( align(pos, 4) == size ), "wrong size %Ix/%Ix\n", pos, size );
ok( params->EnvironmentSize == size - ((char *)params->Environment - (char *)params),
- "wrong len %lx/%lx\n", params->EnvironmentSize,
+ "wrong len %Ix/%Ix\n", params->EnvironmentSize,
size - ((char *)params->Environment - (char *)params) );
}
else ok( broken(TRUE), "environment not inside block\n" ); /* <= win2k3 */
@@ -375,23 +376,23 @@ static void test_process_params(void)
status = pRtlCreateProcessParameters( ¶ms, &image, &dummy, &dummy, &dummy, dummy_env,
&dummy, &dummy, &dummy, &dummy );
- ok( !status, "failed %x\n", status );
+ ok( !status, "failed %lx\n", status );
if (VirtualQuery( params, &info, sizeof(info) ) && info.AllocationBase == params)
{
size = info.RegionSize;
ok( broken(TRUE), "not a heap block %p\n", params ); /* winxp */
ok( params->AllocationSize == info.RegionSize,
- "wrong AllocationSize %x/%lx\n", params->AllocationSize, info.RegionSize );
+ "wrong AllocationSize %lx/%Ix\n", params->AllocationSize, info.RegionSize );
}
else
{
size = HeapSize( GetProcessHeap(), 0, params );
ok( size != ~(SIZE_T)0, "not a heap block %p\n", params );
ok( params->AllocationSize == params->Size,
- "wrong AllocationSize %x/%x\n", params->AllocationSize, params->Size );
+ "wrong AllocationSize %lx/%lx\n", params->AllocationSize, params->Size );
}
ok( params->Size < size || broken(params->Size == size), /* <= win2k3 */
- "wrong Size %x/%lx\n", params->Size, size );
+ "wrong Size %lx/%Ix\n", params->Size, size );
pos = (UINT_PTR)params->CurrentDirectory.DosPath.Buffer;
if (params->CurrentDirectory.DosPath.Length == dummy_dir.Length + sizeof(WCHAR))
@@ -410,18 +411,18 @@ static void test_process_params(void)
pos = check_string( params, ¶ms->RuntimeInfo, &dummy, pos );
pos = align(pos, 4);
ok( pos == params->Size || pos + 4 == params->Size,
- "wrong pos %lx/%x\n", pos, params->Size );
+ "wrong pos %Ix/%lx\n", pos, params->Size );
pos = params->Size;
if ((char *)params->Environment > (char *)params &&
(char *)params->Environment < (char *)params + size)
{
ok( (char *)params->Environment - (char *)params == pos,
- "wrong env %lx/%lx\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
+ "wrong env %Ix/%Ix\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
pos += get_env_length(params->Environment) * sizeof(WCHAR);
ok( align(pos, sizeof(void *)) == size ||
- broken( align(pos, 4) == size ), "wrong size %lx/%lx\n", pos, size );
+ broken( align(pos, 4) == size ), "wrong size %Ix/%Ix\n", pos, size );
ok( params->EnvironmentSize == size - ((char *)params->Environment - (char *)params),
- "wrong len %lx/%lx\n", params->EnvironmentSize,
+ "wrong len %Ix/%Ix\n", params->EnvironmentSize,
size - ((char *)params->Environment - (char *)params) );
}
else ok( broken(TRUE), "environment not inside block\n" ); /* <= win2k3 */
@@ -434,15 +435,15 @@ static void test_process_params(void)
{
ok( broken(TRUE), "not a heap block %p\n", cur_params ); /* winxp */
ok( cur_params->AllocationSize == info.RegionSize,
- "wrong AllocationSize %x/%lx\n", cur_params->AllocationSize, info.RegionSize );
+ "wrong AllocationSize %lx/%Ix\n", cur_params->AllocationSize, info.RegionSize );
}
else
{
size = HeapSize( GetProcessHeap(), 0, cur_params );
ok( size != ~(SIZE_T)0, "not a heap block %p\n", cur_params );
ok( cur_params->AllocationSize == cur_params->Size,
- "wrong AllocationSize %x/%x\n", cur_params->AllocationSize, cur_params->Size );
- ok( cur_params->Size == size, "wrong Size %x/%lx\n", cur_params->Size, size );
+ "wrong AllocationSize %lx/%lx\n", cur_params->AllocationSize, cur_params->Size );
+ ok( cur_params->Size == size, "wrong Size %lx/%Ix\n", cur_params->Size, size );
}
/* CurrentDirectory points outside the params, and DllPath may be null */
@@ -475,7 +476,7 @@ static void test_process_params(void)
size = HeapSize( GetProcessHeap(), 0, initial_env );
ok( size != ~(SIZE_T)0, "env is not a heap block %p / %p\n", cur_params, initial_env );
ok( cur_params->EnvironmentSize == size,
- "wrong len %lx/%lx\n", cur_params->EnvironmentSize, size );
+ "wrong len %Ix/%Ix\n", cur_params->EnvironmentSize, size );
}
}
@@ -493,13 +494,13 @@ static void check_env_var_(int line, const char *var, const char *value)
DWORD size = GetEnvironmentVariableA(var, buffer, sizeof(buffer));
if (value)
{
- ok_(__FILE__, line)(size == strlen(value), "wrong size %u\n", size);
+ ok_(__FILE__, line)(size == strlen(value), "wrong size %lu\n", size);
ok_(__FILE__, line)(!strcmp(buffer, value), "wrong value %s\n", debugstr_a(buffer));
}
else
{
- ok_(__FILE__, line)(!size, "wrong size %u\n", size);
- ok_(__FILE__, line)(GetLastError() == ERROR_ENVVAR_NOT_FOUND, "got error %u\n", GetLastError());
+ ok_(__FILE__, line)(!size, "wrong size %lu\n", size);
+ ok_(__FILE__, line)(GetLastError() == ERROR_ENVVAR_NOT_FOUND, "got error %lu\n", GetLastError());
}
}
#define check_env_var(a, b) check_env_var_(__LINE__, a, b)
@@ -512,31 +513,31 @@ static void test_RtlSetCurrentEnvironment(void)
SIZE_T size;
status = RtlCreateEnvironment(FALSE, &env);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
ret = SetEnvironmentVariableA("testenv1", "heis");
- ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
ret = SetEnvironmentVariableA("testenv2", "dyo");
- ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
status = set_env_var(&env, L"testenv1", L"unus");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = set_env_var(&env, L"testenv3", L"tres");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
old_env = NtCurrentTeb()->Peb->ProcessParameters->Environment;
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == get_env_length(old_env) * sizeof(WCHAR),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, old_env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
RtlSetCurrentEnvironment(env, &prev);
ok(prev == old_env, "got wrong previous env %p\n", prev);
ok(NtCurrentTeb()->Peb->ProcessParameters->Environment == env, "got wrong current env\n");
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == get_env_length(env) * sizeof(WCHAR),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
check_env_var("testenv1", "unus");
check_env_var("testenv2", NULL);
@@ -546,14 +547,14 @@ static void test_RtlSetCurrentEnvironment(void)
env = HeapReAlloc( GetProcessHeap(), 0, env, HeapSize( GetProcessHeap(), 0, env) + 120 );
RtlSetCurrentEnvironment(env, &prev);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
RtlSetCurrentEnvironment(old_env, NULL);
ok(NtCurrentTeb()->Peb->ProcessParameters->Environment == old_env, "got wrong current env\n");
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == get_env_length(old_env) * sizeof(WCHAR),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, old_env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
check_env_var("testenv1", "heis");
check_env_var("testenv2", "dyo");
@@ -562,19 +563,19 @@ static void test_RtlSetCurrentEnvironment(void)
env = NtCurrentTeb()->Peb->ProcessParameters->Environment;
size = get_env_length(env) * sizeof(WCHAR);
ok( NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == size,
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
ok( size == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu / %lu\n", size, HeapSize( GetProcessHeap(), 0, env ));
+ "got wrong size %Iu / %Iu\n", size, HeapSize( GetProcessHeap(), 0, env ));
SetEnvironmentVariableA("testenv1", NULL);
SetEnvironmentVariableA("testenv2", NULL);
env = NtCurrentTeb()->Peb->ProcessParameters->Environment;
ok( NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == size,
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
ok( size == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu / %lu\n", size, HeapSize( GetProcessHeap(), 0, env ));
- ok( size > get_env_length(env) * sizeof(WCHAR), "got wrong size %lu\n", size );
+ "got wrong size %Iu / %Iu\n", size, HeapSize( GetProcessHeap(), 0, env ));
+ ok( size > get_env_length(env) * sizeof(WCHAR), "got wrong size %Iu\n", size );
}
static void query_env_var_(int line, WCHAR *env, const WCHAR *var, const WCHAR *value)
@@ -590,13 +591,13 @@ static void query_env_var_(int line, WCHAR *env, const WCHAR *var, const WCHAR *
status = RtlQueryEnvironmentVariable_U(env, &var_string, &value_string);
if (value)
{
- ok_(__FILE__, line)(!status, "got %#x\n", status);
+ ok_(__FILE__, line)(!status, "got %#lx\n", status);
ok_(__FILE__, line)(value_string.Length/sizeof(WCHAR) == wcslen(value),
- "wrong size %u\n", value_string.Length/sizeof(WCHAR));
+ "wrong size %Iu\n", value_string.Length/sizeof(WCHAR));
ok_(__FILE__, line)(!wcscmp(value_string.Buffer, value), "wrong value %s\n", debugstr_w(value_string.Buffer));
}
else
- ok_(__FILE__, line)(status == STATUS_VARIABLE_NOT_FOUND, "got %#x\n", status);
+ ok_(__FILE__, line)(status == STATUS_VARIABLE_NOT_FOUND, "got %#lx\n", status);
}
#define query_env_var(a, b, c) query_env_var_(__LINE__, a, b, c)
@@ -606,52 +607,52 @@ static void test_RtlSetEnvironmentVariable(void)
WCHAR *env;
status = RtlCreateEnvironment(FALSE, &env);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = set_env_var(&env, L"cat", L"dog");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"cat", L"dog");
status = set_env_var(&env, L"cat", L"horse");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"cat", L"horse");
status = set_env_var(&env, L"cat", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"cat", NULL);
status = set_env_var(&env, L"cat", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = set_env_var(&env, L"foo", L"meouw");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"foo", L"meouw");
status = set_env_var(&env, L"fOo", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"foo", NULL);
status = set_env_var(&env, L"horse", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"horse", NULL);
status = set_env_var(&env, L"me=too", L"also");
- ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status);
status = set_env_var(&env, L"me", L"too=also");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"me", L"too=also");
status = set_env_var(&env, L"=too", L"also");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"=too", L"also");
status = set_env_var(&env, L"=", L"also");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"=", L"also");
status = RtlDestroyEnvironment(env);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
}
START_TEST(env)
1
0
[PATCH] dlls/ntdll/tests/directory.c: enable compilation with long types
by Eric Pouech March 18, 2022
by Eric Pouech March 18, 2022
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/directory.c | 239 +++++++++++++++++++++---------------------
1 file changed, 120 insertions(+), 119 deletions(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 8a8047c6392..77b17a50037 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -23,6 +23,7 @@
* We use function pointers here as there is no import library for NTDLL on
* windows.
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
#include <stdarg.h>
@@ -89,7 +90,7 @@ static void set_up_attribute_test(const WCHAR *testdir)
BOOL ret;
ret = CreateDirectoryW(testdir, NULL);
- ok(ret, "couldn't create dir %s, error %d\n", wine_dbgstr_w(testdir), GetLastError());
+ ok(ret, "couldn't create dir %s, error %ld\n", wine_dbgstr_w(testdir), GetLastError());
for (i=0; i < test_dir_count; i++) {
WCHAR buf[MAX_PATH];
@@ -101,7 +102,7 @@ static void set_up_attribute_test(const WCHAR *testdir)
lstrcatW( buf, testfiles[i].name );
if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) {
ret = CreateDirectoryW(buf, NULL);
- ok(ret, "couldn't create dir %s, error %d\n", wine_dbgstr_w(buf), GetLastError());
+ ok(ret, "couldn't create dir %s, error %ld\n", wine_dbgstr_w(buf), GetLastError());
} else {
HANDLE h = CreateFileW(buf,
GENERIC_READ|GENERIC_WRITE,
@@ -137,11 +138,11 @@ static void tear_down_attribute_test(const WCHAR *testdir)
if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) {
ret = RemoveDirectoryW(buf);
ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND),
- "Failed to rmdir %s, error %d\n", wine_dbgstr_w(buf), GetLastError());
+ "Failed to rmdir %s, error %ld\n", wine_dbgstr_w(buf), GetLastError());
} else {
ret = DeleteFileW(buf);
ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND),
- "Failed to rm %s, error %d\n", wine_dbgstr_w(buf), GetLastError());
+ "Failed to rm %s, error %ld\n", wine_dbgstr_w(buf), GetLastError());
}
}
RemoveDirectoryW(testdir);
@@ -163,7 +164,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
continue;
if (!testfiles[i].attr_done) {
todo_wine_if (testfiles[i].todo)
- ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
+ ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%lx), got %lx (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
testfiles[i].attr_done = TRUE;
}
testfiles[i].nfound++;
@@ -195,7 +196,7 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
/* Read the directory and note which files are found */
status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, attr, &io, FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_OPEN_FOR_BACKUP_INTENT|FILE_DIRECTORY_FILE);
- ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdirA, status, GetLastError());
+ ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%lx, error %ld\n", testdirA, status, GetLastError());
if (status != STATUS_SUCCESS) {
skip("can't test if we can't open the directory\n");
return;
@@ -204,8 +205,8 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, single_entry, mask, restart_flag );
- ok (status == STATUS_SUCCESS, "failed to query directory; status %x\n", status);
- ok (U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
+ ok (status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
+ ok (U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
data_len = io.Information;
ok (data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
@@ -224,9 +225,9 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( new_dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, single_entry, &dummy_mask, FALSE );
- ok (U(io).Status == status, "wrong status %x / %x\n", status, U(io).Status);
+ ok (U(io).Status == status, "wrong status %lx / %lx\n", status, U(io).Status);
if (status == STATUS_NO_MORE_FILES) break;
- ok (status == STATUS_SUCCESS, "failed to query directory; status %x\n", status);
+ ok (status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
data_len = io.Information;
if (data_len < sizeof(FILE_BOTH_DIRECTORY_INFORMATION))
break;
@@ -278,8 +279,8 @@ static void test_directory_sort( const WCHAR *testdir )
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, data, sizeof(data),
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "failed to query directory; status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status );
data_len = io.Information;
ok( data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n" );
data_pos = 0;
@@ -316,9 +317,9 @@ static void test_directory_sort( const WCHAR *testdir )
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( handle, 0, NULL, NULL, &io, data, sizeof(data),
FileBothDirectoryInformation, FALSE, NULL, FALSE );
- ok (U(io).Status == status, "wrong status %x / %x\n", status, U(io).Status);
+ ok (U(io).Status == status, "wrong status %lx / %lx\n", status, U(io).Status);
if (status == STATUS_NO_MORE_FILES) break;
- ok( status == STATUS_SUCCESS, "failed to query directory; status %x\n", status );
+ ok( status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status );
data_len = io.Information;
data_pos = 0;
}
@@ -346,9 +347,9 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
status = pNtQueryDirectoryFile( handle, 0, NULL, NULL, &io, data, data_size,
class, FALSE, mask, TRUE );
- ok( U(io).Status == 0xdeadbeef, "%u: wrong status %x\n", class, U(io).Status );
- ok( U(io).Information == 0xdeadbeef, "%u: wrong info %lx\n", class, U(io).Information );
- ok(data[0] == 0x55555555, "%u: wrong offset %x\n", class, data[0] );
+ ok( U(io).Status == 0xdeadbeef, "%u: wrong status %lx\n", class, U(io).Status );
+ ok( U(io).Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, U(io).Information );
+ ok(data[0] == 0x55555555, "%u: wrong offset %lx\n", class, data[0] );
switch (class)
{
@@ -366,11 +367,11 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
case FileObjectIdInformation:
case FileQuotaInformation:
case FileReparsePointInformation:
- ok( status == STATUS_INFO_LENGTH_MISMATCH, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INFO_LENGTH_MISMATCH, "%u: wrong status %lx\n", class, status );
break;
default:
ok( status == STATUS_INVALID_INFO_CLASS || status == STATUS_NOT_IMPLEMENTED,
- "%u: wrong status %x\n", class, status );
+ "%u: wrong status %lx\n", class, status );
continue;
}
@@ -380,16 +381,16 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
class, FALSE, mask, TRUE );
if (status == STATUS_BUFFER_OVERFLOW)
{
- ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, U(io).Status );
+ ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, U(io).Status );
ok( U(io).Information == data_size || broken(!U(io).Information), /* win10 1709 */
- "%u: wrong info %lx\n", class, U(io).Information );
- if (U(io).Information) ok(data[0] == 0, "%u: wrong offset %x\n", class, data[0] );
+ "%u: wrong info %Ix\n", class, U(io).Information );
+ if (U(io).Information) ok(data[0] == 0, "%u: wrong offset %lx\n", class, data[0] );
}
else
{
- ok( U(io).Status == 0xdeadbeef, "%u: wrong status %x\n", class, U(io).Status );
- ok( U(io).Information == 0xdeadbeef, "%u: wrong info %lx\n", class, U(io).Information );
- ok(data[0] == 0x55555555, "%u: wrong offset %x\n", class, data[0] );
+ ok( U(io).Status == 0xdeadbeef, "%u: wrong status %lx\n", class, U(io).Status );
+ ok( U(io).Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, U(io).Information );
+ ok(data[0] == 0x55555555, "%u: wrong offset %lx\n", class, data[0] );
}
if (status != STATUS_INFO_LENGTH_MISMATCH) break;
}
@@ -397,50 +398,50 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
switch (class)
{
case FileDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileFullDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_FULL_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileBothDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileNamesInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_NAMES_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileIdBothDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_ID_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileIdFullDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_ID_FULL_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileIdGlobalTxDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_ID_GLOBAL_TX_DIR_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileObjectIdInformation:
- ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %lx\n", class, status );
ok( data_size == sizeof(FILE_OBJECTID_INFORMATION), "%u: wrong size %u\n", class, data_size );
break;
case FileQuotaInformation:
- ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %lx\n", class, status );
ok( data_size == sizeof(FILE_QUOTA_INFORMATION), "%u: wrong size %u\n", class, data_size );
break;
case FileReparsePointInformation:
- ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %lx\n", class, status );
ok( data_size == sizeof(FILE_REPARSE_POINT_INFORMATION), "%u: wrong size %u\n", class, data_size );
break;
}
@@ -504,16 +505,16 @@ static void test_NtQueryDirectoryFile(void)
return;
}
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart));
pos_info.CurrentByteOffset.QuadPart = 0xbeef;
status = pNtSetInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart));
@@ -523,12 +524,12 @@ static void test_NtQueryDirectoryFile(void)
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
- ok(status == STATUS_SUCCESS, "failed to query directory; status %x\n", status);
- ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
+ ok(status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
+ ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
ok(fbdi->ShortName[0], "ShortName is empty\n");
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart) );
@@ -539,17 +540,17 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok(status == STATUS_SUCCESS, "failed to query directory status %x\n", status);
- ok(U(io).Status == STATUS_SUCCESS, "failed to query directory status %x\n", U(io).Status);
+ ok(status == STATUS_SUCCESS, "failed to query directory status %lx\n", status);
+ ok(U(io).Status == STATUS_SUCCESS, "failed to query directory status %lx\n", U(io).Status);
ok(U(io).Information == offsetof(FILE_BOTH_DIRECTORY_INFORMATION, FileName[lstrlenW(testfiles[0].name)]),
- "wrong info %lx\n", U(io).Information);
+ "wrong info %Ix\n", U(io).Information);
ok(fbdi->FileNameLength == lstrlenW(testfiles[0].name)*sizeof(WCHAR) &&
!memcmp(fbdi->FileName, testfiles[0].name, fbdi->FileNameLength),
"incorrect long file name: %s\n", wine_dbgstr_wn(fbdi->FileName,
fbdi->FileNameLength/sizeof(WCHAR)));
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart) );
@@ -560,16 +561,16 @@ static void test_NtQueryDirectoryFile(void)
data_size = offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] );
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size || broken( U(io).Information == 0),
- "wrong info %lx\n", U(io).Information );
+ "wrong info %Ix\n", U(io).Information );
ok( fbdi->NextEntryOffset == 0 || fbdi->NextEntryOffset == 0x55555555, /* win10 >= 1709 */
- "wrong offset %x\n", fbdi->NextEntryOffset );
+ "wrong offset %lx\n", fbdi->NextEntryOffset );
if (!fbdi->NextEntryOffset)
{
ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name) * sizeof(WCHAR),
- "wrong length %x\n", fbdi->FileNameLength );
+ "wrong length %lx\n", fbdi->FileNameLength );
ok( filename[0] == testfiles[0].name[0], "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
ok( filename[1] == 0x5555, "incorrect long file name: %s\n",
@@ -584,8 +585,8 @@ static void test_NtQueryDirectoryFile(void)
data_size = offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[256] );
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok( status == STATUS_SUCCESS || status == STATUS_NO_MORE_FILES, "wrong status %x\n", status );
- ok( U(io).Status == status, "wrong status %x / %x\n", U(io).Status, status );
+ ok( status == STATUS_SUCCESS || status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status );
+ ok( U(io).Status == status, "wrong status %lx / %lx\n", U(io).Status, status );
if (!status)
ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name)*sizeof(WCHAR) &&
!memcmp(fbdi->FileName, testfiles[0].name, fbdi->FileNameLength),
@@ -604,18 +605,18 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE);
- ok(status == STATUS_SUCCESS, "wrong status %x\n", status);
- ok(U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status);
- ok(U(io).Information > 0 && U(io).Information < data_size, "wrong info %lx\n", U(io).Information);
+ ok(status == STATUS_SUCCESS, "wrong status %lx\n", status);
+ ok(U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status);
+ ok(U(io).Information > 0 && U(io).Information < data_size, "wrong info %Ix\n", U(io).Information);
ok( fbdi->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
- "wrong offset %x\n", fbdi->NextEntryOffset );
- ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %x\n", fbdi->FileNameLength );
+ "wrong offset %lx\n", fbdi->NextEntryOffset );
+ ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
next = (FILE_BOTH_DIRECTORY_INFORMATION *)(data + fbdi->NextEntryOffset);
ok( next->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] ) + 7) & ~7),
- "wrong offset %x\n", next->NextEntryOffset );
- ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %x\n", next->FileNameLength );
+ "wrong offset %lx\n", next->NextEntryOffset );
+ ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %lx\n", next->FileNameLength );
filename = next->FileName;
ok( filename[0] == '.' && filename[1] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(next->FileName, next->FileNameLength/sizeof(WCHAR)));
@@ -626,16 +627,16 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
- "wrong info %lx\n", U(io).Information );
- ok( fbdi->NextEntryOffset == 0, "wrong offset %x\n", fbdi->NextEntryOffset );
- ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %x\n", fbdi->FileNameLength );
+ "wrong info %Ix\n", U(io).Information );
+ ok( fbdi->NextEntryOffset == 0, "wrong offset %lx\n", fbdi->NextEntryOffset );
+ ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
next = (FILE_BOTH_DIRECTORY_INFORMATION *)&fbdi->FileName[1];
- ok( next->NextEntryOffset == 0x55555555, "wrong offset %x\n", next->NextEntryOffset );
+ ok( next->NextEntryOffset == 0x55555555, "wrong offset %lx\n", next->NextEntryOffset );
data_size = fbdi->NextEntryOffset + offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] );
memset( data, 0x55, data_size );
@@ -643,11 +644,11 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
- "wrong info %lx\n", U(io).Information );
- ok( fbdi->NextEntryOffset == 0, "wrong offset %x\n", fbdi->NextEntryOffset );
+ "wrong info %Ix\n", U(io).Information );
+ ok( fbdi->NextEntryOffset == 0, "wrong offset %lx\n", fbdi->NextEntryOffset );
data_size = ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7) +
offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] );
@@ -656,18 +657,18 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, (data_size + 7) & ~7,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size || U(io).Information == ((data_size + 7) & ~7),
- "wrong info %lx / %x\n", U(io).Information, data_size );
+ "wrong info %Ix / %x\n", U(io).Information, data_size );
ok( fbdi->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
- "wrong offset %x\n", fbdi->NextEntryOffset );
- ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %x\n", fbdi->FileNameLength );
+ "wrong offset %lx\n", fbdi->NextEntryOffset );
+ ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
next = (FILE_BOTH_DIRECTORY_INFORMATION *)(data + fbdi->NextEntryOffset);
- ok( next->NextEntryOffset == 0, "wrong offset %x\n", next->NextEntryOffset );
- ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %x\n", next->FileNameLength );
+ ok( next->NextEntryOffset == 0, "wrong offset %lx\n", next->NextEntryOffset );
+ ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %lx\n", next->FileNameLength );
filename = next->FileName;
ok( filename[0] == '.' && filename[1] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(next->FileName, next->FileNameLength/sizeof(WCHAR)));
@@ -679,18 +680,18 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileNamesInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
- ok( U(io).Information == data_size, "wrong info %lx / %x\n", U(io).Information, data_size );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
+ ok( U(io).Information == data_size, "wrong info %Ix / %x\n", U(io).Information, data_size );
names = (FILE_NAMES_INFORMATION *)data;
ok( names->NextEntryOffset == ((offsetof( FILE_NAMES_INFORMATION, FileName[1] ) + 7) & ~7),
- "wrong offset %x\n", names->NextEntryOffset );
- ok( names->FileNameLength == sizeof(WCHAR), "wrong length %x\n", names->FileNameLength );
+ "wrong offset %lx\n", names->NextEntryOffset );
+ ok( names->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", names->FileNameLength );
ok( names->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(names->FileName, names->FileNameLength/sizeof(WCHAR)));
names = (FILE_NAMES_INFORMATION *)(data + names->NextEntryOffset);
- ok( names->NextEntryOffset == 0, "wrong offset %x\n", names->NextEntryOffset );
- ok( names->FileNameLength == 2 * sizeof(WCHAR), "wrong length %x\n", names->FileNameLength );
+ ok( names->NextEntryOffset == 0, "wrong offset %lx\n", names->NextEntryOffset );
+ ok( names->FileNameLength == 2 * sizeof(WCHAR), "wrong length %lx\n", names->FileNameLength );
filename = names->FileName;
ok( filename[0] == '.' && filename[1] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(names->FileName, names->FileNameLength/sizeof(WCHAR)));
@@ -707,28 +708,28 @@ static void test_NtQueryDirectoryFile(void)
data_size = sizeof(data);
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok(status == STATUS_NO_SUCH_FILE, "wrong status %x\n", status);
- ok(U(io).Status == 0xdeadbeef, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_NO_SUCH_FILE, "wrong status %lx\n", status);
+ ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, FALSE);
- ok(status == STATUS_NO_MORE_FILES, "wrong status %x\n", status);
- ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status);
+ ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", U(io).Status);
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE);
- ok(status == STATUS_NO_MORE_FILES, "wrong status %x\n", status);
- ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status);
+ ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", U(io).Status);
pNtClose(dirh);
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( (HANDLE)0xbeef, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE );
- ok(status == STATUS_INVALID_HANDLE, "wrong status %x\n", status);
- ok(U(io).Status == 0xdeadbeef, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status);
+ ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
GetModuleFileNameA( 0, buffer, sizeof(buffer) );
h = CreateFileA( buffer, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
@@ -737,8 +738,8 @@ static void test_NtQueryDirectoryFile(void)
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( h, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE );
- ok(status == STATUS_INVALID_PARAMETER, "wrong status %x\n", status);
- ok(U(io).Status == 0xdeadbeef, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_INVALID_PARAMETER, "wrong status %lx\n", status);
+ ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
CloseHandle ( h );
}
@@ -755,7 +756,7 @@ static void set_up_case_test(const char *testdir)
HANDLE h;
ret = CreateDirectoryA(testdir, NULL);
- ok(ret, "couldn't create dir '%s', error %d\n", testdir, GetLastError());
+ ok(ret, "couldn't create dir '%s', error %ld\n", testdir, GetLastError());
sprintf(buf, "%s\\%s", testdir, "TesT");
h = CreateFileA(buf, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
@@ -772,7 +773,7 @@ static void tear_down_case_test(const char *testdir)
sprintf(buf, "%s\\%s", testdir, "TesT");
ret = DeleteFileA(buf);
ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND),
- "Failed to rm %s, error %d\n", buf, GetLastError());
+ "Failed to rm %s, error %ld\n", buf, GetLastError());
RemoveDirectoryA(testdir);
}
@@ -814,7 +815,7 @@ static void test_NtQueryDirectoryFile_case(void)
status = pNtOpenFile(&dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, &attr, &io, FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT | FILE_DIRECTORY_FILE);
- ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdir, status, GetLastError());
+ ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%lx, error %ld\n", testdir, status, GetLastError());
if (status != STATUS_SUCCESS)
{
skip("can't test if we can't open the directory\n");
@@ -825,14 +826,14 @@ static void test_NtQueryDirectoryFile_case(void)
mask.Length = mask.MaximumLength = sizeof(testmask);
pNtQueryDirectoryFile(dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
- ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
+ ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
data_len = io.Information;
ok(data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
name = dir_info->FileName;
name_len = dir_info->FileNameLength / sizeof(WCHAR);
- ok(name_len == testfile_len, "unexpected filename length %u\n", name_len);
+ ok(name_len == testfile_len, "unexpected filename length %lu\n", name_len);
ok(!memcmp(name, testfile_w, testfile_len * sizeof(WCHAR)), "unexpected filename %s\n",
wine_dbgstr_wn(name, name_len));
@@ -894,7 +895,7 @@ static void test_redirection(void)
skip( "Wow64 redirection not supported\n" );
return;
}
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
#ifndef _WIN64
if (NtCurrentTeb()->GdiBatchCount)
@@ -902,46 +903,46 @@ static void test_redirection(void)
#endif
status = pRtlWow64EnableFsRedirectionEx( FALSE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( !cur, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( !cur, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == FALSE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == TRUE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirection( TRUE );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( !cur, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( !cur, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == TRUE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( 123, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == TRUE, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == TRUE, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == 123, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( 0xdeadbeef, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == 123, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == 123, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == 0xdeadbeef, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( TRUE, NULL );
- ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status );
+ ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, (void*)1 );
- ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status );
+ ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, (void*)0xDEADBEEF );
- ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status );
+ ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %lx\n", status );
status = pRtlWow64EnableFsRedirection( FALSE );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( FALSE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == FALSE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
if (tls64)
@@ -993,13 +994,13 @@ static void test_redirection(void)
pRtlWow64EnableFsRedirection( FALSE );
status = get_file_id( &info, tests[i].root, tests[i].name );
ok( !status || status == tests[i].expect || (tests[i].alt && status == tests[i].alt),
- "%u: got %x / %x for %s + %s without redirect\n", i, status, tests[i].expect,
+ "%u: got %lx / %lx for %s + %s without redirect\n", i, status, tests[i].expect,
debugstr_w( tests[i].root ), debugstr_w( tests[i].name ));
if (status) memset( &info, 0xcc, sizeof(info) );
pRtlWow64EnableFsRedirection( TRUE );
status = get_file_id( &info_redir, tests[i].root, tests[i].name );
ok( status == tests[i].expect || (tests[i].alt && status == tests[i].alt),
- "%u: got %x / %x for %s + %s\n", i, status, tests[i].expect,
+ "%u: got %lx / %lx for %s + %s\n", i, status, tests[i].expect,
debugstr_w( tests[i].root ), debugstr_w( tests[i].name ));
if (!status)
{
1
0
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/change.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/change.c b/dlls/ntdll/tests/change.c
index e7201b52a3c..89e319bccd7 100644
--- a/dlls/ntdll/tests/change.c
+++ b/dlls/ntdll/tests/change.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <ntstatus.h>
#define WIN32_NO_STATUS
@@ -301,9 +302,9 @@ static void test_ntncdf_async(void)
CloseHandle(hdir);
- ok(U(iosb).Status == STATUS_CANCELLED, "status wrong %x\n",U(iosb).Status);
- ok(U(iosb2).Status == STATUS_CANCELLED, "status wrong %x\n",U(iosb2).Status);
- ok(U(iosb3).Status == STATUS_SUCCESS, "status wrong %x\n",U(iosb3).Status);
+ ok(U(iosb).Status == STATUS_CANCELLED, "status wrong %lx\n",U(iosb).Status);
+ ok(U(iosb2).Status == STATUS_CANCELLED, "status wrong %lx\n",U(iosb2).Status);
+ ok(U(iosb3).Status == STATUS_SUCCESS, "status wrong %lx\n",U(iosb3).Status);
ok(iosb.Information == 0, "info wrong\n");
ok(iosb2.Information == 0, "info wrong\n");
@@ -312,8 +313,8 @@ static void test_ntncdf_async(void)
U(iosb3).Status = 0x111111;
iosb3.Information = 0x222222;
r = pNtCancelIoFile(hdir, &iosb3);
- ok( r == STATUS_INVALID_HANDLE, "cancel failed %x\n", r);
- ok(U(iosb3).Status == 0x111111, "status wrong %x\n",U(iosb3).Status);
+ ok( r == STATUS_INVALID_HANDLE, "cancel failed %lx\n", r);
+ ok(U(iosb3).Status == 0x111111, "status wrong %lx\n",U(iosb3).Status);
ok(iosb3.Information == 0x222222, "info wrong\n");
r = RemoveDirectoryW( path );
1
0
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/atom.c | 187 ++++++++++++++++++++++++-----------------------
1 file changed, 94 insertions(+), 93 deletions(-)
diff --git a/dlls/ntdll/tests/atom.c b/dlls/ntdll/tests/atom.c
index 6bb789867bf..f93194d450f 100644
--- a/dlls/ntdll/tests/atom.c
+++ b/dlls/ntdll/tests/atom.c
@@ -20,6 +20,7 @@
* We use function pointers here as there is no import library for NTDLL on
* windows.
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
#include <stdarg.h>
@@ -100,30 +101,30 @@ static DWORD WINAPI RtlAtomTestThread(LPVOID Table)
WCHAR Name[64];
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to find atom from another thread, retval: %x\n", res);
+ ok(!res, "Unable to find atom from another thread, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &Atom);
- ok(!res, "Unable to lookup pinned atom in table, retval: %x\n", res);
+ ok(!res, "Unable to lookup pinned atom in table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len);
- ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %x\n", res);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Failed with long enough buffer, retval: %x\n", res);
- ok(RefCount == 1, "Refcount was not 1 but %x\n", RefCount);
- ok(PinCount == 1, "Pincount was not 1 but %x\n", PinCount);
+ ok(!res, "Failed with long enough buffer, retval: %lx\n", res);
+ ok(RefCount == 1, "Refcount was not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "Pincount was not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom!!\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, NULL, NULL, Name, &Len);
- ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %x\n", res);
+ ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %lx\n", res);
ok(!lstrcmpW(Name, testAtom2), "Found Wrong atom!\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
return 0;
}
@@ -145,39 +146,39 @@ static void test_NtAtom(void)
if (!res)
{
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %x\n", res);
+ ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res);
+ ok(!res, "We're unable to create an atom table with a valid table size retval: %lx\n", res);
if (!res)
{
- ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %x\n", *(DWORD *)AtomTable );
+ ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %lx\n", *(DWORD *)AtomTable );
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res);
+ ok(!res, "We were unable to add a simple atom to the atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Cap, &testAtom);
- ok(!res, "We were unable to find capital version of the atom, retval: %x\n", res);
+ ok(!res, "We were unable to find capital version of the atom, retval: %lx\n", res);
ok(Atom1 == testAtom, "Found wrong atom in table when querying capital atom\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Low, &testAtom);
- ok(!res, "Unable to find lowercase version of the atom, retval: %x\n", res);
+ ok(!res, "Unable to find lowercase version of the atom, retval: %lx\n", res);
ok(testAtom == Atom1, "Found wrong atom when querying lowercase atom\n");
res = pRtlAddAtomToAtomTable(AtomTable, EmptyAtom, &testEAtom);
- ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Failed to find totally legitimate atom, retval: %x\n", res);
+ ok(!res, "Failed to find totally legitimate atom, retval: %lx\n", res);
ok(testAtom == Atom1, "Found wrong atom!\n");
res = pRtlAddAtomToAtomTable(AtomTable, testAtom2, &Atom2);
- ok(!res, "Unable to add other legitimate atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add other legitimate atom to table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom2);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
testThread = CreateThread(NULL, 0, RtlAtomTestThread, &AtomTable, 0, NULL);
WaitForSingleObject(testThread, INFINITE);
@@ -185,28 +186,28 @@ static void test_NtAtom(void)
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount);
- ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
res = pRtlEmptyAtomTable(AtomTable, FALSE);
- ok(!res, "Unable to empty atom table, retval %x\n", res);
+ ok(!res, "Unable to empty atom table, retval %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len);
- ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %x\n", res);
- ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount);
- ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount);
+ ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %lx\n", res);
+ ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
Len = 8;
Name[0] = Name[1] = Name[2] = Name[3] = Name[4] = 0x1337;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, NULL, NULL, Name, &Len);
- ok(!res, "query atom %x\n", res);
- ok(Len == 6, "wrong length %u\n", Len);
+ ok(!res, "query atom %lx\n", res);
+ ok(Len == 6, "wrong length %lu\n", Len);
ok(!memcmp(Name, testAtom2, Len), "wrong atom string\n");
ok(!Name[3], "wrong string termination\n");
ok(Name[4] == 0x1337, "buffer overwrite\n");
@@ -214,75 +215,75 @@ static void test_NtAtom(void)
Len = lstrlenW(testAtom2) * sizeof(WCHAR);
memset(Name, '.', sizeof(Name));
res = pRtlQueryAtomInAtomTable( AtomTable, Atom2, NULL, NULL, Name, &Len );
- ok(!res, "query atom %x\n", res);
- ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %u\n", Len);
+ ok(!res, "query atom %lx\n", res);
+ ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %lu\n", Len);
ok(!memcmp(testAtom2, Name, (lstrlenW(testAtom2) - 1) * sizeof(WCHAR)), "wrong atom name\n");
ok(Name[lstrlenW(testAtom2) - 1] == '\0', "wrong char\n");
ok(Name[lstrlenW(testAtom2)] == ('.' << 8) + '.', "wrong char\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom);
- ok(!res, "We can't find our pinned atom!! retval: %x\n", res);
+ ok(!res, "We can't find our pinned atom!! retval: %lx\n", res);
ok(testAtom == Atom2, "We found wrong atom!!!\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom3, &Atom3);
- ok(!res, "Unable to add atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add atom to table, retval: %lx\n", res);
res = pRtlEmptyAtomTable(AtomTable, TRUE);
- ok(!res, "Unable to empty atom table, retval: %x\n", res);
+ ok(!res, "Unable to empty atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom3, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %lx\n", res);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Can't destroy atom table, retval: %x\n", res);
+ ok(!res, "Can't destroy atom table, retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, retval: %x\n", res);
+ ok(!res, "Unable to create atom table, retval: %lx\n", res);
if (!res)
{
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "Unable to add atom to atom table, retval %x\n", res);
+ ok(!res, "Unable to add atom to atom table, retval %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Can't find previously added atom in table, retval: %x\n", res);
- ok(testAtom == Atom1, "Found wrong atom! retval: %x\n", res);
+ ok(!res, "Can't find previously added atom in table, retval: %lx\n", res);
+ ok(testAtom == Atom1, "Found wrong atom! retval: %lx\n", res);
res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1);
- ok(!res, "Unable to delete atom from table, retval: %x\n", res);
+ ok(!res, "Unable to delete atom from table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "Unable to add atom to atom table, retval: %x\n", res);
+ ok(!res, "Unable to add atom to atom table, retval: %lx\n", res);
Len = 0;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len);
- ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %x\n", res);
- ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %x\n", Len);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %lx\n", res);
+ ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %lx\n", Len);
if (!Len) pNtAddAtomNT4 = (void *)pNtAddAtom;
res = pRtlPinAtomInAtomTable(AtomTable, Atom1);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Unable to find atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to find atom in atom table, retval: %lx\n", res);
ok(testAtom == Atom1, "Wrong atom found\n");
res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1);
- ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %x\n", res);
+ ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
ok(!res, "Able to find deleted atom in table\n");
@@ -305,82 +306,82 @@ static void test_NtIntAtom(void)
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
/* According to the kernel32 functions, integer atoms are only allowed from
* 0x0001 to 0xbfff and not 0xc000 to 0xffff, which is correct */
res = pRtlAddAtomToAtomTable(AtomTable, NULL, &testAtom);
- ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %lx\n", res);
for (i = 1; i <= 0xbfff; i++)
{
res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(!res, "Unable to add valid integer atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to add valid integer atom %Ii, retval: %lx\n", i, res);
}
for (i = 1; i <= 0xbfff; i++)
{
res = pRtlLookupAtomInAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(!res, "Unable to find int atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to find int atom %Ii, retval: %lx\n", i, res);
if (!res)
{
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to pin int atom %Ii, retval: %lx\n", i, res);
}
}
for (i = 0xc000; i <= 0xffff; i++)
{
res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(res, "Able to illeageal integer atom %li, retval: %x\n", i, res);
+ ok(res, "Able to illeageal integer atom %Ii, retval: %lx\n", i, res);
}
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtomInt, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtomIntInv, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to re-add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to re-add int atom to table, retval: %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount);
ok(!lstrcmpW(testAtomOTT, Name), "Got wrong atom name\n");
- ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %d\n", Len);
+ ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %ld\n", Len);
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom, retval: %x\n", res);
+ ok(!res, "Unable to pin int atom, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom, retval: %x\n", res);
+ ok(!res, "Unable to pin int atom, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
}
@@ -394,40 +395,40 @@ static void test_NtRefPinAtom(void)
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 0, "Expected pincount 0 but got %x\n", PinCount);
- ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 0, "Expected pincount 0 but got %lx\n", PinCount);
+ ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
}
@@ -444,7 +445,7 @@ static void test_Global(void)
else
res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom);
- ok(!res, "Added atom (%x)\n", res);
+ ok(!res, "Added atom (%lx)\n", res);
memset( ptr, 0xcc, sizeof(ptr) );
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
@@ -456,14 +457,14 @@ static void test_Global(void)
ptr_size = sizeof(ATOM_BASIC_INFORMATION);
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
- ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%x)\n", res);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%lx)\n", res);
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR) || broken(abi->NameLength == sizeof(WCHAR)), /* nt4 */
"string length %u\n",abi->NameLength);
memset( ptr, 0xcc, sizeof(ptr) );
ptr_size = sizeof(ATOM_BASIC_INFORMATION) + lstrlenW(testAtom1) * sizeof(WCHAR);
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
- ok(!res, "atom lookup %x\n", res);
+ ok(!res, "atom lookup %lx\n", res);
ok(!lstrcmpW(abi->Name, testAtom1), "strings don't match\n");
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n");
ok(abi->Name[lstrlenW(testAtom1)] == 0, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1)]);
1
0