From 369ae3655bb71d0554c3b37b20ba23ebbe5950b3 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Fri, 15 Sep 2017 08:16:14 +0000 Subject: [PATCH] [KMTESTS:MM] Tests for paging IO MDL for read operations. Equivalent to r75833. svn path=/trunk/; revision=75840 --- rostests/kmtests/ntos_mm/NtCreateSection_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rostests/kmtests/ntos_mm/NtCreateSection_drv.c b/rostests/kmtests/ntos_mm/NtCreateSection_drv.c index f5082b23ee7..947997346d8 100644 --- a/rostests/kmtests/ntos_mm/NtCreateSection_drv.c +++ b/rostests/kmtests/ntos_mm/NtCreateSection_drv.c @@ -318,11 +318,19 @@ TestIrpHandler( } else { + PMDL Mdl; + ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n"); Buffer = MapAndLockUserBuffer(Irp, Length); ok(Buffer != NULL, "Null pointer!\n"); RtlFillMemory(Buffer, Length, 0xBA); + Mdl = Irp->MdlAddress; + ok(Mdl != NULL, "Null pointer for MDL!\n"); + ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n"); + ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n"); + ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n"); + Status = STATUS_SUCCESS; } }