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
512239d5
Commit
512239d5
authored
Oct 24, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add tests for creating events with different initial security descriptors.
parent
dd9e3927
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
sync.c
dlls/kernel32/tests/sync.c
+39
-0
No files found.
dlls/kernel32/tests/sync.c
View file @
512239d5
...
...
@@ -245,9 +245,48 @@ static void test_slist(void)
ok
(((
struct
item
*
)
entry
->
Next
)
->
value
==
1
,
"item 1 not at the back of list
\n
"
);
}
static
void
test_event_security
(
void
)
{
HANDLE
handle
;
SECURITY_ATTRIBUTES
sa
;
SECURITY_DESCRIPTOR
sd
;
ACL
acl
;
/* no sd */
handle
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
__FILE__
": Test Event"
);
ok
(
handle
!=
NULL
,
"CreateEventW with blank sd failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
handle
);
sa
.
nLength
=
sizeof
(
sa
);
sa
.
lpSecurityDescriptor
=
&
sd
;
sa
.
bInheritHandle
=
FALSE
;
InitializeSecurityDescriptor
(
&
sd
,
SECURITY_DESCRIPTOR_REVISION
);
/* blank sd */
handle
=
CreateEventA
(
&
sa
,
FALSE
,
FALSE
,
__FILE__
": Test Event"
);
ok
(
handle
!=
NULL
,
"CreateEventW with blank sd failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
handle
);
/* sd with NULL dacl */
SetSecurityDescriptorDacl
(
&
sd
,
TRUE
,
NULL
,
FALSE
);
handle
=
CreateEventA
(
&
sa
,
FALSE
,
FALSE
,
__FILE__
": Test Event"
);
ok
(
handle
!=
NULL
,
"CreateEventW with blank sd failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
handle
);
/* sd with empty dacl */
InitializeAcl
(
&
acl
,
sizeof
(
acl
),
ACL_REVISION
);
SetSecurityDescriptorDacl
(
&
sd
,
TRUE
,
&
acl
,
FALSE
);
handle
=
CreateEventA
(
&
sa
,
FALSE
,
FALSE
,
__FILE__
": Test Event"
);
todo_wine
ok
(
handle
!=
NULL
,
"CreateEventW with blank sd failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
handle
);
}
START_TEST
(
sync
)
{
test_signalandwait
();
test_mutex
();
test_slist
();
test_event_security
();
}
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