Commit 324984ef authored by Stefan Leichter's avatar Stefan Leichter Committed by Alexandre Julliard

ntdll/tests: Test NtCreateFile with an invalid filename.

parent de006dbc
......@@ -155,6 +155,8 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
static void create_file_test(void)
{
static const WCHAR systemrootW[] = {'\\','S','y','s','t','e','m','R','o','o','t',
'\\','f','a','i','l','i','n','g',0};
NTSTATUS status;
HANDLE dir;
WCHAR path[MAX_PATH];
......@@ -231,6 +233,21 @@ static void create_file_test(void)
"open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status );
pRtlFreeUnicodeString( &nameW );
pRtlInitUnicodeString( &nameW, systemrootW );
attr.Length = sizeof(attr);
attr.RootDirectory = NULL;
attr.ObjectName = &nameW;
attr.Attributes = OBJ_CASE_INSENSITIVE;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
dir = NULL;
status = pNtCreateFile( &dir, FILE_APPEND_DATA, &attr, &io, NULL, FILE_ATTRIBUTE_NORMAL, 0,
FILE_OPEN_IF, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 );
todo_wine
ok( status == STATUS_INVALID_PARAMETER,
"open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status );
pRtlFreeUnicodeString( &nameW );
}
static void open_file_test(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment