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
44e135a7
Commit
44e135a7
authored
Nov 25, 2020
by
Paul Gofman
Committed by
Alexandre Julliard
Nov 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Test noname named pipe uniqueness.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1f3064c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
pipe.c
dlls/ntdll/tests/pipe.c
+24
-1
No files found.
dlls/ntdll/tests/pipe.c
View file @
44e135a7
...
...
@@ -2408,7 +2408,7 @@ static void test_security_info(void)
static
void
test_empty_name
(
void
)
{
HANDLE
hdirectory
,
hpipe
,
h
write
,
handle
;
HANDLE
hdirectory
,
hpipe
,
h
pipe2
,
hwrite
,
hwrite2
,
handle
;
OBJECT_TYPE_INFORMATION
*
type_info
;
OBJECT_NAME_INFORMATION
*
name_info
;
OBJECT_ATTRIBUTES
attr
;
...
...
@@ -2486,6 +2486,11 @@ static void test_empty_name(void)
0
,
0
,
0
,
1
,
4096
,
4096
,
&
timeout
);
todo_wine
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"Got unexpected status %#x.
\n
"
,
status
);
status
=
pNtCreateNamedPipeFile
(
&
hpipe2
,
GENERIC_READ
|
SYNCHRONIZE
,
&
attr
,
&
io
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_CREATE
,
FILE_SYNCHRONOUS_IO_NONALERT
,
0
,
0
,
0
,
3
,
4096
,
4096
,
&
timeout
);
ok
(
!
status
,
"Got unexpected status %#x.
\n
"
,
status
);
attr
.
RootDirectory
=
hpipe
;
pRtlInitUnicodeString
(
&
name
,
L"a"
);
status
=
NtCreateFile
(
&
hwrite
,
GENERIC_WRITE
|
FILE_WRITE_ATTRIBUTES
|
SYNCHRONIZE
,
&
attr
,
&
io
,
NULL
,
0
,
...
...
@@ -2519,20 +2524,38 @@ static void test_empty_name(void)
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_OPEN
,
FILE_SYNCHRONOUS_IO_NONALERT
,
NULL
,
0
);
ok
(
status
==
STATUS_PIPE_NOT_AVAILABLE
,
"Got unexpected status %#x.
\n
"
,
status
);
attr
.
RootDirectory
=
hpipe2
;
status
=
NtCreateFile
(
&
hwrite2
,
GENERIC_WRITE
|
FILE_WRITE_ATTRIBUTES
|
SYNCHRONIZE
,
&
attr
,
&
io
,
NULL
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_OPEN
,
FILE_SYNCHRONOUS_IO_NONALERT
,
NULL
,
0
);
ok
(
!
status
,
"Got unexpected status %#x.
\n
"
,
status
);
data
=
0xdeadbeef
;
ret
=
WriteFile
(
hwrite
,
&
data
,
sizeof
(
data
),
&
length
,
NULL
);
ok
(
ret
,
"Got unexpected ret %#x, GetLastError() %u.
\n
"
,
ret
,
GetLastError
());
ok
(
length
==
sizeof
(
data
),
"Got unexpected length %#x.
\n
"
,
length
);
data
=
0xfeedcafe
;
ret
=
WriteFile
(
hwrite2
,
&
data
,
sizeof
(
data
),
&
length
,
NULL
);
ok
(
ret
,
"Got unexpected ret %#x, GetLastError() %u.
\n
"
,
ret
,
GetLastError
());
ok
(
length
==
sizeof
(
data
),
"Got unexpected length %#x.
\n
"
,
length
);
data
=
0
;
ret
=
ReadFile
(
hpipe
,
&
data
,
sizeof
(
data
),
&
length
,
NULL
);
ok
(
ret
,
"Got unexpected ret %#x, GetLastError() %u.
\n
"
,
ret
,
GetLastError
());
ok
(
length
==
sizeof
(
data
),
"Got unexpected length %#x.
\n
"
,
length
);
ok
(
data
==
0xdeadbeef
,
"Got unexpected data %#x.
\n
"
,
data
);
data
=
0
;
ret
=
ReadFile
(
hpipe2
,
&
data
,
sizeof
(
data
),
&
length
,
NULL
);
ok
(
ret
,
"Got unexpected ret %#x, GetLastError() %u.
\n
"
,
ret
,
GetLastError
());
ok
(
length
==
sizeof
(
data
),
"Got unexpected length %#x.
\n
"
,
length
);
ok
(
data
==
0xfeedcafe
,
"Got unexpected data %#x.
\n
"
,
data
);
CloseHandle
(
hwrite
);
CloseHandle
(
hpipe
);
CloseHandle
(
hdirectory
);
CloseHandle
(
hpipe2
);
CloseHandle
(
hwrite2
);
}
START_TEST
(
pipe
)
...
...
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