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
80fa6850
Commit
80fa6850
authored
Aug 02, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe/tests: Add some IOCTL_HID_(GET|SET)_POLL_FREQUENCY_MSEC tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3eb8c6cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+32
-1
No files found.
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
80fa6850
...
...
@@ -2704,6 +2704,7 @@ static void test_hid_device(DWORD report_id, DWORD polled)
SP_DEVICE_INTERFACE_DETAIL_DATA_A
*
iface_detail
=
(
void
*
)
buffer
;
SP_DEVICE_INTERFACE_DATA
iface
=
{
sizeof
(
iface
)};
SP_DEVINFO_DATA
device
=
{
sizeof
(
device
)};
ULONG
count
,
poll_freq
,
out_len
;
HANDLE
file
,
async_file
;
BOOL
ret
,
found
=
FALSE
;
OBJECT_ATTRIBUTES
attr
;
...
...
@@ -2712,7 +2713,6 @@ static void test_hid_device(DWORD report_id, DWORD polled)
NTSTATUS
status
;
unsigned
int
i
;
HDEVINFO
set
;
ULONG
count
;
winetest_push_context
(
"id %d%s"
,
report_id
,
polled
?
" poll"
:
""
);
...
...
@@ -2797,6 +2797,37 @@ static void test_hid_device(DWORD report_id, DWORD polled)
ok
(
ret
,
"HidD_GetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
16
,
"HidD_GetNumInputBuffers returned %u
\n
"
,
count
);
if
(
polled
)
{
out_len
=
sizeof
(
ULONG
);
SetLastError
(
0xdeadbeef
);
ret
=
sync_ioctl
(
file
,
IOCTL_HID_GET_POLL_FREQUENCY_MSEC
,
NULL
,
0
,
&
poll_freq
,
&
out_len
);
ok
(
ret
,
"IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error %u
\n
"
,
GetLastError
());
ok
(
out_len
==
sizeof
(
ULONG
),
"got out_len %u, expected sizeof(ULONG)
\n
"
,
out_len
);
todo_wine
ok
(
poll_freq
==
5
,
"got poll_freq %u, expected 5
\n
"
,
poll_freq
);
out_len
=
0
;
poll_freq
=
50
;
SetLastError
(
0xdeadbeef
);
ret
=
sync_ioctl
(
file
,
IOCTL_HID_SET_POLL_FREQUENCY_MSEC
,
&
poll_freq
,
sizeof
(
ULONG
),
NULL
,
&
out_len
);
ok
(
ret
,
"IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error %u
\n
"
,
GetLastError
());
ok
(
out_len
==
0
,
"got out_len %u, expected 0
\n
"
,
out_len
);
out_len
=
sizeof
(
ULONG
);
SetLastError
(
0xdeadbeef
);
ret
=
sync_ioctl
(
file
,
IOCTL_HID_GET_POLL_FREQUENCY_MSEC
,
NULL
,
0
,
&
poll_freq
,
&
out_len
);
ok
(
ret
,
"IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error %u
\n
"
,
GetLastError
());
ok
(
out_len
==
sizeof
(
ULONG
),
"got out_len %u, expected sizeof(ULONG)
\n
"
,
out_len
);
ok
(
poll_freq
==
50
,
"got poll_freq %u, expected 100
\n
"
,
poll_freq
);
out_len
=
sizeof
(
ULONG
);
SetLastError
(
0xdeadbeef
);
ret
=
sync_ioctl
(
async_file
,
IOCTL_HID_GET_POLL_FREQUENCY_MSEC
,
NULL
,
0
,
&
poll_freq
,
&
out_len
);
ok
(
ret
,
"IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error %u
\n
"
,
GetLastError
());
ok
(
out_len
==
sizeof
(
ULONG
),
"got out_len %u, expected sizeof(ULONG)
\n
"
,
out_len
);
ok
(
poll_freq
==
50
,
"got poll_freq %u, expected 100
\n
"
,
poll_freq
);
}
test_hidp
(
file
,
report_id
,
polled
);
CloseHandle
(
async_file
);
...
...
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