From: Pierre Schweitzer Date: Tue, 9 Aug 2016 20:46:00 +0000 (+0000) Subject: [KMTESTS:CC] X-Git-Tag: backups/sndblst@72664~440 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=dfdbabb5214aa348ea1e9eacca09c7db6b133969;ds=sidebyside [KMTESTS:CC] 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 --- diff --git a/rostests/kmtests/ntos_cc/CcCopyRead_drv.c b/rostests/kmtests/ntos_cc/CcCopyRead_drv.c index 8def83760d5..7b4b611f104 100644 --- a/rostests/kmtests/ntos_cc/CcCopyRead_drv.c +++ b/rostests/kmtests/ntos_cc/CcCopyRead_drv.c @@ -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 { diff --git a/rostests/kmtests/ntos_cc/CcCopyRead_user.c b/rostests/kmtests/ntos_cc/CcCopyRead_user.c index b149a1f2f31..fbcbae5e577 100644 --- a/rostests/kmtests/ntos_cc/CcCopyRead_user.c +++ b/rostests/kmtests/ntos_cc/CcCopyRead_user.c @@ -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);