Author: pschweitzer
Date: Sun Nov 27 13:39:01 2016
New Revision: 73395
URL:
http://svn.reactos.org/svn/reactos?rev=73395&view=rev
Log:
[KMTESTS:MM]
Test FCB header fields: FileSize, ValidDataLength
CORE-11819
CORE-12475
Modified:
trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
Modified: trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_mm/NtCreateS…
==============================================================================
--- trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c [iso-8859-1] Sun Nov 27 13:39:01
2016
@@ -473,16 +473,29 @@
}
else
{
+ ULONG TestSize = 0;
+
ok(EOFInfo != NULL, "Null pointer!\n");
ok(Fcb != NULL, "Null pointer!\n");
ok_bool_false(IoStack->Parameters.SetFile.AdvanceOnly,
"AdvanceOnly set!\n");
ok(EOFInfo->EndOfFile.QuadPart >
Fcb->Header.AllocationSize.QuadPart, "New size smaller\n");
+ if (Fcb->Header.AllocationSize.QuadPart != 0)
+ {
+ TestSize = 512;
+ }
+
Fcb->Header.AllocationSize.QuadPart = EOFInfo->EndOfFile.QuadPart;
+ ok_eq_ulong(Fcb->Header.FileSize.QuadPart, TestSize);
+ ok_eq_ulong(Fcb->Header.ValidDataLength.QuadPart, TestSize);
+
if (CcIsFileCached(IoStack->FileObject))
{
CcSetFileSizes(IoStack->FileObject,
(PCC_FILE_SIZES)(&(Fcb->Header.AllocationSize)));
}
+
+ ok_eq_ulong(Fcb->Header.FileSize.QuadPart, TestSize);
+ ok_eq_ulong(Fcb->Header.ValidDataLength.QuadPart, TestSize);
Status = STATUS_SUCCESS;
}