121598444cac34fff2b7c4958a2e2ad38e454a6f
[reactos.git] / modules / rostests / kmtests / ntos_cc / CcSetFileSizes_user.c
1 /*
2 * PROJECT: ReactOS kernel-mode tests
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Kernel-Mode Test Suite CcSetFileSizes 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(CcSetFileSizes)
14 {
15 DWORD Ret;
16 ULONG TestId;
17
18 KmtLoadDriver(L"CcSetFileSizes", FALSE);
19 KmtOpenDriver();
20
21 /* 0: mapped data - only FS
22 * 1: copy read - only FS
23 * 2: mapped data - FS & AS
24 * 3: copy read - FS & AS
25 */
26 for (TestId = 0; TestId < 4; ++TestId)
27 {
28 Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId);
29 ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
30 Ret = KmtSendUlongToDriver(IOCTL_FINISH_TEST, TestId);
31 ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
32 }
33
34 KmtCloseDriver();
35 KmtUnloadDriver();
36 }