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
4370073b
Commit
4370073b
authored
May 10, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
May 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Added FSCTL_PIPE_PEEK tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b76c1b46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
pipe.c
dlls/ntdll/tests/pipe.c
+28
-0
No files found.
dlls/ntdll/tests/pipe.c
View file @
4370073b
...
...
@@ -724,6 +724,31 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
ok
(
!
reserved
,
"reserved is not 0: %x
\n
"
,
reserved
);
}
static
void
test_peek
(
HANDLE
pipe
)
{
FILE_PIPE_PEEK_BUFFER
buf
;
IO_STATUS_BLOCK
iosb
;
HANDLE
event
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
NULL
);
NTSTATUS
status
;
memset
(
&
iosb
,
0x55
,
sizeof
(
iosb
));
status
=
NtFsControlFile
(
pipe
,
NULL
,
NULL
,
NULL
,
&
iosb
,
FSCTL_PIPE_PEEK
,
NULL
,
0
,
&
buf
,
sizeof
(
buf
));
ok
(
!
status
||
status
==
STATUS_PENDING
,
"NtFsControlFile failed: %x
\n
"
,
status
);
ok
(
!
iosb
.
Status
,
"iosb.Status = %x
\n
"
,
iosb
.
Status
);
ok
(
buf
.
ReadDataAvailable
==
1
,
"ReadDataAvailable = %u
\n
"
,
buf
.
ReadDataAvailable
);
ResetEvent
(
event
);
memset
(
&
iosb
,
0x55
,
sizeof
(
iosb
));
status
=
NtFsControlFile
(
pipe
,
event
,
NULL
,
NULL
,
&
iosb
,
FSCTL_PIPE_PEEK
,
NULL
,
0
,
&
buf
,
sizeof
(
buf
));
ok
(
!
status
||
status
==
STATUS_PENDING
,
"NtFsControlFile failed: %x
\n
"
,
status
);
ok
(
buf
.
ReadDataAvailable
==
1
,
"ReadDataAvailable = %u
\n
"
,
buf
.
ReadDataAvailable
);
ok
(
!
iosb
.
Status
,
"iosb.Status = %x
\n
"
,
iosb
.
Status
);
todo_wine
ok
(
is_signaled
(
event
),
"event is not signaled
\n
"
);
CloseHandle
(
event
);
}
#define PIPENAME "\\\\.\\pipe\\ntdll_tests_pipe.c"
static
BOOL
create_pipe_pair
(
HANDLE
*
read
,
HANDLE
*
write
,
ULONG
flags
,
ULONG
type
,
ULONG
size
)
...
...
@@ -829,6 +854,9 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
ResetEvent
(
event
);
ret
=
WriteFile
(
write
,
buffer
,
1
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
1
,
"WriteFile error %d
\n
"
,
GetLastError
());
test_peek
(
read
);
status
=
NtReadFile
(
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
);
...
...
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