[STORAHCI] Merge Storport Miniport driver by Aman Priyadarshi in GSoC.
[reactos.git] / rostests / kmtests / ntos_cc / CcCopyRead_drv.c
index 7b4b611..98b4d87 100644 (file)
@@ -195,6 +195,13 @@ TestIrpHandler(
             Fcb->Header.FileSize.QuadPart = 1004;
             Fcb->Header.ValidDataLength.QuadPart = 1004;
         }
+        else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
+                 IoStack->FileObject->FileName.Buffer[1] == 'R')
+        {
+            Fcb->Header.AllocationSize.QuadPart = 62;
+            Fcb->Header.FileSize.QuadPart = 62;
+            Fcb->Header.ValidDataLength.QuadPart = 62;
+        }
         else
         {
             Fcb->Header.AllocationSize.QuadPart = 512;
@@ -228,8 +235,8 @@ TestIrpHandler(
 
         if (!FlagOn(Irp->Flags, IRP_NOCACHE))
         {
-            ok(Offset.QuadPart % 512 != 0, "Offset is aligned: %I64i\n", Offset.QuadPart);
-            ok(Length % 512 != 0, "Length is aligned: %I64i\n", Length);
+            ok(Offset.QuadPart % PAGE_SIZE != 0, "Offset is aligned: %I64i\n", Offset.QuadPart);
+            ok(Length % PAGE_SIZE != 0, "Length is aligned: %I64i\n", Length);
 
             Buffer = Irp->AssociatedIrp.SystemBuffer;
             ok(Buffer != NULL, "Null pointer!\n");
@@ -262,8 +269,8 @@ TestIrpHandler(
         }
         else
         {
-            ok(Offset.QuadPart % 512 == 0, "Offset is not aligned: %I64i\n", Offset.QuadPart);
-            ok(Length % 512 == 0, "Length is not aligned: %I64i\n", Length);
+            ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart);
+            ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
 
             ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
             Buffer = MapAndLockUserBuffer(Irp, Length);