2018-10-13 12:23:38 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS kernel-mode tests
|
|
|
|
* LICENSE: GPLv2+ - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Kernel-Mode Test Suite CcPinMappedData 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(CcPinMappedData)
|
|
|
|
{
|
|
|
|
DWORD Ret;
|
|
|
|
ULONG TestId;
|
|
|
|
|
2022-08-08 07:50:28 +00:00
|
|
|
Ret = KmtLoadAndOpenDriver(L"CcPinMappedData", FALSE);
|
|
|
|
ok_eq_int(Ret, ERROR_SUCCESS);
|
|
|
|
if (Ret)
|
|
|
|
return;
|
2018-10-13 12:23:38 +00:00
|
|
|
|
|
|
|
/* 1 basic test */
|
2018-10-13 17:24:07 +00:00
|
|
|
for (TestId = 0; TestId < 5; ++TestId)
|
2018-10-13 12:23:38 +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();
|
|
|
|
}
|