[PATCH v3 4/4] kernel32/tests: Test std handle inheritance in test_parent_process_attribute().

Paul Gofman gofmanp at gmail.com
Fri Dec 13 06:08:57 CST 2019

On 12/13/19 14:21, Alexandre Julliard wrote:
> Paul Gofman <gofmanp at gmail.com> writes:
>> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
>> ---
>>     v2:
>>         - added test;
>>     v3:
>>         - no changes.
>>  dlls/kernel32/tests/process.c | 55 ++++++++++++++++++++++++++++-------
>>  1 file changed, 45 insertions(+), 10 deletions(-)
> This fails here:
> ../../../tools/runtest -q -P wine -T ../../.. -M kernel32.dll -p kernel32_test.exe process && touch process.ok
> process.c:3893: Test failed: Unexpected hstderr 0000005F, creator_hstdhandle 0000005C.
> process.c:4027: Test failed: Child test failed, exit_code 0x1.
> process.c:4027: Test failed: Child test failed, exit_code 0x1.
> make: *** [Makefile:720: process.ok] Error 1
I guess the handle gets different value in
ntdll/env.c:init_user_process_params() in this case:


        if (!isatty(2))
            wine_server_fd_to_handle( 2, GENERIC_WRITE|SYNCHRONIZE,
OBJ_INHERIT, &params->hStdError );

On Windows I just get always the same value for handle there (or if I
get the handle by GetStdHandle()), and if it is a handle of creator
process (not the specified parent) it is either invalid or accidentally
equals to some other object's handle inherited from the parent process.
It looks like std handles management differes in Wine in a few places
regardless of the parent substitution. I thought the test is stable in
this form but it is apparently isn't.

Maybe we can just drop this last patch in the series for now?

More information about the wine-devel mailing list