@@ -3099,7 +3099,7 @@ static void test_crit_section(void)
30993099 to override that. */
31003100 memset (& cs , 0 , sizeof (cs ));
31013101 InitializeCriticalSection (& cs );
3102- ok (cs .DebugInfo != NULL , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3102+ todo_wine ok (cs .DebugInfo == ( void * )( ULONG_PTR ) -1 , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
31033103 DeleteCriticalSection (& cs );
31043104 ok (cs .DebugInfo == NULL , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
31053105
@@ -3109,10 +3109,31 @@ static void test_crit_section(void)
31093109 return ;
31103110 }
31113111
3112+ memset (& cs , 0 , sizeof (cs ));
3113+ ret = pInitializeCriticalSectionEx (& cs , 0 , 0 );
3114+ ok (ret , "Failed to initialize critical section.\n" );
3115+ ok (cs .DebugInfo == (void * )(ULONG_PTR )- 1 , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3116+ DeleteCriticalSection (& cs );
3117+ todo_wine ok (cs .DebugInfo == NULL, "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3118+
31123119 memset (& cs , 0 , sizeof (cs ));
31133120 ret = pInitializeCriticalSectionEx (& cs , 0 , CRITICAL_SECTION_NO_DEBUG_INFO );
31143121 ok (ret , "Failed to initialize critical section.\n" );
31153122 ok (cs .DebugInfo == (void * )(ULONG_PTR )- 1 , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3123+ DeleteCriticalSection (& cs );
3124+ todo_wine ok (cs .DebugInfo == NULL, "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3125+
3126+ memset (& cs , 0 , sizeof (cs ));
3127+ ret = pInitializeCriticalSectionEx (& cs , 0 , 0 );
3128+ ok (ret , "Failed to initialize critical section.\n" );
3129+ ok (cs .DebugInfo == (void * )(ULONG_PTR )- 1 , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3130+ DeleteCriticalSection (& cs );
3131+ todo_wine ok (cs .DebugInfo == NULL, "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
3132+
3133+ memset (& cs , 0 , sizeof (cs ));
3134+ ret = pInitializeCriticalSectionEx (& cs , 0 , RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO );
3135+ ok (ret , "Failed to initialize critical section.\n" );
3136+ ok (cs .DebugInfo && cs .DebugInfo != (void * )(ULONG_PTR )- 1 , "Unexpected debug info pointer %p.\n" , cs .DebugInfo );
31163137
31173138 ret = TryEnterCriticalSection (& cs );
31183139 ok (ret , "Failed to enter critical section.\n" );
0 commit comments