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
42094d25
Commit
42094d25
authored
Apr 12, 2010
by
Paul Vriens
Committed by
Alexandre Julliard
Apr 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Prevent test failures on Windows.
parent
a155cf5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
file.c
dlls/ntdll/tests/file.c
+14
-7
No files found.
dlls/ntdll/tests/file.c
View file @
42094d25
...
...
@@ -332,17 +332,20 @@ static void open_file_test(void)
nameW
.
Length
=
sizeof
(
info
->
FileId
);
info
->
FileName
[
info
->
FileNameLength
/
sizeof
(
WCHAR
)]
=
0
;
attr
.
RootDirectory
=
dir
;
/* We skip 'open' files by not specifying FILE_SHARE_WRITE */
status
=
pNtOpenFile
(
&
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_SHARE_READ
,
FILE_OPEN_BY_FILE_ID
|
((
info
->
FileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
?
FILE_DIRECTORY_FILE
:
0
)
);
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_ACCESS_DENIED
||
status
==
STATUS_NOT_IMPLEMENTED
,
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_ACCESS_DENIED
||
status
==
STATUS_NOT_IMPLEMENTED
||
status
==
STATUS_SHARING_VIOLATION
,
"open %s failed %x
\n
"
,
wine_dbgstr_w
(
info
->
FileName
),
status
);
if
(
status
==
STATUS_NOT_IMPLEMENTED
)
{
win_skip
(
"FILE_OPEN_BY_FILE_ID not supported
\n
"
);
break
;
}
if
(
status
==
STATUS_SHARING_VIOLATION
)
trace
(
"%s is currently open
\n
"
,
wine_dbgstr_w
(
info
->
FileName
)
);
if
(
!
status
)
{
BYTE
buf
[
sizeof
(
FILE_ALL_INFORMATION
)
+
MAX_PATH
*
sizeof
(
WCHAR
)];
...
...
@@ -351,11 +354,15 @@ static void open_file_test(void)
{
FILE_ALL_INFORMATION
*
fai
=
(
FILE_ALL_INFORMATION
*
)
buf
;
/* check that it's the same file */
ok
(
info
->
EndOfFile
.
QuadPart
==
fai
->
StandardInformation
.
EndOfFile
.
QuadPart
,
"mismatched file size for %s
\n
"
,
wine_dbgstr_w
(
info
->
FileName
));
ok
(
info
->
LastWriteTime
.
QuadPart
==
fai
->
BasicInformation
.
LastWriteTime
.
QuadPart
,
"mismatched write time for %s
\n
"
,
wine_dbgstr_w
(
info
->
FileName
));
/* check that it's the same file/directory */
/* don't check the size for directories */
if
(
!
(
info
->
FileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
ok
(
info
->
EndOfFile
.
QuadPart
==
fai
->
StandardInformation
.
EndOfFile
.
QuadPart
,
"mismatched file size for %s
\n
"
,
wine_dbgstr_w
(
info
->
FileName
));
ok
(
info
->
CreationTime
.
QuadPart
==
fai
->
BasicInformation
.
CreationTime
.
QuadPart
,
"mismatched creation time for %s
\n
"
,
wine_dbgstr_w
(
info
->
FileName
));
}
CloseHandle
(
handle
);
...
...
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