Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
87db683a
Commit
87db683a
authored
Aug 20, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Check WriteFile return values.
parent
7cab2e99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
file.c
dlls/ntdll/tests/file.c
+8
-4
No files found.
dlls/ntdll/tests/file.c
View file @
87db683a
...
...
@@ -505,7 +505,8 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
0xdeadbabe
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0xdeadbeef
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ret
=
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
1
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* iosb updated here by async i/o */
Sleep
(
1
);
/* FIXME: needed for wine to run the i/o apc */
ok
(
U
(
iosb
).
Status
==
0
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
...
...
@@ -530,7 +531,8 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
0xdeadbabe
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0xdeadbeef
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ret
=
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
1
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* iosb updated here by async i/o */
Sleep
(
1
);
/* FIXME: needed for wine to run the i/o apc */
ok
(
U
(
iosb
).
Status
==
0
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
...
...
@@ -548,7 +550,8 @@ static void read_file_test(void)
U
(
iosb
).
Status
=
0xdeadbabe
;
iosb
.
Information
=
0xdeadbeef
;
ResetEvent
(
event
);
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ret
=
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
1
,
"WriteFile error %d
\n
"
,
GetLastError
());
status
=
pNtReadFile
(
read
,
event
,
apc
,
&
apc_count
,
&
iosb
,
buffer
,
1
,
NULL
,
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"wrong status %x
\n
"
,
status
);
ok
(
U
(
iosb
).
Status
==
0
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
...
...
@@ -571,7 +574,8 @@ static void read_file_test(void)
ok
(
U
(
iosb
).
Status
==
0xdeadbabe
,
"wrong status %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
iosb
.
Information
==
0xdeadbeef
,
"wrong info %lu
\n
"
,
iosb
.
Information
);
ok
(
!
apc_count
,
"apc was called
\n
"
);
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ret
=
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
1
,
"WriteFile error %d
\n
"
,
GetLastError
());
/* partial read is good enough */
Sleep
(
1
);
/* FIXME: needed for wine to run the i/o apc */
ok
(
is_signaled
(
event
),
"event is signaled
\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