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
d5fd04f2
Commit
d5fd04f2
authored
Mar 21, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Always wait until the operation completes if returned status is STATUS_PENDING.
parent
911adfbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
file.c
dlls/ntdll/tests/file.c
+19
-11
No files found.
dlls/ntdll/tests/file.c
View file @
d5fd04f2
...
...
@@ -2363,12 +2363,14 @@ static void test_read_write(void)
offset
.
QuadPart
=
0
;
status
=
pNtWriteFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
contents
,
sizeof
(
contents
),
&
offset
,
NULL
);
ok
(
status
==
STATUS_PENDING
||
status
==
STATUS_SUCCESS
/* before Vista */
,
"expected STATUS_PENDING or STATUS_SUCCESS, got %#x
\n
"
,
status
);
if
(
status
==
STATUS_PENDING
)
{
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
}
ok
(
U
(
iob
).
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
U
(
iob
).
Status
);
ok
(
iob
.
Information
==
sizeof
(
contents
),
"expected sizeof(contents), got %lu
\n
"
,
iob
.
Information
);
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
off
=
SetFilePointer
(
hfile
,
0
,
NULL
,
FILE_CURRENT
);
ok
(
off
==
0
,
"expected 0, got %u
\n
"
,
off
);
...
...
@@ -2501,6 +2503,8 @@ todo_wine
status
=
pNtReadFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
buf
,
sizeof
(
buf
),
&
offset
,
NULL
);
if
(
status
==
STATUS_PENDING
)
{
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
ok
(
U
(
iob
).
Status
==
STATUS_END_OF_FILE
,
"expected STATUS_END_OF_FILE, got %#x
\n
"
,
U
(
iob
).
Status
);
ok
(
iob
.
Information
==
0
,
"expected 0, got %lu
\n
"
,
iob
.
Information
);
}
...
...
@@ -2520,6 +2524,8 @@ todo_wine
status
=
pNtReadFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
buf
,
0
,
&
offset
,
NULL
);
if
(
status
==
STATUS_PENDING
)
{
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
ok
(
U
(
iob
).
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
U
(
iob
).
Status
);
ok
(
iob
.
Information
==
0
,
"expected 0, got %lu
\n
"
,
iob
.
Information
);
}
...
...
@@ -2574,31 +2580,33 @@ todo_wine
offset
.
QuadPart
=
(
LONGLONG
)
-
1
/* FILE_WRITE_TO_END_OF_FILE */
;
status
=
pNtWriteFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
"DCBA"
,
4
,
&
offset
,
NULL
);
ok
(
status
==
STATUS_PENDING
||
status
==
STATUS_SUCCESS
/* before Vista */
,
"expected STATUS_PENDING or STATUS_SUCCESS, got %#x
\n
"
,
status
);
if
(
status
==
STATUS_PENDING
)
{
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
}
ok
(
U
(
iob
).
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
U
(
iob
).
Status
);
ok
(
iob
.
Information
==
4
,
"expected 4, got %lu
\n
"
,
iob
.
Information
);
off
=
SetFilePointer
(
hfile
,
0
,
NULL
,
FILE_CURRENT
);
ok
(
off
==
0
,
"expected 0, got %u
\n
"
,
off
);
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
off
=
SetFilePointer
(
hfile
,
0
,
NULL
,
FILE_CURRENT
);
ok
(
off
==
0
,
"expected 0, got %u
\n
"
,
off
);
U
(
iob
).
Status
=
-
1
;
iob
.
Information
=
-
1
;
offset
.
QuadPart
=
0
;
status
=
pNtReadFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
buf
,
sizeof
(
buf
),
&
offset
,
NULL
);
ok
(
status
==
STATUS_PENDING
||
status
==
STATUS_SUCCESS
,
"expected STATUS_PENDING or STATUS_SUCCESS, got %#x
\n
"
,
status
);
if
(
status
==
STATUS_PENDING
)
{
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
}
ok
(
U
(
iob
).
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
U
(
iob
).
Status
);
ok
(
iob
.
Information
==
sizeof
(
contents
),
"expected sizeof(contents), got %lu
\n
"
,
iob
.
Information
);
off
=
SetFilePointer
(
hfile
,
0
,
NULL
,
FILE_CURRENT
);
ok
(
off
==
0
,
"expected 0, got %u
\n
"
,
off
);
ret
=
WaitForSingleObject
(
hfile
,
3000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject error %d
\n
"
,
ret
);
ok
(
!
memcmp
(
contents
,
buf
,
sizeof
(
contents
)
-
4
),
"file contents mismatch
\n
"
);
ok
(
!
memcmp
(
buf
+
sizeof
(
contents
)
-
4
,
"DCBA"
,
4
),
"file contents mismatch
\n
"
);
...
...
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