ReactOS 0.4.15-dev-7958-gcd0bb1a
CcSetFileSizes_user.c
Go to the documentation of this file.
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
14{
15 DWORD Ret;
16 ULONG TestId;
17
18 Ret = KmtLoadAndOpenDriver(L"CcSetFileSizes", FALSE);
20 if (Ret)
21 return;
22
23 /* 0: mapped data - only FS
24 * 1: copy read - only FS
25 * 2: mapped data - FS & AS
26 * 3: copy read - FS & AS
27 * 4: dirty VACB - only FS
28 * 5: dirty VACB - FS & AS
29 * 6: CcSetFileSizes with mapped data at tail of file
30 */
31 for (TestId = 0; TestId < 7; ++TestId)
32 {
34 ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
36 ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
37 }
38
41}
#define IOCTL_FINISH_TEST
#define IOCTL_START_TEST
#define ok_eq_int(value, expected)
Definition: apitest.h:60
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
Definition: fssup.c:356
#define L(x)
Definition: ntvdm.h:50
DWORD KmtLoadAndOpenDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning)
Definition: support.c:213
VOID KmtCloseDriver(VOID)
Definition: support.c:236
DWORD KmtSendUlongToDriver(IN DWORD ControlCode, IN DWORD Value)
Definition: support.c:333
VOID KmtUnloadDriver(VOID)
Definition: support.c:167
uint32_t ULONG
Definition: typedefs.h:59