mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
add all test we can do for EngCreateSemaphore, it checking some info in the internal HANDLE hsem is same as PRTL_CRITICAL_SECTION struct
svn path=/trunk/; revision=33811
This commit is contained in:
parent
5047d04ffc
commit
457aee023d
1 changed files with 21 additions and 0 deletions
|
@ -18,8 +18,29 @@ Test_EngCreateSemaphore(PTESTINFO pti)
|
|||
RTEST (lpcrit->LockSemaphore == 0);
|
||||
RTEST (lpcrit->SpinCount == 0);
|
||||
|
||||
ASSERT(lpcrit->DebugInfo != NULL);
|
||||
RTEST (lpcrit->DebugInfo->Type == 0);
|
||||
RTEST (lpcrit->DebugInfo->CreatorBackTraceIndex == 0);
|
||||
RTEST (lpcrit->DebugInfo->EntryCount == 0);
|
||||
RTEST (lpcrit->DebugInfo->ContentionCount == 0);
|
||||
|
||||
EngDeleteSemaphore(hsem);
|
||||
|
||||
RTEST (lpcrit->DebugInfo != NULL);
|
||||
RTEST (lpcrit->LockCount > 0);
|
||||
RTEST (lpcrit->RecursionCount == 0);
|
||||
RTEST (lpcrit->OwningThread == 0);
|
||||
RTEST (lpcrit->LockSemaphore == 0);
|
||||
RTEST (lpcrit->SpinCount == 0);
|
||||
|
||||
ASSERT(lpcrit->DebugInfo != NULL);
|
||||
// my (magnus olsen) value I getting back in vista RTEST (lpcrit->DebugInfo->Type == 0xA478);
|
||||
RTEST (lpcrit->DebugInfo->Type != 0);
|
||||
RTEST (lpcrit->DebugInfo->CreatorBackTraceIndex != 0);
|
||||
RTEST (lpcrit->DebugInfo->EntryCount != 0);
|
||||
// my (magnus olsen) value I getting back RTEST in vista (lpcrit->DebugInfo->ContentionCount == 0x20000);
|
||||
RTEST (lpcrit->DebugInfo->ContentionCount != 0);
|
||||
|
||||
return APISTATUS_NORMAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue