[PATCH] tests: Trace elapsed time when $WINETEST_TIME is set.

Alexandre Julliard julliard at winehq.org
Tue Dec 17 15:08:11 CST 2019


Francois Gouget <fgouget at codeweavers.com> writes:

> @@ -695,6 +721,18 @@ int main( int argc, char **argv )
>      if (GetEnvironmentVariableA( "WINETEST_DEBUG", p, sizeof(p) )) winetest_debug = atoi(p);
>      if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p);
>      if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) winetest_report_success = atoi(p);
> +    if (GetEnvironmentVariableA( "WINETEST_TIME", p, sizeof(p) )) winetest_time = atoi(p);
> +    if (GetEnvironmentVariableA( "WINETEST_START_TIME", p, sizeof(p) ))
> +        winetest_start_time = atoi(p);
> +    else
> +    {
> +        char time_str[11];
> +        winetest_start_time = GetTickCount();
> +        /* Export the test start time for child processes */
> +        sprintf( time_str, "%u", winetest_start_time );
> +        SetEnvironmentVariableA( "WINETEST_START_TIME", time_str );
> +    }

I don't think the test runtime should be modifying the environment. This
even breaks a test:

../../../tools/runtest -q -P wine -T ../../.. -M msvcrt.dll -p msvcrt_test.exe environ && touch environ.ok
environ.c:230: Test failed: Expected environment block pointer element to be non-NULL
wine: Unhandled page fault on read access to 00000000 at address 7EAFFB4D (thread 0044), starting debugger...

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list