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
5e57887b
Commit
5e57887b
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 HidD_(Get|Set)NumInputBuffers tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e9c3dc02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
1 deletion
+54
-1
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+54
-1
No files found.
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
5e57887b
...
...
@@ -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
)};
HANDLE
file
,
async_file
;
BOOL
ret
,
found
=
FALSE
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
string
;
...
...
@@ -2711,7 +2712,7 @@ static void test_hid_device(DWORD report_id, DWORD polled)
NTSTATUS
status
;
unsigned
int
i
;
HDEVINFO
set
;
HANDLE
file
;
ULONG
count
;
winetest_push_context
(
"id %d%s"
,
report_id
,
polled
?
" poll"
:
""
);
...
...
@@ -2745,8 +2746,60 @@ static void test_hid_device(DWORD report_id, DWORD polled)
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"got error %u
\n
"
,
GetLastError
());
count
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetNumInputBuffers
(
file
,
&
count
);
ok
(
ret
,
"HidD_GetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
32
,
"HidD_GetNumInputBuffers returned %u
\n
"
,
count
);
SetLastError
(
0xdeadbeef
);
ret
=
HidD_SetNumInputBuffers
(
file
,
1
);
ok
(
!
ret
,
"HidD_SetNumInputBuffers succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"HidD_SetNumInputBuffers returned error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
HidD_SetNumInputBuffers
(
file
,
513
);
ok
(
!
ret
,
"HidD_SetNumInputBuffers succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"HidD_SetNumInputBuffers returned error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
HidD_SetNumInputBuffers
(
file
,
16
);
ok
(
ret
,
"HidD_SetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
count
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetNumInputBuffers
(
file
,
&
count
);
ok
(
ret
,
"HidD_GetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
16
,
"HidD_GetNumInputBuffers returned %u
\n
"
,
count
);
async_file
=
CreateFileA
(
iface_detail
->
DevicePath
,
FILE_READ_ACCESS
|
FILE_WRITE_ACCESS
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
FILE_FLAG_OVERLAPPED
|
FILE_FLAG_NO_BUFFERING
,
NULL
);
ok
(
async_file
!=
INVALID_HANDLE_VALUE
,
"got error %u
\n
"
,
GetLastError
());
count
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetNumInputBuffers
(
async_file
,
&
count
);
ok
(
ret
,
"HidD_GetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
32
,
"HidD_GetNumInputBuffers returned %u
\n
"
,
count
);
SetLastError
(
0xdeadbeef
);
ret
=
HidD_SetNumInputBuffers
(
async_file
,
2
);
ok
(
ret
,
"HidD_SetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
count
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetNumInputBuffers
(
async_file
,
&
count
);
ok
(
ret
,
"HidD_GetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
2
,
"HidD_GetNumInputBuffers returned %u
\n
"
,
count
);
count
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
HidD_GetNumInputBuffers
(
file
,
&
count
);
ok
(
ret
,
"HidD_GetNumInputBuffers failed last error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
16
,
"HidD_GetNumInputBuffers returned %u
\n
"
,
count
);
test_hidp
(
file
,
report_id
,
polled
);
CloseHandle
(
async_file
);
CloseHandle
(
file
);
RtlInitUnicodeString
(
&
string
,
L"
\\
??
\\
root#winetest#0#{deadbeef-29ef-4538-a5fd-b69573a362c0}"
);
...
...
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