[KMTESTS:RTL]

- Add some simple tests for RtlRaiseStatus to the RtlException test
- Add missing volatile in (disabled) stack overflow test that caused an infinite loop on GCC builds
CORE-8773

svn path=/trunk/; revision=66351
This commit is contained in:
Thomas Faber 2015-02-19 12:55:57 +00:00
parent d6caab357b
commit c845f97fbf
2 changed files with 19 additions and 1 deletions

View file

@ -55,6 +55,7 @@ typedef ULONG LOGICAL, *PLOGICAL;
#define ExFreePoolWithTag(p, tag) HeapFree(GetProcessHeap(), 0, p)
#define RtlCopyMemoryNonTemporal RtlCopyMemory
#define RtlPrefetchMemoryNonTemporal(s, l)
#define ExRaiseStatus RtlRaiseStatus
#endif /* defined KMT_EMULATE_KERNEL */
#endif /* defined KMT_USER_MODE */

View file

@ -5,6 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
#define KMT_EMULATE_KERNEL
#include <kmt_test.h>
START_TEST(RtlException)
@ -39,13 +40,29 @@ START_TEST(RtlException)
KmtEndSeh(STATUS_ACCESS_VIOLATION);
#endif
KmtStartSeh()
ExRaiseStatus(STATUS_ACCESS_VIOLATION);
KmtEndSeh(STATUS_ACCESS_VIOLATION);
KmtStartSeh()
ExRaiseStatus(STATUS_TIMEOUT);
KmtEndSeh(STATUS_TIMEOUT);
KmtStartSeh()
ExRaiseStatus(STATUS_STACK_OVERFLOW);
KmtEndSeh(STATUS_STACK_OVERFLOW);
KmtStartSeh()
ExRaiseStatus(STATUS_GUARD_PAGE_VIOLATION);
KmtEndSeh(STATUS_GUARD_PAGE_VIOLATION);
/* We cannot test this in kernel mode easily - the stack is just "somewhere"
* in system space, and there's no guard page below it */
#if CORE_6640_IS_FIXED
#ifdef KMT_USER_MODE
/* Overflow the stack - must cause a special exception */
KmtStartSeh()
PCHAR Pointer;
volatile CHAR *Pointer;
while (1)
{