Commit Graph

833 Commits

Author SHA1 Message Date
Rémi Bernon 25409b899c hidclass.sys: Return STATUS_INVALID_USER_BUFFER if buffer_len is 0.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:44 +02:00
Rémi Bernon 98c512e026 hidclass.sys: Pass sizeof(packet) as input for IOCTL_HID_SET_OUTPUT_REPORT.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:41 +02:00
Rémi Bernon ada3ec64a6 hidclass.sys: Use hid_device_xfer_report for IOCTL_HID_SET_OUTPUT_REPORT.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:37 +02:00
Rémi Bernon a2c902e68d ntoskrnl.exe/tests: Wait for second report first.
And increasing the polling period, so that first queued read is unlikely
to complete before we queued the second one.

This was meant to test that all pending reads are satisfied at once
after a poll, but it causes some spurious failures as they aren't
satisfied atomically (especially on Wine). As there's an increasing seq
counter in each poll it should be enough to compare the report data.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:59:31 +02:00
Rémi Bernon 6fd356e009 hidclass.sys: Introduce new hid_device_xfer_report helper.
From HID_IOCTL_GET_INPUT_REPORT code, to factor report buffer transfer,
and use it for HID_IOCTL_GET_FEATURE.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Rémi Bernon 1f3fdb3cb6 hidclass.sys: Adjust buffer length according to report IDs usage.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Rémi Bernon e8c6f13071 hidclass.sys: Always copy InputReportByteLength bytes into read buffer.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Rémi Bernon ecf6a16b8e hidclass.sys: Return irp->IoStatus.Information from minidriver.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon a8ab0fe08f hidclass.sys: Return STATUS_INVALID_PARAMETER when appropriate.
Instead of STATUS_BUFFER_TOO_SMALL when input report buffer length is
less than InputReportByteLength.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon 9c5ab964e9 hidclass.sys: Return STATUS_INVALID_USER_BUFFER when appropriate.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon 7096c26a2e hidclass.sys: Implement button array value caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Rémi Bernon 76b4d09afd ntoskrnl.exe/tests: Add some tests with concurrent reads in polled mode.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:59:23 +02:00
Rémi Bernon 80fa6850d6 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>
2021-08-02 22:59:23 +02:00
Rémi Bernon 3eb8c6cd4d hidclass.sys: Set IoStatus.Information in IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:59:23 +02:00
Rémi Bernon 5e57887bca 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>
2021-08-02 22:59:23 +02:00
Rémi Bernon e9c3dc02e8 ntoskrnl.exe/tests: Don't close HID device file twice.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:59:23 +02:00
Rémi Bernon be09039646 ntoskrnl.exe/tests: Return success from IOCTL_HID_GET_STRING.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:59:23 +02:00
Rémi Bernon 2a7b714471 ntoskrnl.exe/tests: Reduce todo_wine test verbosity.
Reducing the failure message and mute driver todos after first failure.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:59:23 +02:00
Rémi Bernon f24c8c75fe ntoskrnl.exe/tests: Add some IOCTL_HID_READ_REPORT tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 17:48:55 +02:00
Rémi Bernon d9d982df86 ntoskrnl.exe/tests: Add some IOCTL_HID_WRITE_REPORT tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 17:48:50 +02:00
Rémi Bernon e63bd6db23 ntoskrnl.exe/tests: Add HID driver test in polled mode.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 17:48:45 +02:00
Rémi Bernon 005504969e ntoskrnl.exe/tests: Return STATUS_PENDING from IOCTL_HID_READ_REPORT.
Marking input report read requests as pending and queueing them instead
of returning STATUS_NOT_IMPLEMENTED.

Windows also calls IRP_MN_(QUERY|CANCEL)_REMOVE_DEVICE on device
initialization and we have to implement them for the test to not
timeout.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 17:48:42 +02:00
Rémi Bernon b065daa600 ntoskrnl.exe: Send IRP_MN_SURPRISE_REMOVAL to the device stack first.
Instead of sending both IRP_MN_SURPRISE_REMOVAL and IRP_MN_REMOVE_DEVICE
to all children first.

They may have pending IRPs sent to their parent PDO driver, which need
to be cancelled before IRP_MN_REMOVE_DEVICE can complete. This is the
case for hidclass.sys and its thread calling the lower driver for
instance.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 17:48:34 +02:00
Rémi Bernon d5c9b26538 ntoskrnl.exe/tests: Add some HidD_SetOutputReport tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:56:43 +02:00
Rémi Bernon d2ad6274a2 ntoskrnl.exe/tests: Add some HidD_SetFeature tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:56:40 +02:00
Rémi Bernon 48b4b99f8f ntoskrnl.exe/tests: Add some HidD_GetFeature tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:56:38 +02:00
Rémi Bernon 8d63ccd199 ntoskrnl.exe/tests: Add some HidD_GetInputReport tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:56:35 +02:00
Rémi Bernon e2e0e5aae4 ntoskrnl.exe/tests: Add more tests for button array caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:56:33 +02:00
Rémi Bernon ebb161243e ntoskrnl.exe/tests: Sync test utils with wine/test.h.
Adding support for thread local test data and context.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:56:01 +02:00
Rémi Bernon 7c7e77da9d ntoskrnl.exe/tests: Only count test driver load notify.
Sometimes Windows loads other drivers when we don't expect it, and
this causes spurious failures.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 19:55:42 +02:00
Rémi Bernon 2862ff6ba7 ntoskrnl.exe: Implement Ke(Initialize|Insert|Remove)DeviceQueue.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 20:01:20 +02:00
Rémi Bernon 19d1375bce ntoskrnl.exe/tests: Add some pending / remove tests.
This shows that removing a device should send IRP_MN_SURPRISE_REMOVAL
only, and that it's still possible to use DeviceIoControl on already
opened handles.

IRP_MN_REMOVE_DEVICE should only be sent when all then opened handles
are closed.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 20:01:20 +02:00
Rémi Bernon bd26083162 include: Declare KeInitializeSpinLock as static FORCEINLINE.
And internally rename the ntoskrnl.exe export.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 20:01:20 +02:00
Rémi Bernon c2e9ee36d3 ntoskrnl.exe/tests: Retry timer wait to address spurious failures.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 19:55:22 +02:00
Rémi Bernon 7f0e91f5aa hid: Always return node count in HidP_GetLinkCollectionNodes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:28 +02:00
Rémi Bernon b860281d32 hid: Rewrite HidP_GetData using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:28 +02:00
Rémi Bernon 1c4e7a00a3 hid: Rewrite HidP_MaxDataListLength using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:28 +02:00
Rémi Bernon 28bbaf6707 hid: Return HIDP_STATUS_INCOMPATIBLE_REPORT_ID when id mismatches.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Rémi Bernon 38d863f1f7 hid: Rewrite HidP_GetScaledUsageValue using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:34:22 +02:00
Rémi Bernon 7650f87737 hid: Rewrite HidP_GetUsageValue using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:34:17 +02:00
Rémi Bernon cb5856695c hid: Rewrite HidP_SetUsageValue using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:34:13 +02:00
Rémi Bernon 0a192647fe hid: Rewrite HidP_GetUsageValueArray using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:34:09 +02:00
Rémi Bernon 334c6cf8f4 hid: Introduce new copy_bits helper for HidP_SetUsageValueArray.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:34:05 +02:00
Rémi Bernon f8e6965036 hid: Rewrite HidP_GetUsagesEx using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 22:03:07 +02:00
Rémi Bernon 1184afb640 hid: Rewrite HidP_GetUsages using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 22:03:00 +02:00
Rémi Bernon 14caae214f hid: Rewrite HidP_MaxUsageListLength using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 22:02:49 +02:00
Rémi Bernon dae8caf9f0 hid: Rewrite HidP_GetSpecificValueCaps using enum_value_caps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-24 22:02:44 +02:00
Rémi Bernon ad03df1222 hid: Introduce new enum_value_caps helper for HidP_GetSpecificButtonCaps.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 22:27:33 +02:00
Rémi Bernon 04bd7c9d68 hid: Introduce new get_value_caps_range helper for HidP_InitializeReportForID.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-23 22:27:27 +02:00
Rémi Bernon f266b2b5d4 hidclass.sys: Create link collection caps during parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-18 16:48:48 +02:00
Rémi Bernon 152aafc73f hidclass.sys: Set BitField item to current value.
As documented on MSDN, and as testing shows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:03:15 +02:00
Rémi Bernon 34cbc202f3 hidclass.sys: Add a stack to parser_state to store global items.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:03:01 +02:00
Rémi Bernon 612c1b664c ntoskrnl.exe/tests: Add some HidP_GetData tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 23:23:49 +02:00
Rémi Bernon 934451f703 ntoskrnl.exe/tests: Add some HidP get/set usages tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 23:23:49 +02:00
Rémi Bernon 6e8de89c7c ntoskrnl.exe/tests: Add some HidP get/set values tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 23:23:49 +02:00
Rémi Bernon cc4e069494 ntoskrnl.exe/tests: Add more reports with complex HID syntax.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 23:23:49 +02:00
Rémi Bernon 731dd7de44 ntoskrnl.exe/tests: Add tests with and without report IDs.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 15:37:46 +02:00
Rémi Bernon 2191c0f4b5 ntoskrnl.exe/tests: Don't call CertFreeCertificateContext on cleanup.
It seems to crash the test on w864.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:43:24 +02:00
Rémi Bernon c1b80538b3 ntoskrnl.exe/tests: Add some HidP_InitializeReportForID tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 23:04:04 +02:00
Rémi Bernon 49f4db5e1a ntoskrnl.exe/tests: Add some HidP_GetLinkCollectionNodes tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 23:04:04 +02:00
Rémi Bernon 3e36af2e96 ntoskrnl.exe/tests: Add some HidP_Get(Specific)ValueCaps tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 23:04:04 +02:00
Rémi Bernon 3b96cb8bae ntoskrnl.exe/tests: Add some HidP_Get(Specific)ButtonCaps tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 23:04:04 +02:00
Rémi Bernon 21fa04194c ntoskrnl.exe/tests: Add some buttons and hatswitch controls.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-09 11:55:14 +02:00
Rémi Bernon 1722f87938 ntoskrnl.exe/tests: Use HID helper macros to write report descriptors.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-09 11:55:11 +02:00
Rémi Bernon 4c81c50f44 ntoskrnl.exe/tests: Silent a todo_wine failing test after a while.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-09 11:55:08 +02:00
Alexandre Julliard 171de0a7f6 kernel32: Fix GetLogicalProcessorInformationEx() usage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-26 21:29:37 +02:00
Arkadiusz Hiler 50210ea244 ntoskrnl: Implement IoSetDevicePropertyData().
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Arkadiusz Hiler <arek@hiler.eu>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 23:19:54 +02:00
Louis Lenders 1a02b3f1c6 ntdll: Stub RtlQueryProcessPlaceholderCompatibilityMode().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50026
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +02:00
Zebediah Figura 4084200765 ntoskrnl/tests: Open the HID device with FILE_SHARE_READ | FILE_SHARE_WRITE.
Fixes a test failure on Windows 10.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +02:00
Zebediah Figura c5565a74c3 hidclass.sys: Defer creating a child device until IRP_MN_START_DEVICE.
This is necessary to allow the Hauppauge CIR receiver driver for cx2310x drivers
(hcw10cir.sys) to start.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:09 +02:00
Zebediah Figura 06ab067758 hidclass.sys: Set PhysicalDeviceObject to the bus PDO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 22:06:56 +02:00
Zebediah Figura f34b735eba hidclass.sys: Create separate parent FDO and child PDO objects.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:45 +02:00
Zebediah Figura e3460ceb62 ntoskrnl/tests: Add some tests for HID devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:51:16 +02:00
Zebediah Figura 364df14842 ntoskrnl: Forbid unloading a driver with running root PnP devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:51:11 +02:00
Zebediah Figura 5bf72a75e3 ntoskrnl: Remove the device from the root device list in IRP_MN_REMOVE_DEVICE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 20:51:09 +02:00
Zebediah Figura 8417f634a6 ntoskrnl/tests: Handle IRP_MJ_POWER requests.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Zebediah Figura 94037f90a0 ntoskrnl: Do not send power IRPs on device start and removal.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Zebediah Figura 48b2e67d09 ntoskrnl: Start the device even without a function driver if it reports RawDeviceOK.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Zebediah Figura 5e63c849b4 ntoskrnl/tests: Test child device enumeration.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Zebediah Figura cac26c77c9 ntoskrnl/tests: Add some tests for WM_DEVICECHANGE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Zebediah Figura afce9f2c33 ntoskrnl/tests: Properly support device removal.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-09 20:37:23 +02:00
Zebediah Figura 3b08a51b4e ntoskrnl/tests: Add some tests for device interfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 12:14:31 +02:00
Zebediah Figura 316b8b8589 ntoskrnl/tests: Test querying capabilities from the root-enumerated PDO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 12:14:31 +02:00
Zebediah Figura 5ed5cf0ee5 ntoskrnl/tests: Test querying device IDs from the root-enumerated PDO.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 12:14:31 +02:00
Zebediah Figura e3ca290a4c ntoskrnl/tests: Keep the test output file open for the entire duration each driver is loaded.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Zebediah Figura cfa7006f79 ntoskrnl/tests: Create the driver output file only once.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Zebediah Figura 57d438b5d3 ntoskrnl/tests: Separate a helper to print the contents of the driver output file.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Zebediah Figura 553eb70ebf ntoskrnl/tests: Write test counts to the shared memory section.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Zebediah Figura 55a166d17e ntoskrnl/tests: Retrieve test global variables from a memory section.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Zebediah Figura 801d116733 ntoskrnl/tests: Factor out winetest_init() and winetest_cleanup().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 22:36:11 +02:00
Zebediah Figura b1eba2266a ntoskrnl/tests: Use a more descriptive name for the netio test driver.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:08:29 +02:00
Zebediah Figura 3d3c411d05 ntoskrnl/tests: Remove some duplicate tests from the netio driver.
These are already tested in the main driver; there's no need to test them again.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:08:25 +02:00
Zebediah Figura cf1f8c6718 ntoskrnl/tests: Open the test output file using a hardcoded path.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:08:15 +02:00
Zebediah Figura fa928d16c3 ntoskrnl/tests: Use a hard-coded file path in test_obj_reference().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:08:08 +02:00
Zebediah Figura f5c1a92b7e ntoskrnl/tests: Test discovery of the root PnP device via setupapi.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:55 +02:00
Zebediah Figura c4986ee2d5 ntoskrnl/tests: Add a basic PnP test driver.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:16:05 +02:00
Zebediah Figura eb5ff50276 ntoskrnl/tests: Skip all tests under WoW64.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:15:51 +02:00
Zebediah Figura 73bfe36eab winedevice: Introduce a custom service control to reënumerate root PnP devices.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:15:25 +02:00
Zebediah Figura 6977b81807 ntoskrnl: Store root PnP devices per driver.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:14:27 +02:00
Zebediah Figura 414003e2d9 ntoskrnl: Store root PnP devices in a linked list.
It is quite rare to have more than one or two of these, and lists are slightly
easier to work with.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:13:54 +02:00