ReactOS 0.4.16-dev-125-g798ea90
IoCreateFile_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 Reparse points test user-mode part
5 * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
6 */
7
8#include <kmt_test.h>
9#include "IoCreateFile.h"
10
11static CHAR MountedPointFileName[] = "\\Device\\Kmtest-IoCreateFile\\MountedPoint";
12static CHAR SymlinkedFileName[] = "\\Device\\Kmtest-IoCreateFile\\Symlinked";
13static CHAR NonSymlinkedFileName[] = "\\Device\\Kmtest-IoCreateFile\\NonSymlinked";
14
16{
18
19 KmtRunKernelTest("IoCreateFile");
20
21 Error = KmtLoadAndOpenDriver(L"IoCreateFile", FALSE);
23 if (Error)
24 return;
25
27 ok(Error == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lx\n", Error);
29 ok(Error == ERROR_CANT_ACCESS_FILE, "Expected ERROR_CANT_ACCESS_FILE, got %lx\n", Error); /* FIXME */
31 ok(Error == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lx\n", Error);
32
34 ok(Error == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lx\n", Error);
35
37 ok(Error == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lx\n", Error);
39 ok(Error == ERROR_MR_MID_NOT_FOUND, "Expected ERROR_MR_MID_NOT_FOUND, got %lx\n", Error);
41 ok(Error == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lx\n", Error);
42
45}
#define IOCTL_DISABLE_SYMLINK
Definition: IoCreateFile.h:12
#define IOCTL_CALL_CREATE
Definition: IoCreateFile.h:11
static CHAR SymlinkedFileName[]
static CHAR NonSymlinkedFileName[]
static CHAR MountedPointFileName[]
#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
BOOL Error
Definition: chkdsk.c:66
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
NTSTATUS NTAPI IoCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG Disposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength, IN CREATE_FILE_TYPE CreateFileType, IN PVOID ExtraCreateParameters OPTIONAL, IN ULONG Options)
Definition: file.c:3010
#define L(x)
Definition: ntvdm.h:50
DWORD KmtRunKernelTest(IN PCSTR TestName)
Definition: support.c:95
DWORD KmtLoadAndOpenDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning)
Definition: support.c:213
VOID KmtCloseDriver(VOID)
Definition: support.c:236
DWORD KmtSendStringToDriver(IN DWORD ControlCode, IN PCSTR String)
Definition: support.c:283
DWORD KmtSendToDriver(IN DWORD ControlCode)
Definition: support.c:259
VOID KmtUnloadDriver(VOID)
Definition: support.c:167
#define ERROR_CANT_ACCESS_FILE
Definition: winerror.h:1162
#define ERROR_MR_MID_NOT_FOUND
Definition: winerror.h:321
char CHAR
Definition: xmlstorage.h:175