mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
[KMTESTS/EX]
- Work around compiler-specific false positives in ExInterlocked - Disable broken ExPools tests svn path=/trunk/; revision=56154
This commit is contained in:
parent
88091ae0cd
commit
d0231c12c2
2 changed files with 8 additions and 4 deletions
|
@ -63,7 +63,8 @@ typedef int PROCESSOR_STATE;
|
||||||
|
|
||||||
#define CheckState(OldState, NewState) do \
|
#define CheckState(OldState, NewState) do \
|
||||||
{ \
|
{ \
|
||||||
ok_eq_hex((OldState)->esi, (NewState)->esi); \
|
/* TODO: MSVC uses esi and saves it before, so this is okay */ \
|
||||||
|
/*ok_eq_hex((OldState)->esi, (NewState)->esi);*/ \
|
||||||
ok_eq_hex((OldState)->edi, (NewState)->edi); \
|
ok_eq_hex((OldState)->edi, (NewState)->edi); \
|
||||||
ok_eq_hex((OldState)->ebx, (NewState)->ebx); \
|
ok_eq_hex((OldState)->ebx, (NewState)->ebx); \
|
||||||
ok_eq_hex((OldState)->ebp, (NewState)->ebp); \
|
ok_eq_hex((OldState)->ebp, (NewState)->ebp); \
|
||||||
|
@ -87,7 +88,8 @@ typedef int PROCESSOR_STATE;
|
||||||
{ \
|
{ \
|
||||||
ok_eq_hex((OldState)->esi, (NewState)->esi); \
|
ok_eq_hex((OldState)->esi, (NewState)->esi); \
|
||||||
ok_eq_hex((OldState)->edi, (NewState)->edi); \
|
ok_eq_hex((OldState)->edi, (NewState)->edi); \
|
||||||
ok_eq_hex((OldState)->ebx, (NewState)->ebx); \
|
/* TODO: GCC uses ebx and saves it before, so this is okay */ \
|
||||||
|
/*ok_eq_hex((OldState)->ebx, (NewState)->ebx);*/ \
|
||||||
ok_eq_hex((OldState)->ebp, (NewState)->ebp); \
|
ok_eq_hex((OldState)->ebp, (NewState)->ebp); \
|
||||||
ok_eq_hex((OldState)->esp, (NewState)->esp); \
|
ok_eq_hex((OldState)->esp, (NewState)->esp); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
* PROGRAMMER: Aleksey Bragin <aleksey@reactos.org>
|
* PROGRAMMER: Aleksey Bragin <aleksey@reactos.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* TODO: PoolsCorruption tests fail because accessing invalid memory doesn't necessarily cause an access violation */
|
|
||||||
|
|
||||||
#include <kmt_test.h>
|
#include <kmt_test.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
@ -112,6 +110,9 @@ static VOID PoolsCorruption(VOID)
|
||||||
// touch all bytes, it shouldn't cause an exception
|
// touch all bytes, it shouldn't cause an exception
|
||||||
RtlZeroMemory(Ptr, AllocSize);
|
RtlZeroMemory(Ptr, AllocSize);
|
||||||
|
|
||||||
|
/* TODO: These fail because accessing invalid memory doesn't necessarily
|
||||||
|
cause an access violation */
|
||||||
|
#ifdef THIS_DOESNT_WORK
|
||||||
// test buffer overrun, right after our allocation ends
|
// test buffer overrun, right after our allocation ends
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
|
@ -139,6 +140,7 @@ static VOID PoolsCorruption(VOID)
|
||||||
} _SEH2_END;
|
} _SEH2_END;
|
||||||
|
|
||||||
ok(Status == STATUS_ACCESS_VIOLATION, "Exception should occur, but got Status 0x%08lX\n", Status);
|
ok(Status == STATUS_ACCESS_VIOLATION, "Exception should occur, but got Status 0x%08lX\n", Status);
|
||||||
|
#endif
|
||||||
|
|
||||||
// free the pool
|
// free the pool
|
||||||
ExFreePoolWithTag(Ptr, TAG_POOLTEST);
|
ExFreePoolWithTag(Ptr, TAG_POOLTEST);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue