1 /* 2 * PROJECT: ReactOS kernel-mode tests 3 * LICENSE: GPLv2+ - See COPYING in the top level directory 4 * PURPOSE: Kernel-Mode Test Suite CcPinRead test user-mode part 5 * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org> 6 */ 7 8 #include <kmt_test.h> 9 10 #define IOCTL_START_TEST 1 11 #define IOCTL_FINISH_TEST 2 12 13 START_TEST(CcPinRead) 14 { 15 DWORD Ret; 16 ULONG TestId; 17 18 Ret = KmtLoadAndOpenDriver(L"CcPinRead", FALSE); 19 ok_eq_int(Ret, ERROR_SUCCESS); 20 if (Ret) 21 return; 22 23 /* 3 tests for offset 24 * 1 test for BCB 25 * 1 test for pinning access 26 * 1 test for length/offset 27 * 1 test for read/write size 28 */ 29 for (TestId = 0; TestId < 7; ++TestId) 30 { 31 Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId); 32 ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret); 33 Ret = KmtSendUlongToDriver(IOCTL_FINISH_TEST, TestId); 34 ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret); 35 } 36 37 KmtCloseDriver(); 38 KmtUnloadDriver(); 39 } 40