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
9c5b15aa
Commit
9c5b15aa
authored
Nov 23, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Nov 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Listen on the pipe to allow the client to connect on Windows 8 and 10.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7021fd61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
pipe.c
dlls/ntdll/tests/pipe.c
+21
-16
No files found.
dlls/ntdll/tests/pipe.c
View file @
9c5b15aa
...
...
@@ -135,6 +135,21 @@ static NTSTATUS create_pipe(PHANDLE handle, ULONG sharing, ULONG options)
return
res
;
}
static
BOOL
ioapc_called
;
static
void
CALLBACK
ioapc
(
void
*
arg
,
PIO_STATUS_BLOCK
io
,
ULONG
reserved
)
{
ioapc_called
=
TRUE
;
}
static
NTSTATUS
listen_pipe
(
HANDLE
hPipe
,
HANDLE
hEvent
,
PIO_STATUS_BLOCK
iosb
,
BOOL
use_apc
)
{
int
dummy
;
ioapc_called
=
FALSE
;
return
pNtFsControlFile
(
hPipe
,
hEvent
,
use_apc
?
&
ioapc
:
NULL
,
use_apc
?
&
dummy
:
NULL
,
iosb
,
FSCTL_PIPE_LISTEN
,
0
,
0
,
0
,
0
);
}
static
void
test_create_invalid
(
void
)
{
IO_STATUS_BLOCK
iosb
;
...
...
@@ -202,6 +217,7 @@ static void test_create(void)
int
j
,
k
;
FILE_PIPE_LOCAL_INFORMATION
info
;
IO_STATUS_BLOCK
iosb
;
HANDLE
hEvent
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
static
const
DWORD
access
[]
=
{
0
,
GENERIC_READ
,
GENERIC_WRITE
,
GENERIC_READ
|
GENERIC_WRITE
};
static
const
DWORD
sharing
[]
=
{
FILE_SHARE_READ
,
FILE_SHARE_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
};
...
...
@@ -212,12 +228,15 @@ static void test_create(void)
HANDLE
hclient
;
BOOL
should_succeed
=
TRUE
;
res
=
create_pipe
(
&
hserver
,
sharing
[
j
],
FILE_SYNCHRONOUS_IO_NONALERT
);
res
=
create_pipe
(
&
hserver
,
sharing
[
j
],
0
);
if
(
res
)
{
ok
(
0
,
"NtCreateNamedPipeFile returned %x, sharing: %x
\n
"
,
res
,
sharing
[
j
]);
continue
;
}
res
=
listen_pipe
(
hserver
,
hEvent
,
&
iosb
,
FALSE
);
ok
(
res
==
STATUS_PENDING
,
"NtFsControlFile returned %x
\n
"
,
res
);
res
=
pNtQueryInformationFile
(
hserver
,
&
iosb
,
&
info
,
sizeof
(
info
),
(
FILE_INFORMATION_CLASS
)
24
);
ok
(
!
res
,
"NtQueryInformationFile for server returned %x, sharing: %x
\n
"
,
res
,
sharing
[
j
]);
ok
(
info
.
NamedPipeConfiguration
==
pipe_config
[
j
],
"wrong duplex status for pipe: %d, expected %d
\n
"
,
...
...
@@ -247,21 +266,7 @@ static void test_create(void)
CloseHandle
(
hserver
);
}
}
}
static
BOOL
ioapc_called
;
static
void
CALLBACK
ioapc
(
void
*
arg
,
PIO_STATUS_BLOCK
io
,
ULONG
reserved
)
{
ioapc_called
=
TRUE
;
}
static
NTSTATUS
listen_pipe
(
HANDLE
hPipe
,
HANDLE
hEvent
,
PIO_STATUS_BLOCK
iosb
,
BOOL
use_apc
)
{
int
dummy
;
ioapc_called
=
FALSE
;
return
pNtFsControlFile
(
hPipe
,
hEvent
,
use_apc
?
&
ioapc
:
NULL
,
use_apc
?
&
dummy
:
NULL
,
iosb
,
FSCTL_PIPE_LISTEN
,
0
,
0
,
0
,
0
);
CloseHandle
(
hEvent
);
}
static
void
test_overlapped
(
void
)
...
...
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