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
b483b680
Commit
b483b680
authored
Jun 02, 2008
by
Zac Brown
Committed by
Alexandre Julliard
Jun 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Actually verify right bytes received in aio test.
parent
0ca7d443
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
file.c
dlls/ntdll/tests/file.c
+13
-6
No files found.
dlls/ntdll/tests/file.c
View file @
b483b680
...
@@ -65,6 +65,7 @@ static inline BOOL is_signaled( HANDLE obj )
...
@@ -65,6 +65,7 @@ static inline BOOL is_signaled( HANDLE obj )
}
}
#define PIPENAME "\\\\.\\pipe\\ntdll_tests_file.c"
#define PIPENAME "\\\\.\\pipe\\ntdll_tests_file.c"
#define TEST_BUF_LEN 3
static
BOOL
create_pipe
(
HANDLE
*
read
,
HANDLE
*
write
,
ULONG
flags
,
ULONG
size
)
static
BOOL
create_pipe
(
HANDLE
*
read
,
HANDLE
*
write
,
ULONG
flags
,
ULONG
size
)
{
{
...
@@ -533,7 +534,7 @@ static void test_iocp_fileio(HANDLE h)
...
@@ -533,7 +534,7 @@ static void test_iocp_fileio(HANDLE h)
if
(
hPipeClt
!=
INVALID_HANDLE_VALUE
)
if
(
hPipeClt
!=
INVALID_HANDLE_VALUE
)
{
{
OVERLAPPED
o
=
{
0
,};
OVERLAPPED
o
=
{
0
,};
BYTE
buf
[
3
];
BYTE
send_buf
[
TEST_BUF_LEN
],
recv_buf
[
TEST_BUF_LEN
];
DWORD
read
;
DWORD
read
;
long
count
;
long
count
;
...
@@ -541,12 +542,14 @@ static void test_iocp_fileio(HANDLE h)
...
@@ -541,12 +542,14 @@ static void test_iocp_fileio(HANDLE h)
ok
(
res
==
STATUS_SUCCESS
,
"NtSetInformationFile failed: %x
\n
"
,
res
);
ok
(
res
==
STATUS_SUCCESS
,
"NtSetInformationFile failed: %x
\n
"
,
res
);
ok
(
U
(
iosb
).
Status
==
STATUS_SUCCESS
,
"iosb.Status invalid: %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
U
(
iosb
).
Status
==
STATUS_SUCCESS
,
"iosb.Status invalid: %x
\n
"
,
U
(
iosb
).
Status
);
memset
(
send_buf
,
0
,
TEST_BUF_LEN
);
memset
(
recv_buf
,
0xde
,
TEST_BUF_LEN
);
count
=
get_pending_msgs
(
h
);
count
=
get_pending_msgs
(
h
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
ReadFile
(
hPipeSrv
,
buf
,
3
,
&
read
,
&
o
);
ReadFile
(
hPipeSrv
,
recv_buf
,
TEST_BUF_LEN
,
&
read
,
&
o
);
count
=
get_pending_msgs
(
h
);
count
=
get_pending_msgs
(
h
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
WriteFile
(
hPipeClt
,
buf
,
3
,
&
read
,
NULL
);
WriteFile
(
hPipeClt
,
send_buf
,
TEST_BUF_LEN
,
&
read
,
NULL
);
if
(
get_msg
(
h
))
if
(
get_msg
(
h
))
{
{
...
@@ -554,14 +557,17 @@ static void test_iocp_fileio(HANDLE h)
...
@@ -554,14 +557,17 @@ static void test_iocp_fileio(HANDLE h)
ok
(
ioSb
.
Information
==
3
,
"Invalid ioSb.Information: %ld
\n
"
,
ioSb
.
Information
);
ok
(
ioSb
.
Information
==
3
,
"Invalid ioSb.Information: %ld
\n
"
,
ioSb
.
Information
);
ok
(
U
(
ioSb
).
Status
==
STATUS_SUCCESS
,
"Invalid ioSb.Status: %x
\n
"
,
U
(
ioSb
).
Status
);
ok
(
U
(
ioSb
).
Status
==
STATUS_SUCCESS
,
"Invalid ioSb.Status: %x
\n
"
,
U
(
ioSb
).
Status
);
ok
(
completionValue
==
(
ULONG_PTR
)
&
o
,
"Invalid completion value: %lx
\n
"
,
completionValue
);
ok
(
completionValue
==
(
ULONG_PTR
)
&
o
,
"Invalid completion value: %lx
\n
"
,
completionValue
);
ok
(
!
memcmp
(
send_buf
,
recv_buf
,
TEST_BUF_LEN
),
"Receive buffer (%x %x %x) did not match send buffer (%x %x %x)
\n
"
,
recv_buf
[
0
],
recv_buf
[
1
],
recv_buf
[
2
],
send_buf
[
0
],
send_buf
[
1
],
send_buf
[
2
]
);
}
}
count
=
get_pending_msgs
(
h
);
count
=
get_pending_msgs
(
h
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
WriteFile
(
hPipeClt
,
buf
,
2
,
&
read
,
NULL
);
memset
(
send_buf
,
0
,
TEST_BUF_LEN
);
memset
(
recv_buf
,
0xde
,
TEST_BUF_LEN
);
WriteFile
(
hPipeClt
,
send_buf
,
2
,
&
read
,
NULL
);
count
=
get_pending_msgs
(
h
);
count
=
get_pending_msgs
(
h
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
ok
(
!
count
,
"Unexpected msg count: %ld
\n
"
,
count
);
ReadFile
(
hPipeSrv
,
buf
,
2
,
&
read
,
&
o
);
ReadFile
(
hPipeSrv
,
recv_
buf
,
2
,
&
read
,
&
o
);
count
=
get_pending_msgs
(
h
);
count
=
get_pending_msgs
(
h
);
ok
(
count
==
1
,
"Unexpected msg count: %ld
\n
"
,
count
);
ok
(
count
==
1
,
"Unexpected msg count: %ld
\n
"
,
count
);
if
(
get_msg
(
h
))
if
(
get_msg
(
h
))
...
@@ -570,9 +576,10 @@ static void test_iocp_fileio(HANDLE h)
...
@@ -570,9 +576,10 @@ static void test_iocp_fileio(HANDLE h)
ok
(
ioSb
.
Information
==
2
,
"Invalid ioSb.Information: %ld
\n
"
,
ioSb
.
Information
);
ok
(
ioSb
.
Information
==
2
,
"Invalid ioSb.Information: %ld
\n
"
,
ioSb
.
Information
);
ok
(
U
(
ioSb
).
Status
==
STATUS_SUCCESS
,
"Invalid ioSb.Status: %x
\n
"
,
U
(
ioSb
).
Status
);
ok
(
U
(
ioSb
).
Status
==
STATUS_SUCCESS
,
"Invalid ioSb.Status: %x
\n
"
,
U
(
ioSb
).
Status
);
ok
(
completionValue
==
(
ULONG_PTR
)
&
o
,
"Invalid completion value: %lx
\n
"
,
completionValue
);
ok
(
completionValue
==
(
ULONG_PTR
)
&
o
,
"Invalid completion value: %lx
\n
"
,
completionValue
);
ok
(
!
memcmp
(
send_buf
,
recv_buf
,
2
),
"Receive buffer (%x %x) did not match send buffer (%x %x)
\n
"
,
recv_buf
[
0
],
recv_buf
[
1
],
send_buf
[
0
],
send_buf
[
1
]
);
}
}
ReadFile
(
hPipeSrv
,
buf
,
sizeof
(
buf
)
,
&
read
,
&
o
);
ReadFile
(
hPipeSrv
,
recv_buf
,
TEST_BUF_LEN
,
&
read
,
&
o
);
CloseHandle
(
hPipeSrv
);
CloseHandle
(
hPipeSrv
);
count
=
get_pending_msgs
(
h
);
count
=
get_pending_msgs
(
h
);
ok
(
count
==
1
,
"Unexpected msg count: %ld
\n
"
,
count
);
ok
(
count
==
1
,
"Unexpected msg count: %ld
\n
"
,
count
);
...
...
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