Commit 3f290740 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput/tests: Remove output and feature report buffers length checks.

They are checked against the expected packet anyway, and they otherwise are enforced to match their specific individual report length, which we don't have any info about here. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 92f05bd3
......@@ -1072,11 +1072,10 @@ static NTSTATUS WINAPI pdo_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
case IOCTL_HID_WRITE_REPORT:
{
HID_XFER_PACKET *packet = irp->UserBuffer;
ULONG expected_size = impl->caps.OutputReportByteLength - (impl->use_report_id ? 0 : 1);
ok( in_size == sizeof(*packet), "got input size %lu\n", in_size );
ok( !out_size, "got output size %lu\n", out_size );
ok( packet->reportBufferLen >= expected_size, "got report size %lu\n", packet->reportBufferLen );
ok( !!packet->reportBuffer, "got buffer %p\n", packet->reportBuffer );
expect_queue_next( &impl->expect_queue, code, packet, &index, &expect, TRUE, context, sizeof(context) );
winetest_push_context( "%s expect[%ld]", context, index );
......@@ -1095,11 +1094,9 @@ static NTSTATUS WINAPI pdo_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
case IOCTL_HID_GET_INPUT_REPORT:
{
HID_XFER_PACKET *packet = irp->UserBuffer;
ULONG expected_size = impl->caps.InputReportByteLength - (impl->use_report_id ? 0 : 1);
ok( !in_size, "got input size %lu\n", in_size );
ok( out_size == sizeof(*packet), "got output size %lu\n", out_size );
ok( packet->reportBufferLen >= expected_size, "got len %lu\n", packet->reportBufferLen );
ok( !!packet->reportBuffer, "got buffer %p\n", packet->reportBuffer );
expect_queue_next( &impl->expect_queue, code, packet, &index, &expect, FALSE, context, sizeof(context) );
......@@ -1119,11 +1116,9 @@ static NTSTATUS WINAPI pdo_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
case IOCTL_HID_SET_OUTPUT_REPORT:
{
HID_XFER_PACKET *packet = irp->UserBuffer;
ULONG expected_size = impl->caps.OutputReportByteLength - (impl->use_report_id ? 0 : 1);
ok( in_size == sizeof(*packet), "got input size %lu\n", in_size );
ok( !out_size, "got output size %lu\n", out_size );
ok( packet->reportBufferLen >= expected_size, "got len %lu\n", packet->reportBufferLen );
ok( !!packet->reportBuffer, "got buffer %p\n", packet->reportBuffer );
expect_queue_next( &impl->expect_queue, code, packet, &index, &expect, TRUE, context, sizeof(context) );
......@@ -1143,11 +1138,9 @@ static NTSTATUS WINAPI pdo_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
case IOCTL_HID_GET_FEATURE:
{
HID_XFER_PACKET *packet = irp->UserBuffer;
ULONG expected_size = impl->caps.FeatureReportByteLength - (impl->use_report_id ? 0 : 1);
ok( !in_size, "got input size %lu\n", in_size );
ok( out_size == sizeof(*packet), "got output size %lu\n", out_size );
ok( packet->reportBufferLen >= expected_size, "got len %lu\n", packet->reportBufferLen );
ok( !!packet->reportBuffer, "got buffer %p\n", packet->reportBuffer );
expect_queue_next( &impl->expect_queue, code, packet, &index, &expect, FALSE, context, sizeof(context) );
......@@ -1167,11 +1160,9 @@ static NTSTATUS WINAPI pdo_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
case IOCTL_HID_SET_FEATURE:
{
HID_XFER_PACKET *packet = irp->UserBuffer;
ULONG expected_size = impl->caps.FeatureReportByteLength - (impl->use_report_id ? 0 : 1);
ok( in_size == sizeof(*packet), "got input size %lu\n", in_size );
ok( !out_size, "got output size %lu\n", out_size );
ok( packet->reportBufferLen >= expected_size, "got len %lu\n", packet->reportBufferLen );
ok( !!packet->reportBuffer, "got buffer %p\n", packet->reportBuffer );
expect_queue_next( &impl->expect_queue, code, packet, &index, &expect, TRUE, context, sizeof(context) );
......
......@@ -2012,7 +2012,11 @@ static BOOL test_force_feedback_joystick( DWORD version )
struct hid_device_desc desc =
{
.use_report_id = TRUE,
.caps = { .InputReportByteLength = 5 },
.caps =
{
.InputReportByteLength = 5,
.OutputReportByteLength = 11,
},
.attributes = default_attributes,
};
const DIDEVCAPS expect_caps =
......@@ -3467,7 +3471,12 @@ static void test_device_managed_effect(void)
struct hid_device_desc desc =
{
.use_report_id = TRUE,
.caps = { .InputReportByteLength = 5 },
.caps =
{
.InputReportByteLength = 5,
.OutputReportByteLength = 11,
.FeatureReportByteLength = 5,
},
.attributes = default_attributes,
};
struct hid_expect expect_acquire[] =
......@@ -5004,7 +5013,12 @@ static void test_windows_gaming_input(void)
struct hid_device_desc desc =
{
.use_report_id = TRUE,
.caps = { .InputReportByteLength = 6 },
.caps =
{
.InputReportByteLength = 6,
.OutputReportByteLength = 11,
.FeatureReportByteLength = 5,
},
.attributes = default_attributes,
};
struct hid_expect expect_init[] =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment