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
aa14c2da
Commit
aa14c2da
authored
Aug 21, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add the tests for some error cases.
parent
8ec8d70a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
file.c
dlls/ntdll/tests/file.c
+30
-0
No files found.
dlls/ntdll/tests/file.c
View file @
aa14c2da
...
...
@@ -1941,11 +1941,41 @@ static void test_read_write(void)
DWORD
ret
,
bytes
,
status
;
LARGE_INTEGER
offset
;
iob
.
Status
=
-
1
;
iob
.
Information
=
-
1
;
offset
.
QuadPart
=
0
;
status
=
pNtReadFile
(
INVALID_HANDLE_VALUE
,
0
,
NULL
,
NULL
,
&
iob
,
buf
,
sizeof
(
buf
),
&
offset
,
NULL
);
ok
(
status
==
STATUS_OBJECT_TYPE_MISMATCH
||
status
==
STATUS_INVALID_HANDLE
,
"expected STATUS_OBJECT_TYPE_MISMATCH, got %#x
\n
"
,
status
);
ok
(
iob
.
Status
==
-
1
,
"expected -1, got %#x
\n
"
,
iob
.
Status
);
ok
(
iob
.
Information
==
-
1
,
"expected -1, got %lu
\n
"
,
iob
.
Information
);
iob
.
Status
=
-
1
;
iob
.
Information
=
-
1
;
offset
.
QuadPart
=
0
;
status
=
pNtWriteFile
(
INVALID_HANDLE_VALUE
,
0
,
NULL
,
NULL
,
&
iob
,
buf
,
sizeof
(
buf
),
&
offset
,
NULL
);
ok
(
status
==
STATUS_OBJECT_TYPE_MISMATCH
||
status
==
STATUS_INVALID_HANDLE
,
"expected STATUS_OBJECT_TYPE_MISMATCH, got %#x
\n
"
,
status
);
ok
(
iob
.
Status
==
-
1
,
"expected -1, got %#x
\n
"
,
iob
.
Status
);
ok
(
iob
.
Information
==
-
1
,
"expected -1, got %lu
\n
"
,
iob
.
Information
);
hfile
=
create_temp_file
(
0
);
if
(
!
hfile
)
return
;
iob
.
Status
=
-
1
;
iob
.
Information
=
-
1
;
status
=
pNtWriteFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
NULL
,
sizeof
(
contents
),
NULL
,
NULL
);
ok
(
status
==
STATUS_INVALID_USER_BUFFER
,
"expected STATUS_INVALID_USER_BUFFER, got %#x
\n
"
,
status
);
ok
(
iob
.
Status
==
-
1
,
"expected -1, got %#x
\n
"
,
iob
.
Status
);
ok
(
iob
.
Information
==
-
1
,
"expected -1, got %lu
\n
"
,
iob
.
Information
);
iob
.
Status
=
-
1
;
iob
.
Information
=
-
1
;
status
=
pNtReadFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
NULL
,
sizeof
(
contents
),
NULL
,
NULL
);
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"expected STATUS_ACCESS_VIOLATION, got %#x
\n
"
,
status
);
ok
(
iob
.
Status
==
-
1
,
"expected -1, got %#x
\n
"
,
iob
.
Status
);
ok
(
iob
.
Information
==
-
1
,
"expected -1, got %lu
\n
"
,
iob
.
Information
);
iob
.
Status
=
-
1
;
iob
.
Information
=
-
1
;
status
=
pNtWriteFile
(
hfile
,
0
,
NULL
,
NULL
,
&
iob
,
contents
,
sizeof
(
contents
),
NULL
,
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"NtWriteFile error %#x
\n
"
,
status
);
ok
(
iob
.
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
iob
.
Status
);
...
...
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