[KMTESTS]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 6 Nov 2016 15:26:39 +0000 (15:26 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 6 Nov 2016 15:26:39 +0000 (15:26 +0000)
- Complete IRPs with STATUS_INVALID_DEVICE_REQUEST by default.
CORE-12295 #resolve

svn path=/trunk/; revision=73153

rostests/kmtests/kmtest_drv/kmtest_standalone.c

index c6ad096..2ca8512 100644 (file)
@@ -306,7 +306,7 @@ DriverDispatch(
     IN PDEVICE_OBJECT DeviceObject,
     IN PIRP Irp)
 {
-    NTSTATUS Status = STATUS_SUCCESS;
+    NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST;
     PIO_STACK_LOCATION IoStackLocation;
     int i;
 
@@ -329,6 +329,12 @@ DriverDispatch(
             IoStackLocation->MajorFunction == IRP_MJ_INTERNAL_DEVICE_CONTROL)
         return DeviceControlHandler(DeviceObject, Irp, IoStackLocation);
 
+    /* Return success for create, close, and cleanup */
+    if (IoStackLocation->MajorFunction == IRP_MJ_CREATE ||
+            IoStackLocation->MajorFunction == IRP_MJ_CLOSE ||
+            IoStackLocation->MajorFunction == IRP_MJ_CLEANUP)
+        Status = STATUS_SUCCESS;
+
     /* default handler */
     Irp->IoStatus.Status = Status;
     Irp->IoStatus.Information = 0;