[KMTESTS:CC]
authorPierre Schweitzer <pierre@reactos.org>
Tue, 9 Aug 2016 20:46:00 +0000 (20:46 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Tue, 9 Aug 2016 20:46:00 +0000 (20:46 +0000)
Modify a bit the read test so that it actually fails in ReactOS. It instructs us that when it comes to file boundaries, our Cc fails to properly align read (whereas it should!).
This is the behavior exposed by the MS FastFAT.

CORE-11003
CORE-11819

svn path=/trunk/; revision=72169

rostests/kmtests/ntos_cc/CcCopyRead_drv.c
rostests/kmtests/ntos_cc/CcCopyRead_user.c

index 8def837..7b4b611 100644 (file)
@@ -191,9 +191,9 @@ TestIrpHandler(
         else if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR) &&
                  IoStack->FileObject->FileName.Buffer[1] == 'S')
         {
-            Fcb->Header.AllocationSize.QuadPart = 3000;
-            Fcb->Header.FileSize.QuadPart = 3000;
-            Fcb->Header.ValidDataLength.QuadPart = 3000;
+            Fcb->Header.AllocationSize.QuadPart = 1004;
+            Fcb->Header.FileSize.QuadPart = 1004;
+            Fcb->Header.ValidDataLength.QuadPart = 1004;
         }
         else
         {
index b149a1f..fbcbae5 100644 (file)
@@ -64,6 +64,11 @@ START_TEST(CcCopyRead)
     ok_eq_hex(Status, STATUS_SUCCESS);
     ok_eq_hex(((USHORT *)Buffer)[0], 0xBABA);
 
+    ByteOffset.QuadPart = 999990;
+    Status = NtReadFile(Handle, NULL, NULL, NULL, &IoStatusBlock, Buffer, 10, &ByteOffset, NULL);
+    ok_eq_hex(Status, STATUS_SUCCESS);
+    ok_eq_hex(((USHORT *)Buffer)[0], 0xBABA);
+
     ByteOffset.QuadPart = 1000;
     Status = NtReadFile(Handle, NULL, NULL, NULL, &IoStatusBlock, Buffer, 2, &ByteOffset, NULL);
     ok_eq_hex(Status, STATUS_SUCCESS);