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
163b3f1e
Commit
163b3f1e
authored
Nov 11, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add tests for multiple registry notifications per key.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
029c56d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
10 deletions
+41
-10
reg.c
dlls/ntdll/tests/reg.c
+41
-10
No files found.
dlls/ntdll/tests/reg.c
View file @
163b3f1e
...
...
@@ -1515,21 +1515,27 @@ static void test_notify(void)
LARGE_INTEGER
timeout
;
IO_STATUS_BLOCK
iosb
;
UNICODE_STRING
str
;
HANDLE
key
,
event
,
subkey
;
HANDLE
key
,
event
s
[
2
]
,
subkey
;
NTSTATUS
status
;
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey Failed: 0x%08x
\n
"
,
status
);
event
=
CreateEventW
(
NULL
,
FALSE
,
TRUE
,
NULL
);
ok
(
event
!=
NULL
,
"CreateEvent failed: %u
\n
"
,
GetLastError
());
events
[
0
]
=
CreateEventW
(
NULL
,
FALSE
,
TRUE
,
NULL
);
ok
(
events
[
0
]
!=
NULL
,
"CreateEvent failed: %u
\n
"
,
GetLastError
());
events
[
1
]
=
CreateEventW
(
NULL
,
FALSE
,
TRUE
,
NULL
);
ok
(
events
[
1
]
!=
NULL
,
"CreateEvent failed: %u
\n
"
,
GetLastError
());
status
=
pNtNotifyChangeKey
(
key
,
event
,
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
status
=
pNtNotifyChangeKey
(
key
,
events
[
0
],
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
status
=
pNtNotifyChangeKey
(
key
,
events
[
1
],
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
timeout
.
QuadPart
=
0
;
status
=
pNtWaitForSingleObject
(
event
,
FALSE
,
&
timeout
);
status
=
pNtWaitForSingleObject
(
events
[
0
],
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_TIMEOUT
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
events
[
1
],
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_TIMEOUT
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
attr
.
RootDirectory
=
key
;
...
...
@@ -1539,25 +1545,49 @@ static void test_notify(void)
status
=
pNtCreateKey
(
&
subkey
,
GENERIC_ALL
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
event
,
FALSE
,
&
timeout
);
status
=
pNtWaitForSingleObject
(
events
[
0
],
FALSE
,
&
timeout
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
events
[
1
],
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtNotifyChangeKey
(
key
,
events
[
0
],
NULL
,
NULL
,
&
iosb
,
0
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
status
=
pNtNotifyChangeKey
(
key
,
events
[
1
],
NULL
,
NULL
,
&
iosb
,
0
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
status
=
pNtDeleteKey
(
subkey
);
ok
(
status
==
STATUS_SUCCESS
,
"NtDeleteSubkey failed: %x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
events
[
0
],
FALSE
,
&
timeout
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
events
[
1
],
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
pNtClose
(
subkey
);
status
=
pNtNotifyChangeKey
(
key
,
events
[
0
],
NULL
,
NULL
,
&
iosb
,
0
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
status
=
pNtNotifyChangeKey
(
key
,
events
[
1
],
NULL
,
NULL
,
&
iosb
,
0
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
pNtClose
(
key
);
status
=
pNtWaitForSingleObject
(
events
[
0
],
FALSE
,
&
timeout
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
events
[
1
],
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
if
(
pNtNotifyChangeMultipleKeys
)
{
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey Failed: 0x%08x
\n
"
,
status
);
status
=
pNtNotifyChangeMultipleKeys
(
key
,
0
,
NULL
,
event
,
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
status
=
pNtNotifyChangeMultipleKeys
(
key
,
0
,
NULL
,
event
s
[
0
]
,
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
timeout
.
QuadPart
=
0
;
status
=
pNtWaitForSingleObject
(
event
,
FALSE
,
&
timeout
);
status
=
pNtWaitForSingleObject
(
event
s
[
0
]
,
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_TIMEOUT
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
attr
.
RootDirectory
=
key
;
...
...
@@ -1566,7 +1596,7 @@ static void test_notify(void)
status
=
pNtCreateKey
(
&
subkey
,
GENERIC_ALL
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
event
,
FALSE
,
&
timeout
);
status
=
pNtWaitForSingleObject
(
event
s
[
0
]
,
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtDeleteKey
(
subkey
);
...
...
@@ -1579,7 +1609,8 @@ static void test_notify(void)
win_skip
(
"NtNotifyChangeMultipleKeys not available
\n
"
);
}
pNtClose
(
event
);
pNtClose
(
events
[
0
]);
pNtClose
(
events
[
1
]);
}
START_TEST
(
reg
)
...
...
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