Author: pschweitzer
Date: Fri Sep 15 10:37:00 2017
New Revision: 75842
URL:
http://svn.reactos.org/svn/reactos?rev=75842&view=rev
Log:
[KMTESTS:CC]
Tests for paging IO MDL for read operations. Equivalent to r75833 (and r75840).
They fail in ROS.
Modified:
trunk/rostests/kmtests/ntos_cc/CMakeLists.txt
trunk/rostests/kmtests/ntos_cc/CcCopyRead_drv.c
Modified: trunk/rostests/kmtests/ntos_cc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_cc/CMakeList…
==============================================================================
--- trunk/rostests/kmtests/ntos_cc/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_cc/CMakeLists.txt [iso-8859-1] Fri Sep 15 10:37:00 2017
@@ -2,7 +2,7 @@
include_directories(../include)
#
-# IoCreateFile
+# CcCopyRead
#
list(APPEND CCCOPYREAD_DRV_SOURCE
../kmtest_drv/kmtest_standalone.c
@@ -15,3 +15,18 @@
add_target_compile_definitions(cccopyread_drv KMT_STANDALONE_DRIVER)
#add_pch(cccopyread_drv ../include/kmt_test.h)
add_rostests_file(TARGET cccopyread_drv)
+
+#
+# CcInitializeCacheMap
+#
+list(APPEND CCINITIALIZECACHEMAP_DRV_SOURCE
+ ../kmtest_drv/kmtest_standalone.c
+ CcInitializeCacheMap_drv.c)
+
+add_library(ccinitializecachemap_drv SHARED ${CCINITIALIZECACHEMAP_DRV_SOURCE})
+set_module_type(ccinitializecachemap_drv kernelmodedriver)
+target_link_libraries(ccinitializecachemap_drv kmtest_printf ${PSEH_LIB})
+add_importlibs(ccinitializecachemap_drv ntoskrnl hal)
+add_target_compile_definitions(ccinitializecachemap_drv KMT_STANDALONE_DRIVER)
+#add_pch(ccinitializecachemap_drv ../include/kmt_test.h)
+add_rostests_file(TARGET ccinitializecachemap_drv)
Modified: trunk/rostests/kmtests/ntos_cc/CcCopyRead_drv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_cc/CcCopyRea…
==============================================================================
--- trunk/rostests/kmtests/ntos_cc/CcCopyRead_drv.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_cc/CcCopyRead_drv.c [iso-8859-1] Fri Sep 15 10:37:00 2017
@@ -269,6 +269,8 @@
}
else
{
+ PMDL Mdl;
+
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);
@@ -282,6 +284,12 @@
{
*(PUSHORT)((ULONG_PTR)Buffer + (ULONG_PTR)(1000LL - Offset.QuadPart)) =
0xFFFF;
}
+
+ 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");
}
if (NT_SUCCESS(Status))