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
d68225eb
Commit
d68225eb
authored
Nov 17, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix the mailslot tests on Vista.
parent
cf111610
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
mailslot.c
dlls/kernel32/tests/mailslot.c
+10
-6
No files found.
dlls/kernel32/tests/mailslot.c
View file @
d68225eb
...
...
@@ -90,9 +90,9 @@ static int mailslot_test(void)
/* now try and openthe client, but with the wrong sharing mode */
hWriter
=
CreateFile
(
szmspath
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
hWriter
==
INVALID_HANDLE_VALUE
,
"bad sharing mode
\n
"
);
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
,
ok
(
hWriter
!=
INVALID_HANDLE_VALUE
/* vista */
||
GetLastError
()
==
ERROR_SHARING_VIOLATION
,
"error should be ERROR_SHARING_VIOLATION
\n
"
);
if
(
hWriter
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hWriter
);
/* now open the client with the correct sharing mode */
hWriter
=
CreateFile
(
szmspath
,
GENERIC_READ
|
GENERIC_WRITE
,
...
...
@@ -139,17 +139,20 @@ static int mailslot_test(void)
/* now try open another writer... should fail */
hWriter2
=
CreateFile
(
szmspath
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
hWriter2
==
INVALID_HANDLE_VALUE
,
"two writers
\n
"
);
/* succeeds on vista, don't test */
if
(
hWriter2
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hWriter2
);
/* now try open another as a reader ... also fails */
hWriter2
=
CreateFile
(
szmspath
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
hWriter2
==
INVALID_HANDLE_VALUE
,
"writer + reader
\n
"
);
/* succeeds on vista, don't test */
if
(
hWriter2
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hWriter2
);
/* now try open another as a writer ... still fails */
hWriter2
=
CreateFile
(
szmspath
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
hWriter2
==
INVALID_HANDLE_VALUE
,
"writer
\n
"
);
/* succeeds on vista, don't test */
if
(
hWriter2
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hWriter2
);
/* now open another one */
hSlot2
=
CreateMailslot
(
szmspath
,
0
,
0
,
NULL
);
...
...
@@ -172,7 +175,8 @@ static int mailslot_test(void)
*/
hWriter2
=
CreateFile
(
szmspath
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
hWriter2
==
INVALID_HANDLE_VALUE
,
"greedy writer succeeded
\n
"
);
/* succeeds on vista, don't test */
if
(
hWriter2
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hWriter2
);
/* now try open another as a writer ... and share with the first */
hWriter2
=
CreateFile
(
szmspath
,
GENERIC_WRITE
,
...
...
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