Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/ntdll/tests/env.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c index 0c864fb2bc..43eac25fb4 100644 --- a/dlls/ntdll/tests/env.c +++ b/dlls/ntdll/tests/env.c @@ -330,8 +330,17 @@ static void test_process_params(void) WCHAR *str; UINT_PTR pos; MEMORY_BASIC_INFORMATION info; - NTSTATUS status = pRtlCreateProcessParameters( ¶ms, &image, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL ); + NTSTATUS status; + + ok( (char *)cur_params->CommandLine.Buffer > (char *)cur_params && + (char *)cur_params->CommandLine.Buffer < (char *)cur_params + cur_params->Size, + "params %p-%p, params->CommandLine.Buffer %p\n", + cur_params, (char *)cur_params + cur_params->Size, cur_params->CommandLine.Buffer); + size = ((char *)cur_params + cur_params->Size) - (char *)cur_params->CommandLine.Buffer; + ok(size > 180, "CommandLine size is too small (%lu bytes)\n", size); + + status = pRtlCreateProcessParameters( ¶ms, &image, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL ); ok( !status, "failed %x\n", status ); if (VirtualQuery( params, &info, sizeof(info) ) && info.AllocationBase == params) { @@ -398,6 +407,15 @@ static void test_process_params(void) broken( ((pos + 3) & ~3) == size ), "wrong size %lx/%lx\n", pos, size ); } else ok( broken(TRUE), "environment not inside block\n" ); /* <= win2k3 */ + + str = get_params_string( params, ¶ms->CommandLine ); + ok( (char *)str > (char *)params && + (char *)str < (char *)params + params->Size, + "params %p-%p, params->CommandLine.Buffer %p\n", + cur_params, (char *)cur_params + params->Size, str); + size = ((char *)cur_params + params->Size) - (char *)str; + ok(size > 180, "CommandLine size is too small (%lu bytes)\n", size); + pRtlDestroyProcessParameters( params );
status = pRtlCreateProcessParameters( ¶ms, &image, &dummy, &dummy, &dummy, dummy_env,
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=47429
Your paranoid android.
=== debian9 (32 bit Chinese:China report) ===
ntdll: pipe.c:1557: Test failed: pipe is not signaled