Author: tfaber
Date: Thu Feb 19 12:55:57 2015
New Revision: 66351
URL:
http://svn.reactos.org/svn/reactos?rev=66351&view=rev
Log:
[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
Modified:
trunk/rostests/kmtests/include/kmt_platform.h
trunk/rostests/kmtests/rtl/RtlException.c
Modified: trunk/rostests/kmtests/include/kmt_platform.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/include/kmt_platf…
==============================================================================
--- trunk/rostests/kmtests/include/kmt_platform.h [iso-8859-1] (original)
+++ trunk/rostests/kmtests/include/kmt_platform.h [iso-8859-1] Thu Feb 19 12:55:57 2015
@@ -55,6 +55,7 @@
#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 */
Modified: trunk/rostests/kmtests/rtl/RtlException.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlException.…
==============================================================================
--- trunk/rostests/kmtests/rtl/RtlException.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/rtl/RtlException.c [iso-8859-1] Thu Feb 19 12:55:57 2015
@@ -5,6 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
+#define KMT_EMULATE_KERNEL
#include <kmt_test.h>
START_TEST(RtlException)
@@ -39,13 +40,29 @@
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)
{