Author: tfaber
Date: Fri May 1 10:52:37 2015
New Revision: 67486
URL:
http://svn.reactos.org/svn/reactos?rev=67486&view=rev
Log:
[KMTEST]
- Add TESTENTRY_NO_READONLY_DEVICE and TESTENTRY_BUFFERED_IO_DEVICE flags for standalone
drivers
Modified:
trunk/rostests/kmtests/include/kmt_test.h
trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c
Modified: trunk/rostests/kmtests/include/kmt_test.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/include/kmt_test.…
==============================================================================
--- trunk/rostests/kmtests/include/kmt_test.h [iso-8859-1] (original)
+++ trunk/rostests/kmtests/include/kmt_test.h [iso-8859-1] Fri May 1 10:52:37 2015
@@ -109,6 +109,8 @@
TESTENTRY_NO_REGISTER_DISPATCH = 2,
TESTENTRY_NO_REGISTER_UNLOAD = 4,
TESTENTRY_NO_EXCLUSIVE_DEVICE = 8,
+ TESTENTRY_NO_READONLY_DEVICE = 16,
+ TESTENTRY_BUFFERED_IO_DEVICE = 32,
} KMT_TESTENTRY_FLAGS;
NTSTATUS TestEntry(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING RegistryPath, OUT
PCWSTR *DeviceName, IN OUT INT *Flags);
Modified: trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/kmtest…
==============================================================================
--- trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/kmtest_drv/kmtest_standalone.c [iso-8859-1] Fri May 1 10:52:37
2015
@@ -121,7 +121,8 @@
RtlAppendUnicodeToString(&DeviceName, DeviceNameSuffix);
Status = IoCreateDevice(DriverObject, 0, &DeviceName,
FILE_DEVICE_UNKNOWN,
- FILE_DEVICE_SECURE_OPEN | FILE_READ_ONLY_DEVICE,
+ FILE_DEVICE_SECURE_OPEN |
+ (Flags & TESTENTRY_NO_READONLY_DEVICE ? 0 :
FILE_READ_ONLY_DEVICE),
Flags & TESTENTRY_NO_EXCLUSIVE_DEVICE ? FALSE :
TRUE,
&TestDeviceObject);
@@ -130,6 +131,9 @@
DPRINT1("Could not create device object %wZ\n", &DeviceName);
goto cleanup;
}
+
+ if (Flags & TESTENTRY_BUFFERED_IO_DEVICE)
+ TestDeviceObject->Flags |= DO_BUFFERED_IO;
DPRINT("DriverEntry. Created DeviceObject %p\n",
TestDeviceObject);