mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[KMTESTS:CC] Add more tests crossing CcPinRead and CcMapData
This commit is contained in:
parent
6f4d70b405
commit
04a192fa30
2 changed files with 58 additions and 0 deletions
|
@ -178,6 +178,40 @@ MapInAnotherThread(IN PVOID Context)
|
|||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, 0, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
|
||||
if (!skip(Ret == TRUE, "CcPinRead failed\n"))
|
||||
{
|
||||
ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
|
||||
ok_eq_pointer(Buffer, TestContext->Buffer);
|
||||
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, PIN_IF_BCB, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
ok(Ret == FALSE, "CcPinRead succeed\n");
|
||||
|
||||
if (Ret)
|
||||
{
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, PIN_EXCLUSIVE, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
|
||||
if (!skip(Ret == TRUE, "CcPinRead failed\n"))
|
||||
{
|
||||
ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
|
||||
ok_eq_pointer(Buffer, TestContext->Buffer);
|
||||
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -202,6 +202,18 @@ PinInAnotherThread(IN PVOID Context)
|
|||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
|
||||
if (!skip(Ret == TRUE, "CcMapData failed\n"))
|
||||
{
|
||||
ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
|
||||
ok_eq_pointer(Buffer, TestContext->Buffer);
|
||||
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -237,6 +249,18 @@ PinInAnotherThreadExclusive(IN PVOID Context)
|
|||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, 0, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
|
||||
if (!skip(Ret == TRUE, "CcMapData failed\n"))
|
||||
{
|
||||
ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
|
||||
ok_eq_pointer(Buffer, TestContext->Buffer);
|
||||
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue