Commit c2a2f1ca authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll/tests: Check the default stack information against the exe header.

parent 45e83cc8
...@@ -579,6 +579,7 @@ static void CALLBACK simple2_cb(TP_CALLBACK_INSTANCE *instance, void *userdata) ...@@ -579,6 +579,7 @@ static void CALLBACK simple2_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
static void test_tp_simple(void) static void test_tp_simple(void)
{ {
IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress );
TP_POOL_STACK_INFORMATION stack_info; TP_POOL_STACK_INFORMATION stack_info;
TP_CALLBACK_ENVIRON environment; TP_CALLBACK_ENVIRON environment;
TP_CALLBACK_ENVIRON_V3 environment3; TP_CALLBACK_ENVIRON_V3 environment3;
...@@ -686,8 +687,8 @@ static void test_tp_simple(void) ...@@ -686,8 +687,8 @@ static void test_tp_simple(void)
/* test querying and setting the stack size */ /* test querying and setting the stack size */
status = pTpQueryPoolStackInformation(pool, &stack_info); status = pTpQueryPoolStackInformation(pool, &stack_info);
ok(!status, "TpQueryPoolStackInformation failed: %lx\n", status); ok(!status, "TpQueryPoolStackInformation failed: %lx\n", status);
ok(stack_info.StackReserve == 2 * 1024 * 1024, "expected default StackReserve, got %ld\n", (ULONG)stack_info.StackReserve); ok(stack_info.StackReserve == nt->OptionalHeader.SizeOfStackReserve, "expected default StackReserve, got %Ix\n", stack_info.StackReserve);
ok(stack_info.StackCommit == 4 * 1024, "expected default StackCommit, got %ld\n", (ULONG)stack_info.StackCommit); ok(stack_info.StackCommit == nt->OptionalHeader.SizeOfStackCommit, "expected default StackCommit, got %Ix\n", stack_info.StackCommit);
/* threadpool does not validate the stack size values */ /* threadpool does not validate the stack size values */
stack_info.StackReserve = stack_info.StackCommit = 1; stack_info.StackReserve = stack_info.StackCommit = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment