diff --git a/modules/rostests/kmtests/ntos_cc/CcPinMappedData_drv.c b/modules/rostests/kmtests/ntos_cc/CcPinMappedData_drv.c index 89b348fe719..1a41bf144fd 100644 --- a/modules/rostests/kmtests/ntos_cc/CcPinMappedData_drv.c +++ b/modules/rostests/kmtests/ntos_cc/CcPinMappedData_drv.c @@ -353,6 +353,36 @@ PerformTest( ExFreePool(TestContext); } } + else if (TestId == 3) + { + Ret = FALSE; + Offset.QuadPart = 0; + KmtStartSeh(); + Ret = CcMapData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, MAP_WAIT, &Bcb, (PVOID *)&Buffer); + KmtEndSeh(STATUS_SUCCESS); + + if (!skip(Ret == TRUE, "CcMapData failed\n")) + { + Ret = FALSE; + PinBcb = Bcb; + ok_eq_ulong(Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE); + + KmtStartSeh(); + Ret = CcPinMappedData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, PIN_IF_BCB, &PinBcb); + KmtEndSeh(STATUS_SUCCESS); + + if (!skip(Ret == FALSE, "CcPinMappedData succeed\n")) + { + ok_eq_pointer(Bcb, PinBcb); + } + else + { + Bcb = PinBcb; + } + + CcUnpinData(Bcb); + } + } } } } diff --git a/modules/rostests/kmtests/ntos_cc/CcPinMappedData_user.c b/modules/rostests/kmtests/ntos_cc/CcPinMappedData_user.c index 14bc2aa5e92..21fe904bb91 100644 --- a/modules/rostests/kmtests/ntos_cc/CcPinMappedData_user.c +++ b/modules/rostests/kmtests/ntos_cc/CcPinMappedData_user.c @@ -19,7 +19,7 @@ START_TEST(CcPinMappedData) KmtOpenDriver(); /* 1 basic test */ - for (TestId = 0; TestId < 3; ++TestId) + for (TestId = 0; TestId < 4; ++TestId) { Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId); ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);