reactos/modules/rostests/kmtests/ntos_cc/CcMapData_user.c

37 lines
980 B
C

/*
* PROJECT: ReactOS kernel-mode tests
* LICENSE: GPLv2+ - See COPYING in the top level directory
* PURPOSE: Kernel-Mode Test Suite CcMapData 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(CcMapData)
{
DWORD Ret;
ULONG TestId;
Ret = KmtLoadAndOpenDriver(L"CcMapData", FALSE);
ok_eq_int(Ret, ERROR_SUCCESS);
if (Ret)
return;
/* 3 tests for offset
* 1 test for BCB
* 1 test for length/offset
*/
for (TestId = 0; TestId < 5; ++TestId)
{
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();
}