Author: tfaber
Date: Sat Sep 10 10:48:07 2011
New Revision: 53669
URL:
http://svn.reactos.org/svn/reactos?rev=53669&view=rev
Log:
[KMTESTS]
- Skip the remaining tests that result in assertions
- Hide KeProcessor test, as it takes very long
Modified:
branches/GSoC_2011/KMTestSuite/kmtests/kmtest_drv/testlist.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExFastMutex.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExResource.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_fsrtl/FsRtlExpression.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeApc.c
Modified: branches/GSoC_2011/KMTestSuite/kmtests/kmtest_drv/testlist.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/k…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/kmtest_drv/testlist.c [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/kmtest_drv/testlist.c [iso-8859-1] Sat Sep 10
10:48:07 2011
@@ -61,7 +61,7 @@
{ "KeEvent", Test_KeEvent },
{ "KeGuardedMutex", Test_KeGuardedMutex },
{ "KeIrql", Test_KeIrql },
- { "KeProcessor", Test_KeProcessor },
+ { "-KeProcessor", Test_KeProcessor },
{ "-KernelType", Test_KernelType },
{ "ObReference", Test_ObReference },
{ "ObType", Test_ObType },
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExFastMutex.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExFastMutex.c [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExFastMutex.c [iso-8859-1] Sat Sep 10
10:48:07 2011
@@ -52,12 +52,6 @@
ExiReleaseFastMutex(Mutex);
CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
- /* acquire/release unsafe */
- ExAcquireFastMutexUnsafe(Mutex);
- CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, OriginalIrql);
- ExReleaseFastMutexUnsafe(Mutex);
- CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
-
/* try to acquire */
ok_bool_true(ExTryToAcquireFastMutex(Mutex), "ExTryToAcquireFastMutex
returned");
CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
@@ -69,33 +63,45 @@
ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned");
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(Mutex);
- /* mismatched acquire/release */
- ExAcquireFastMutex(Mutex);
- CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
- ExReleaseFastMutexUnsafe(Mutex);
- CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, APC_LEVEL);
- KmtSetIrql(OriginalIrql);
- CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
-
- Mutex->OldIrql = 0x55555555LU;
- ExAcquireFastMutexUnsafe(Mutex);
- CheckMutex(Mutex, 0L, Thread, 0LU, 0x55555555LU, OriginalIrql);
- Mutex->OldIrql = PASSIVE_LEVEL;
- ExReleaseFastMutex(Mutex);
- CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, PASSIVE_LEVEL);
- KmtSetIrql(OriginalIrql);
- CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql);
-
- /* release without acquire */
- ExReleaseFastMutexUnsafe(Mutex);
- CheckMutex(Mutex, 2L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql);
- --Mutex->Count;
- Mutex->OldIrql = OriginalIrql;
- ExReleaseFastMutex(Mutex);
- CheckMutex(Mutex, 2L, NULL, 0LU, OriginalIrql, OriginalIrql);
- ExReleaseFastMutex(Mutex);
- CheckMutex(Mutex, 3L, NULL, 0LU, OriginalIrql, OriginalIrql);
- Mutex->Count -= 2;
+ /* acquire/release unsafe */
+ if (!KmtIsCheckedBuild || OriginalIrql == APC_LEVEL)
+ {
+ ExAcquireFastMutexUnsafe(Mutex);
+ CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, OriginalIrql);
+ ExReleaseFastMutexUnsafe(Mutex);
+ CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
+
+ /* mismatched acquire/release */
+ ExAcquireFastMutex(Mutex);
+ CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL);
+ ExReleaseFastMutexUnsafe(Mutex);
+ CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, APC_LEVEL);
+ KmtSetIrql(OriginalIrql);
+ CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql);
+
+ Mutex->OldIrql = 0x55555555LU;
+ ExAcquireFastMutexUnsafe(Mutex);
+ CheckMutex(Mutex, 0L, Thread, 0LU, 0x55555555LU, OriginalIrql);
+ Mutex->OldIrql = PASSIVE_LEVEL;
+ ExReleaseFastMutex(Mutex);
+ CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, PASSIVE_LEVEL);
+ KmtSetIrql(OriginalIrql);
+ CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql);
+ }
+
+ if (!KmtIsCheckedBuild)
+ {
+ /* release without acquire */
+ ExReleaseFastMutexUnsafe(Mutex);
+ CheckMutex(Mutex, 2L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql);
+ --Mutex->Count;
+ Mutex->OldIrql = OriginalIrql;
+ ExReleaseFastMutex(Mutex);
+ CheckMutex(Mutex, 2L, NULL, 0LU, OriginalIrql, OriginalIrql);
+ ExReleaseFastMutex(Mutex);
+ CheckMutex(Mutex, 3L, NULL, 0LU, OriginalIrql, OriginalIrql);
+ Mutex->Count -= 2;
+ }
/* make sure we survive this in case of error */
ok_eq_long(Mutex->Count, 1L);
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExResource.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExResource.c [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExResource.c [iso-8859-1] Sat Sep 10
10:48:07 2011
@@ -86,8 +86,9 @@
ok_bool_false(ExAcquireResourceExclusiveLite(Res, FALSE),
"ExAcquireResourceExclusiveLite returned");
CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU);
- /* this must not crash or deadlock (but can assert) */
- ExConvertExclusiveToSharedLite(Res);
+ /* this asserts */
+ if (!KmtIsCheckedBuild)
+ ExConvertExclusiveToSharedLite(Res);
CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU);
while (Count--)
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_fsrtl/FsRtlExpression.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_fsrtl/FsRtlExpression.c [iso-8859-1] Sat
Sep 10 10:48:07 2011
@@ -16,11 +16,15 @@
{
UNICODE_STRING Expression, Name;
- RtlInitUnicodeString(&Expression, L"*");
- RtlInitUnicodeString(&Name, L"");
- ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
- RtlInitUnicodeString(&Expression, L"");
- ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ /* !Name->Length || !Expression->Length asserts */
+ if (!KmtIsCheckedBuild)
+ {
+ RtlInitUnicodeString(&Expression, L"*");
+ RtlInitUnicodeString(&Name, L"");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ RtlInitUnicodeString(&Expression, L"");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
+ }
RtlInitUnicodeString(&Expression, L"ntdll.dll");
RtlInitUnicodeString(&Name, L".");
@@ -125,8 +129,11 @@
RtlInitUnicodeString(&Expression, L"*.?.c.d");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
RtlInitUnicodeString(&Expression, L"*?");
- RtlInitUnicodeString(&Name, L"");
- ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ if (!KmtIsCheckedBuild)
+ {
+ RtlInitUnicodeString(&Name, L"");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ }
RtlInitUnicodeString(&Name, L"a");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
RtlInitUnicodeString(&Name, L"aa");
@@ -134,8 +141,11 @@
RtlInitUnicodeString(&Name, L"aaa");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE,
"expected TRUE, got FALSE");
RtlInitUnicodeString(&Expression, L"?*?");
- RtlInitUnicodeString(&Name, L"");
- ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ if (!KmtIsCheckedBuild)
+ {
+ RtlInitUnicodeString(&Name, L"");
+ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
+ }
RtlInitUnicodeString(&Name, L"a");
ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE,
"expected FALSE, got TRUE");
RtlInitUnicodeString(&Name, L"aa");
@@ -166,11 +176,14 @@
{
ANSI_STRING Expression, Name;
- RtlInitAnsiString(&Expression, "*");
- RtlInitAnsiString(&Name, "");
- ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
- RtlInitAnsiString(&Expression, "");
- ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
+ if (!KmtIsCheckedBuild)
+ {
+ RtlInitAnsiString(&Expression, "*");
+ RtlInitAnsiString(&Name, "");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ RtlInitAnsiString(&Expression, "");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected
TRUE, got FALSE");
+ }
RtlInitAnsiString(&Expression, "ntdll.dll");
RtlInitAnsiString(&Name, ".");
@@ -275,8 +288,11 @@
RtlInitAnsiString(&Expression, "*.?.c.d");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
RtlInitAnsiString(&Expression, "*?");
- RtlInitAnsiString(&Name, "");
- ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ if (!KmtIsCheckedBuild)
+ {
+ RtlInitAnsiString(&Name, "");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ }
RtlInitAnsiString(&Name, "a");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
RtlInitAnsiString(&Name, "aa");
@@ -284,8 +300,11 @@
RtlInitAnsiString(&Name, "aaa");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE,
got FALSE");
RtlInitAnsiString(&Expression, "?*?");
- RtlInitAnsiString(&Name, "");
- ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ if (!KmtIsCheckedBuild)
+ {
+ RtlInitAnsiString(&Name, "");
+ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
+ }
RtlInitAnsiString(&Name, "a");
ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected
FALSE, got TRUE");
RtlInitAnsiString(&Name, "aa");
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeApc.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeApc.c [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeApc.c [iso-8859-1] Sat Sep 10
10:48:07 2011
@@ -71,24 +71,27 @@
CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
/* leave without entering */
- KeLeaveCriticalRegion();
- CheckApcs(1, 0, FALSE, PASSIVE_LEVEL);
- KeEnterCriticalRegion();
- CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ if (!KmtIsCheckedBuild)
+ {
+ KeLeaveCriticalRegion();
+ CheckApcs(1, 0, FALSE, PASSIVE_LEVEL);
+ KeEnterCriticalRegion();
+ CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
- KeLeaveGuardedRegion();
- CheckApcs(0, 1, TRUE, PASSIVE_LEVEL);
- KeEnterGuardedRegion();
- CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ KeLeaveGuardedRegion();
+ CheckApcs(0, 1, TRUE, PASSIVE_LEVEL);
+ KeEnterGuardedRegion();
+ CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
- KeLeaveCriticalRegion();
- CheckApcs(1, 0, FALSE, PASSIVE_LEVEL);
- KeLeaveGuardedRegion();
- CheckApcs(1, 1, TRUE, PASSIVE_LEVEL);
- KeEnterCriticalRegion();
- CheckApcs(0, 1, TRUE, PASSIVE_LEVEL);
- KeEnterGuardedRegion();
- CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ KeLeaveCriticalRegion();
+ CheckApcs(1, 0, FALSE, PASSIVE_LEVEL);
+ KeLeaveGuardedRegion();
+ CheckApcs(1, 1, TRUE, PASSIVE_LEVEL);
+ KeEnterCriticalRegion();
+ CheckApcs(0, 1, TRUE, PASSIVE_LEVEL);
+ KeEnterGuardedRegion();
+ CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ }
/* manually disable APCs */
Thread->KernelApcDisable = -1;
@@ -126,51 +129,58 @@
KeLeaveCriticalRegion();
CheckApcs(0, 0, TRUE, HIGH_LEVEL);
- KeEnterGuardedRegion();
- CheckApcs(0, -1, TRUE, HIGH_LEVEL);
- KeLeaveGuardedRegion();
+ /* Ke*GuardedRegion assert at > APC_LEVEL */
+ if (!KmtIsCheckedBuild)
+ {
+ KeEnterGuardedRegion();
+ CheckApcs(0, -1, TRUE, HIGH_LEVEL);
+ KeLeaveGuardedRegion();
+ }
CheckApcs(0, 0, TRUE, HIGH_LEVEL);
KeLowerIrql(Irql);
CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
- KeRaiseIrql(HIGH_LEVEL, &Irql);
- CheckApcs(0, 0, TRUE, HIGH_LEVEL);
- KeEnterCriticalRegion();
- CheckApcs(-1, 0, TRUE, HIGH_LEVEL);
- KeEnterGuardedRegion();
- CheckApcs(-1, -1, TRUE, HIGH_LEVEL);
- KeLowerIrql(Irql);
- CheckApcs(-1, -1, TRUE, PASSIVE_LEVEL);
- KeLeaveCriticalRegion();
- CheckApcs(0, -1, TRUE, PASSIVE_LEVEL);
- KeLeaveGuardedRegion();
- CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ if (!KmtIsCheckedBuild)
+ {
+ KeRaiseIrql(HIGH_LEVEL, &Irql);
+ CheckApcs(0, 0, TRUE, HIGH_LEVEL);
+ KeEnterCriticalRegion();
+ CheckApcs(-1, 0, TRUE, HIGH_LEVEL);
+ KeEnterGuardedRegion();
+ CheckApcs(-1, -1, TRUE, HIGH_LEVEL);
+ KeLowerIrql(Irql);
+ CheckApcs(-1, -1, TRUE, PASSIVE_LEVEL);
+ KeLeaveCriticalRegion();
+ CheckApcs(0, -1, TRUE, PASSIVE_LEVEL);
+ KeLeaveGuardedRegion();
+ CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
- KeEnterGuardedRegion();
- CheckApcs(0, -1, TRUE, PASSIVE_LEVEL);
- KeRaiseIrql(HIGH_LEVEL, &Irql);
- CheckApcs(0, -1, TRUE, HIGH_LEVEL);
- KeEnterCriticalRegion();
- CheckApcs(-1, -1, TRUE, HIGH_LEVEL);
- KeLeaveGuardedRegion();
- CheckApcs(-1, 0, TRUE, HIGH_LEVEL);
- KeLowerIrql(Irql);
- CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL);
- KeLeaveCriticalRegion();
- CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ KeEnterGuardedRegion();
+ CheckApcs(0, -1, TRUE, PASSIVE_LEVEL);
+ KeRaiseIrql(HIGH_LEVEL, &Irql);
+ CheckApcs(0, -1, TRUE, HIGH_LEVEL);
+ KeEnterCriticalRegion();
+ CheckApcs(-1, -1, TRUE, HIGH_LEVEL);
+ KeLeaveGuardedRegion();
+ CheckApcs(-1, 0, TRUE, HIGH_LEVEL);
+ KeLowerIrql(Irql);
+ CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL);
+ KeLeaveCriticalRegion();
+ CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
- KeEnterCriticalRegion();
- CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL);
- KeRaiseIrql(HIGH_LEVEL, &Irql);
- CheckApcs(-1, 0, TRUE, HIGH_LEVEL);
- KeEnterGuardedRegion();
- CheckApcs(-1, -1, TRUE, HIGH_LEVEL);
- KeLeaveCriticalRegion();
- CheckApcs(0, -1, TRUE, HIGH_LEVEL);
- KeLowerIrql(Irql);
- CheckApcs(0, -1, TRUE, PASSIVE_LEVEL);
- KeLeaveGuardedRegion();
- CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ KeEnterCriticalRegion();
+ CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL);
+ KeRaiseIrql(HIGH_LEVEL, &Irql);
+ CheckApcs(-1, 0, TRUE, HIGH_LEVEL);
+ KeEnterGuardedRegion();
+ CheckApcs(-1, -1, TRUE, HIGH_LEVEL);
+ KeLeaveCriticalRegion();
+ CheckApcs(0, -1, TRUE, HIGH_LEVEL);
+ KeLowerIrql(Irql);
+ CheckApcs(0, -1, TRUE, PASSIVE_LEVEL);
+ KeLeaveGuardedRegion();
+ CheckApcs(0, 0, FALSE, PASSIVE_LEVEL);
+ }
KeEnterCriticalRegion();
CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL);