Author: fireball
Date: Sun Jun 11 02:39:14 2006
New Revision: 22302
URL:
http://svn.reactos.ru/svn/reactos?rev=22302&view=rev
Log:
- Further improvements to Ob tests (fixing obvious mistakes/etc), however reference tests
still cause bugcheck, so they are disabled
- Clean-up is enabled now, so basically it's possible to run the test a number of
times in win2k3, and every time it will go from scratch by creating everything. But I have
a feeling that deleting object-types causes some type of corruption. To be investigated
later.
Modified:
trunk/reactos/drivers/test/kmtest/ntos_ob.c
Modified: trunk/reactos/drivers/test/kmtest/ntos_ob.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/test/kmtest/ntos_ob…
==============================================================================
--- trunk/reactos/drivers/test/kmtest/ntos_ob.c (original)
+++ trunk/reactos/drivers/test/kmtest/ntos_ob.c Sun Jun 11 02:39:14 2006
@@ -121,7 +121,8 @@
OUT PVOID *Object)
{
DbgPrint("ParseProc() called\n");
- return STATUS_SUCCESS;
+ *Object = NULL;
+ return STATUS_OBJECT_NAME_NOT_FOUND;//STATUS_SUCCESS;
}
VOID
@@ -260,7 +261,7 @@
PVOID DirObject;
NTSTATUS Status;
//PVOID TypeObject;
- //USHORT i;
+ USHORT i;
//UNICODE_STRING ObPathName[NUM_OBTYPES];
// Close what we have opened and free what we allocated
@@ -293,13 +294,11 @@
"Failed to close handle with status=0x%lX", Status);
// Now delete the last piece - object types
- // FIXME: How to do this correctly?
- /*
- for (i=0; i<NUM_OBTYPES; i++)
- {
+ // In fact, it's weird to get rid of object types, especially the way,
+ // how it's done in the commented section below
+ for (i=0; i<NUM_OBTYPES; i++)
ObDereferenceObject(ObTypes[i]);
- }*/
- /*
+/*
RtlInitUnicodeString(&ObPathName[0], L"\\ObjectTypes\\MyObjectType1");
RtlInitUnicodeString(&ObPathName[1], L"\\ObjectTypes\\MyObjectType2");
@@ -313,7 +312,8 @@
ObDereferenceObject(TypeObject);
DPRINT("Reference Name %S = %p, ObTypes[%d] = %p\n",
ObPathName[i], TypeObject, i, ObTypes[i]);
- }*/
+ }
+*/
}
VOID
@@ -351,7 +351,7 @@
OBJ_CASE_INSENSITIVE, NULL, 0L, ObTypes[i], KernelMode, NULL,
&ObBody[0]);
- DPRINT("Ref by name %S = %p\n", ObPathName[i], ObBody[i]);
+ DPRINT("Ref by name %wZ = %p\n", &ObPathName[i], ObBody[i]);
}
// Dereference now all of them
@@ -394,12 +394,11 @@
DPRINT("ObtCreateObjects() done\n");
// Reference them in a variety of ways
- // FIXME: Disabled due to ParseProcedure call
//ObtReferenceTests();
// Clean up
- // FIXME: Disabled to see results of creating objects in usermode
- // and also due to problems with object types removal
+ // FIXME: Disable to see results of creating objects in usermode.
+ // Also it has problems with object types removal
ObtClose();
DPRINT("Cleanup done\n");