Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c9e1b6fb
Commit
c9e1b6fb
authored
May 27, 2015
by
Jactry Zeng
Committed by
Alexandre Julliard
May 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Test opening a directory with NULL ObjectName.
parent
251e1685
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
file.c
dlls/ntdll/tests/file.c
+30
-2
No files found.
dlls/ntdll/tests/file.c
View file @
c9e1b6fb
...
@@ -297,9 +297,10 @@ static void create_file_test(void)
...
@@ -297,9 +297,10 @@ static void create_file_test(void)
static
void
open_file_test
(
void
)
static
void
open_file_test
(
void
)
{
{
static
const
WCHAR
fooW
[]
=
{
'f'
,
'o'
,
'o'
,
0
};
NTSTATUS
status
;
NTSTATUS
status
;
HANDLE
dir
,
root
,
handle
;
HANDLE
dir
,
root
,
handle
,
file
;
WCHAR
path
[
MAX_PATH
];
WCHAR
path
[
MAX_PATH
]
,
tmpfile
[
MAX_PATH
]
;
BYTE
data
[
1024
];
BYTE
data
[
1024
];
OBJECT_ATTRIBUTES
attr
;
OBJECT_ATTRIBUTES
attr
;
IO_STATUS_BLOCK
io
;
IO_STATUS_BLOCK
io
;
...
@@ -426,6 +427,33 @@ static void open_file_test(void)
...
@@ -426,6 +427,33 @@ static void open_file_test(void)
CloseHandle
(
dir
);
CloseHandle
(
dir
);
CloseHandle
(
root
);
CloseHandle
(
root
);
GetTempPathW
(
MAX_PATH
,
path
);
GetTempFileNameW
(
path
,
fooW
,
0
,
tmpfile
);
pRtlDosPathNameToNtPathName_U
(
tmpfile
,
&
nameW
,
NULL
,
NULL
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
&
nameW
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
status
=
pNtOpenFile
(
&
file
,
SYNCHRONIZE
|
FILE_LIST_DIRECTORY
,
&
attr
,
&
io
,
FILE_SHARE_READ
,
FILE_SYNCHRONOUS_IO_NONALERT
);
ok
(
!
status
,
"open %s failed %x
\n
"
,
wine_dbgstr_w
(
nameW
.
Buffer
),
status
);
pRtlFreeUnicodeString
(
&
nameW
);
nameW
.
Length
=
0
;
nameW
.
Buffer
=
NULL
;
attr
.
RootDirectory
=
file
;
attr
.
ObjectName
=
&
nameW
;
status
=
pNtOpenFile
(
&
root
,
SYNCHRONIZE
|
FILE_LIST_DIRECTORY
,
&
attr
,
&
io
,
FILE_SHARE_READ
,
FILE_SYNCHRONOUS_IO_NONALERT
);
todo_wine
ok
(
!
status
,
"open %s failed %x
\n
"
,
wine_dbgstr_w
(
tmpfile
),
status
);
CloseHandle
(
file
);
CloseHandle
(
root
);
DeleteFileW
(
tmpfile
);
}
}
static
void
delete_file_test
(
void
)
static
void
delete_file_test
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment