Author: tfaber
Date: Fri Aug 19 19:03:46 2011
New Revision: 53322
URL:
http://svn.reactos.org/svn/reactos?rev=53322&view=rev
Log:
[KMTESTS]
- ExResource: Fix a TODO
- Fix warnings. All of them.
Modified:
branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_platform.h
branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_test.h
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExInterlocked.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExResource.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeSpinLock.c
branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c
Modified: branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_platform.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/i…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_platform.h [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_platform.h [iso-8859-1] Fri Aug 19
19:03:46 2011
@@ -29,18 +29,14 @@
#ifdef KMT_EMULATE_KERNEL
#define ok_irql(i)
-#ifdef __GNUC__
-#define KIRQL __attribute__((__unused__)) int
-#elif !defined __GNUC__
#define KIRQL int
-#endif /* !defined __GNUC__ */
typedef const UCHAR CUCHAR, *PCUCHAR;
typedef ULONG LOGICAL, *PLOGICAL;
#undef KeRaiseIrql
-#define KeRaiseIrql(new, old)
+#define KeRaiseIrql(new, old) *(old) = 123
#undef KeLowerIrql
-#define KeLowerIrql(i)
+#define KeLowerIrql(i) (void)(i)
#define ExAllocatePool(type, size) HeapAlloc(GetProcessHeap(), 0, size)
#define ExAllocatePoolWithTag(type, size, tag) HeapAlloc(GetProcessHeap(), 0, size)
#define ExFreePool(p) HeapFree(GetProcessHeap(), 0, p)
Modified: branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_test.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/i…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_test.h [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/include/kmt_test.h [iso-8859-1] Fri Aug 19
19:03:46 2011
@@ -104,7 +104,8 @@
extern PKMT_RESULTBUFFER ResultBuffer;
#ifdef __GNUC__
-#define KMT_FORMAT(type, fmt, first) __attribute__((__format__(type, fmt, first)))
+/* TODO: GCC doesn't understand %wZ :( */
+#define KMT_FORMAT(type, fmt, first) /*__attribute__((__format__(type, fmt, first)))*/
#elif !defined __GNUC__
#define KMT_FORMAT(type, fmt, first)
#endif /* !defined __GNUC__ */
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExInterlocked.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExInterlocked.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ex/ExInterlocked.c [iso-8859-1] Fri Aug 19
19:03:46 2011
@@ -136,14 +136,14 @@
}
#define CheckInterlockedCmpXchg(Function, Type, Print, Val, Cmp, Xchg, \
- ExpectedValue, ExpectedRet, ...) do \
+ ExpectedValue, ExpectedRet) do \
{ \
Type Ret##Type = 0; \
Type Value##Type = Val; \
Status = STATUS_SUCCESS; \
_SEH2_TRY { \
SaveState(OldState); \
- Ret##Type = Function(&Value##Type, Xchg, Cmp, ##__VA_ARGS__); \
+ Ret##Type = Function(&Value##Type, Xchg, Cmp); \
SaveState(NewState); \
CheckState(&OldState, &NewState); \
} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \
@@ -236,13 +236,13 @@
} while (0)
#define CheckInterlockedOpLargeNoRet(Function, Type, Print, Val, Op, \
- ExpectedValue, ...) do \
-{ \
- Type Value##Type = Val; \
- Status = STATUS_SUCCESS; \
- _SEH2_TRY { \
- SaveState(OldState); \
- Function(&Value##Type, Op, ##__VA_ARGS__); \
+ ExpectedValue) do \
+{ \
+ Type Value##Type = Val; \
+ Status = STATUS_SUCCESS; \
+ _SEH2_TRY { \
+ SaveState(OldState); \
+ Function(&Value##Type, Op); \
SaveState(NewState); \
CheckState(&OldState, &NewState); \
} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \
@@ -305,7 +305,7 @@
/* Exchange */
CheckInterlockedOp(InterlockedExchange, LONG, "%ld", 5, 8, 8L, 5L);
- CheckInterlockedOp(InterlockedExchangePointer, PVOID, "%p", (PVOID)700,
(PVOID)93, (PVOID)93, (PVOID)700);
+ CheckInterlockedOpNoArg(InterlockedExchangePointer, PVOID, "%p",
(PVOID)700, (PVOID)93, (PVOID)700, (PVOID)93);
#undef InterlockedExchange
#ifdef _M_IX86
CheckInterlockedOp(InterlockedExchange, LONG, "%ld", 5, 8, 8L, 5L);
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] Fri Aug 19
19:03:46 2011
@@ -25,9 +25,6 @@
ULONG ContentionCount;
USHORT NumberOfSharedWaiters;
USHORT NumberOfExclusiveWaiters;
-#if defined(_WIN64)
- PVOID Reserved2; /* TODO: not sure if this should be in here for 2k3 */
-#endif
_ANONYMOUS_UNION union {
PVOID Address;
ULONG_PTR CreatorBackTraceIndex;
@@ -51,7 +48,6 @@
ok_eq_ulong((Res)->ContentionCount, 0LU);
\
ok_eq_uint((Res)->NumberOfSharedWaiters, 0);
\
ok_eq_uint((Res)->NumberOfExclusiveWaiters, 0);
\
- /* ok_eq_pointer((Res)->Reserved2, NULL); */
\
ok_eq_pointer((Res)->Address, NULL);
\
ok_eq_ulongptr((Res)->SpinLock, 0);
\
} while (0)
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeSpinLock.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeSpinLock.c [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ke/KeSpinLock.c [iso-8859-1] Fri Aug 19
19:03:46 2011
@@ -108,8 +108,11 @@
DEFINE_ACQUIRE(AcquireInStackNoRaise, FALSE,
KeAcquireInStackQueuedSpinLockAtDpcLevel(SpinLock, &CheckData->QueueHandle))
DEFINE_RELEASE(ReleaseInStackNoRaise, FALSE,
KeReleaseInStackQueuedSpinLockFromDpcLevel(&CheckData->QueueHandle))
+/* TODO: test these functions. They behave weirdly, though */
+#if 0
DEFINE_ACQUIRE(AcquireForDpc, TRUE, CheckData->Irql =
KeAcquireSpinLockForDpc(SpinLock))
DEFINE_RELEASE(ReleaseForDpc, TRUE, KeReleaseSpinLockForDpc(SpinLock,
CheckData->Irql))
+#endif
DEFINE_ACQUIRE(AcquireInStackForDpc, FALSE,
KeAcquireInStackQueuedSpinLockForDpc(SpinLock, &CheckData->QueueHandle))
DEFINE_RELEASE(ReleaseInStackForDpc, FALSE,
KeReleaseInStackQueuedSpinLockForDpc(&CheckData->QueueHandle))
Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
==============================================================================
--- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c [iso-8859-1] (original)
+++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c [iso-8859-1] Fri Aug 19
19:03:46 2011
@@ -178,10 +178,12 @@
{
WCHAR DirectoryName[sizeof "\\ObjectTypes\\" - 1];
WCHAR TypeName[15];
- } Name = { L"\\ObjectTypes\\" };
+ } Name;
OBJECT_ATTRIBUTES ObjectAttributes;
HANDLE ObjectTypeHandle;
UNICODE_STRING ObjectPath;
+
+ RtlCopyMemory(&Name.DirectoryName, L"\\ObjectTypes\\", sizeof
Name.DirectoryName);
for (i = 0; i < NUM_OBTYPES; ++i)
{