2018-09-01 08:10:09 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS kernel-mode tests
|
|
|
|
* LICENSE: GPLv2+ - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Kernel-Mode Test Suite CcPinRead test user-mode part
|
|
|
|
* PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <kmt_test.h>
|
|
|
|
|
|
|
|
#define IOCTL_START_TEST 1
|
|
|
|
#define IOCTL_FINISH_TEST 2
|
|
|
|
|
|
|
|
START_TEST(CcPinRead)
|
|
|
|
{
|
|
|
|
DWORD Ret;
|
|
|
|
ULONG TestId;
|
|
|
|
|
|
|
|
KmtLoadDriver(L"CcPinRead", FALSE);
|
|
|
|
KmtOpenDriver();
|
|
|
|
|
|
|
|
/* 3 tests for offset
|
|
|
|
* 1 test for BCB
|
2018-09-01 10:40:24 +00:00
|
|
|
* 1 test for pinning access
|
2018-09-01 08:10:09 +00:00
|
|
|
*/
|
2018-09-01 10:40:24 +00:00
|
|
|
for (TestId = 0; TestId < 5; ++TestId)
|
2018-09-01 08:10:09 +00:00
|
|
|
{
|
|
|
|
Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId);
|
|
|
|
ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
|
|
|
|
Ret = KmtSendUlongToDriver(IOCTL_FINISH_TEST, TestId);
|
|
|
|
ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
KmtCloseDriver();
|
|
|
|
KmtUnloadDriver();
|
|
|
|
}
|