Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntoskrnl.exe/tests/driver.c | 109 +++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 7 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 7ee48696c09..65c7860e786 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1737,11 +1737,44 @@ static void test_stack_limits(void) ok(low < (ULONG_PTR)&low && (ULONG_PTR)&low < high, "stack variable is not in stack limits\n"); }
-static unsigned int got_completion; +static unsigned int got_completion, completion_lower_pending, completion_upper_pending;
static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *context) { + IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); ok(device == context, "Got device %p; expected %p.\n", device, context); + + if (device == upper_device) + { + todo_wine_if (completion_lower_pending) + ok(irp->PendingReturned == completion_lower_pending, "Got PendingReturned %u, expected %u.\n", + irp->PendingReturned, completion_lower_pending); + + ok(irp->CurrentLocation == 2, "Got current location %u.\n", irp->CurrentLocation); + ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS), + "Got control flags %#x.\n", stack->Control); + stack = IoGetNextIrpStackLocation(irp); + todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + stack = irp->Tail.Overlay.CurrentStackLocation + 1; /* previous location */ + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + + if (irp->PendingReturned && completion_upper_pending) + IoMarkIrpPending(irp); + } + else + { + todo_wine_if (completion_upper_pending) + ok(irp->PendingReturned == completion_upper_pending, "Got PendingReturned %u, expected %u.\n", + irp->PendingReturned, completion_upper_pending); + + ok(irp->CurrentLocation == 3, "Got current location %u.\n", irp->CurrentLocation); + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + stack = IoGetNextIrpStackLocation(irp); + todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + stack = irp->Tail.Overlay.CurrentStackLocation - 2; /* lowest location */ + todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + } + ++got_completion; return STATUS_SUCCESS; } @@ -1753,15 +1786,50 @@ static void test_completion(void) KEVENT event; IRP *irp;
+ completion_lower_pending = completion_upper_pending = FALSE; + KeInitializeEvent(&event, NotificationEvent, FALSE);
irp = IoBuildDeviceIoControlRequest(IOCTL_WINETEST_COMPLETION, upper_device, NULL, 0, NULL, 0, FALSE, &event, &io); - IoSetCompletionRoutine(irp, completion_cb, NULL, TRUE, TRUE, TRUE); ret = IoCallDriver(upper_device, irp); ok(ret == STATUS_SUCCESS, "IoCallDriver returned %#x\n", ret); ok(got_completion == 2, "got %u calls to completion routine\n", got_completion); + + completion_lower_pending = TRUE; + got_completion = 0; + + irp = IoBuildDeviceIoControlRequest(IOCTL_WINETEST_COMPLETION, upper_device, + NULL, 0, NULL, 0, FALSE, &event, &io); + IoSetCompletionRoutine(irp, completion_cb, NULL, TRUE, TRUE, TRUE); + ret = IoCallDriver(upper_device, irp); + ok(ret == STATUS_PENDING, "IoCallDriver returned %#x\n", ret); + ok(!got_completion, "got %u calls to completion routine\n", got_completion); + + ok(irp->CurrentLocation == 1, "Got current location %u.\n", irp->CurrentLocation); + ok(!irp->PendingReturned, "Got pending flag %u.\n", irp->PendingReturned); + + irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(irp, IO_NO_INCREMENT); + ok(got_completion == 2, "got %u calls to completion routine\n", got_completion); + + completion_upper_pending = TRUE; + got_completion = 0; + + irp = IoBuildDeviceIoControlRequest(IOCTL_WINETEST_COMPLETION, upper_device, + NULL, 0, NULL, 0, FALSE, &event, &io); + IoSetCompletionRoutine(irp, completion_cb, NULL, TRUE, TRUE, TRUE); + ret = IoCallDriver(upper_device, irp); + ok(ret == STATUS_PENDING, "IoCallDriver returned %#x\n", ret); + ok(!got_completion, "got %u calls to completion routine\n", got_completion); + + ok(irp->CurrentLocation == 1, "Got current location %u.\n", irp->CurrentLocation); + ok(!irp->PendingReturned, "Got pending flag %u.\n", irp->PendingReturned); + + irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(irp, IO_NO_INCREMENT); + ok(got_completion == 2, "got %u calls to completion routine\n", got_completion); }
static void test_IoAttachDeviceToDeviceStack(void) @@ -2392,10 +2460,19 @@ static NTSTATUS test_mismatched_status_ioctl(IRP *irp, IO_STACK_LOCATION *stack, return STATUS_SUCCESS; }
-static NTSTATUS test_completion_ioctl(DEVICE_OBJECT *device, IRP *irp) +static NTSTATUS completion_ioctl(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack) { if (device == upper_device) { + ok(irp->CurrentLocation == 2, "Got current location %u.\n", irp->CurrentLocation); + ok(!irp->PendingReturned, "Got pending flag %u.\n", irp->PendingReturned); + ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS), + "Got control flags %#x.\n", stack->Control); + stack = IoGetNextIrpStackLocation(irp); + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + stack = irp->Tail.Overlay.CurrentStackLocation + 1; /* previous location */ + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + IoCopyCurrentIrpStackLocationToNext(irp); IoSetCompletionRoutine(irp, completion_cb, upper_device, TRUE, TRUE, TRUE); return IoCallDriver(lower_device, irp); @@ -2403,9 +2480,27 @@ static NTSTATUS test_completion_ioctl(DEVICE_OBJECT *device, IRP *irp) else { ok(device == lower_device, "Got wrong device.\n"); - irp->IoStatus.Status = STATUS_SUCCESS; - IoCompleteRequest(irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; + ok(irp->CurrentLocation == 1, "Got current location %u.\n", irp->CurrentLocation); + ok(!irp->PendingReturned, "Got pending flag %u.\n", irp->PendingReturned); + ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS), + "Got control flags %#x.\n", stack->Control); + stack = irp->Tail.Overlay.CurrentStackLocation + 1; /* previous location */ + ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS), + "Got control flags %#x.\n", stack->Control); + stack = irp->Tail.Overlay.CurrentStackLocation + 2; /* top location */ + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + + if (completion_lower_pending) + { + IoMarkIrpPending(irp); + return STATUS_PENDING; + } + else + { + irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; + } } }
@@ -2481,7 +2576,7 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp) case IOCTL_WINETEST_MISMATCHED_STATUS: return test_mismatched_status_ioctl(irp, stack, &irp->IoStatus.Information); case IOCTL_WINETEST_COMPLETION: - return test_completion_ioctl(device, irp); + return completion_ioctl(device, irp, stack); default: break; }
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 1 + dlls/ntoskrnl.exe/tests/driver.c | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index fb3f9a23152..b2ffb7cfbb2 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1989,6 +1989,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost ) device = IoGetCurrentIrpStackLocation(irp)->DeviceObject; else device = NULL; + irp->PendingReturned = !!(irpsp->Control & SL_PENDING_RETURNED); if (call_flag) { TRACE( "calling %p( %p, %p, %p )\n", routine, device, irp, irpsp->Context ); diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 65c7860e786..8a4856ca3f0 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1746,9 +1746,8 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont
if (device == upper_device) { - todo_wine_if (completion_lower_pending) - ok(irp->PendingReturned == completion_lower_pending, "Got PendingReturned %u, expected %u.\n", - irp->PendingReturned, completion_lower_pending); + ok(irp->PendingReturned == completion_lower_pending, "Got PendingReturned %u, expected %u.\n", + irp->PendingReturned, completion_lower_pending);
ok(irp->CurrentLocation == 2, "Got current location %u.\n", irp->CurrentLocation); ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS), @@ -1763,9 +1762,8 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont } else { - todo_wine_if (completion_upper_pending) - ok(irp->PendingReturned == completion_upper_pending, "Got PendingReturned %u, expected %u.\n", - irp->PendingReturned, completion_upper_pending); + ok(irp->PendingReturned == completion_upper_pending, "Got PendingReturned %u, expected %u.\n", + irp->PendingReturned, completion_upper_pending);
ok(irp->CurrentLocation == 3, "Got current location %u.\n", irp->CurrentLocation); ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=96223
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:2954: Test failed: failed to register device, error 0xe000020b ntoskrnl.c:2766: Test failed: id 0 poll: didn't find device ntoskrnl.c:2770: Test failed: id 0 poll: got error 5 ntoskrnl.c:2775: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2776: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2781: Test failed: id 0 poll: HidD_SetNumInputBuffers returned error 6 ntoskrnl.c:2785: Test failed: id 0 poll: HidD_SetNumInputBuffers returned error 6 ntoskrnl.c:2789: Test failed: id 0 poll: HidD_SetNumInputBuffers failed last error 6 ntoskrnl.c:2794: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2795: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2800: Test failed: id 0 poll: got error 5 ntoskrnl.c:2805: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2806: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2810: Test failed: id 0 poll: HidD_SetNumInputBuffers failed last error 6 ntoskrnl.c:2815: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2816: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2820: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2821: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2828: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2830: Test failed: id 0 poll: got poll_freq 6637208, expected 5 ntoskrnl.c:2836: Test failed: id 0 poll: IOCTL_HID_SET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2843: Test failed: id 0 poll: IOCTL_HID_SET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2850: Test failed: id 0 poll: IOCTL_HID_SET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2856: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2858: Test failed: id 0 poll: got poll_freq 0, expected 10000 ntoskrnl.c:2864: Test failed: id 0 poll: IOCTL_HID_SET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2870: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:1890: Test failed: id 0 poll: HidD_GetPreparsedData failed with error 6 ntoskrnl.c:1896: Test failed: id 0 poll: HidP_GetCaps returned 0xc0110001 ntoskrnl.c:1897: Test failed: id 0 poll: got InputReportByteLength 23, expected 24 ntoskrnl.c:1897: Test failed: id 0 poll: got OutputReportByteLength 2, expected 3 ntoskrnl.c:1897: Test failed: id 0 poll: got FeatureReportByteLength 17, expected 18 ntoskrnl.c:1901: Test failed: id 0 poll: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1902: Test failed: id 0 poll: got 0 collection nodes, expected 10 ntoskrnl.c:1908: Test failed: id 0 poll: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1909: Test failed: id 0 poll: got 16 collection nodes, expected 10 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got LinkUsage 0074, expected 0004 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got LinkUsagePage 0076, expected 0001 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got Parent 56092, expected 0 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got NumberOfChildren 65, expected 7 ntoskrnl.c:1921: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1923: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1926: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1927: Test failed: id 0 poll: HidP_GetButtonCaps returned count 0, expected 13 ntoskrnl.c:1934: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1935: Test failed: id 0 poll: HidP_GetButtonCaps returned count 16, expected 13 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got BitField 0, expected 2 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got BitField 0, expected 3 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got UsagePage 0000, expected 0007 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got BitField 0, expected 508 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got BitField 0, expected 2 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got NotRange.Usage 0000, expected 0020 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got NotRange.DataIndex 0, expected 26 ntoskrnl.c:1947: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1949: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1952: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1953: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 0, expected 13 ntoskrnl.c:1960: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1961: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 15, expected 13 ntoskrnl.c:1967: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1968: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 15, expected 1 ntoskrnl.c:1973: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1974: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1977: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1978: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1981: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1982: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1986: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1988: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1991: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1992: Test failed: id 0 poll: HidP_GetValueCaps returned count 0, expected 7 ntoskrnl.c:1998: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1999: Test failed: id 0 poll: HidP_GetValueCaps returned count 16, expected 7 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got UsagePage 3a43, expected 0001 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got ReportID 92, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsAlias 87, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got BitField 28265, expected 2 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkCollection 28516, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkUsage 29559, expected 4 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkUsagePage 18780, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsRange 78, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsStringRange 70, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsDesignatorRange 92, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsAbsolute 111, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got HasNull 101, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got BitSize 11830, expected 8 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got ReportCount 28265, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[1]: got ReportID 1, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[2]: got ReportID 1, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[3]: got ReportID 1, expected 0 ntoskrnl.c:2011: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2013: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2016: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2017: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 0, expected 7 ntoskrnl.c:2024: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2025: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 12, expected 7 ntoskrnl.c:2027: Test failed: id 0 poll: got UsagePage 0001, expected 3a43 ntoskrnl.c:2027: Test failed: id 0 poll: got ReportID 1, expected 92 ntoskrnl.c:2027: Test failed: id 0 poll: got IsAlias 0, expected 87 ntoskrnl.c:2027: Test failed: id 0 poll: got BitField 2, expected 28265 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkCollection 1, expected 28516 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkUsage 4, expected 29559 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkUsagePage 1, expected 18780 ntoskrnl.c:2027: Test failed: id 0 poll: got IsRange 0, expected 78 ntoskrnl.c:2027: Test failed: id 0 poll: got IsStringRange 0, expected 70 ntoskrnl.c:2027: Test failed: id 0 poll: got IsDesignatorRange 0, expected 92 ntoskrnl.c:2027: Test failed: id 0 poll: got IsAbsolute 1, expected 111 ntoskrnl.c:2027: Test failed: id 0 poll: got HasNull 0, expected 101 ntoskrnl.c:2027: Test failed: id 0 poll: got BitSize 4, expected 11830 ntoskrnl.c:2027: Test failed: id 0 poll: got ReportCount 2, expected 28265 ntoskrnl.c:2027: Test failed: id 0 poll: got LogicalMin 1, expected -128 ntoskrnl.c:2027: Test failed: id 0 poll: got LogicalMax 8, expected 127 ntoskrnl.c:2035: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2041: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2042: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2045: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2046: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2049: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2050: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2055: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2057: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2059: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2061: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2065: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2070: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2074: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2078: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2082: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2086: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2090: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2094: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2099: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2103: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2104: Test failed: id 0 poll: got value deadbeef, expected 0x80 ntoskrnl.c:2108: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2109: Test failed: id 0 poll: got value deadbeef, expected 0xffffff80 ntoskrnl.c:2114: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2118: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2119: Test failed: id 0 poll: got value deadbeef, expected 0x7f ntoskrnl.c:2124: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2128: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2129: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2134: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2138: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2139: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2143: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2144: Test failed: id 0 poll: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2149: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2153: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2154: Test failed: id 0 poll: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2159: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2163: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2164: Test failed: id 0 poll: got value deadbeef, expected 0x80000000 ntoskrnl.c:2169: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2173: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2174: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2179: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2183: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2184: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2189: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, 0) returned 0, expected 42 ntoskrnl.c:2191: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON) returned 0, expected 32 ntoskrnl.c:2193: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED) returned 0, expected 8 ntoskrnl.c:2195: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON) returned 0, expected 8 ntoskrnl.c:2203: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2209: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2215: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2221: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2226: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2227: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2233: Test failed: id 0 poll: got report[6] ffffffcd expected 0 ntoskrnl.c:2234: Test failed: id 0 poll: got report[7] ffffffcd expected 0 ntoskrnl.c:2238: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2241: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2245: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2250: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2256: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2257: Test failed: id 0 poll: got usage count 1, expected 2 ntoskrnl.c:2262: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2263: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2264: Test failed: id 0 poll: got usages[0] cdcd, expected 4 ntoskrnl.c:2265: Test failed: id 0 poll: got usages[1] cdcd, expected 6 ntoskrnl.c:2271: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2272: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2273: Test failed: id 0 poll: got usages[0] cdcd, expected 6 ntoskrnl.c:2274: Test failed: id 0 poll: got usages[1] cdcd, expected 4 ntoskrnl.c:2280: Test failed: id 0 poll: HidP_GetUsagesEx returned 0xc0110001 ntoskrnl.c:2281: Test failed: id 0 poll: got usage count 16, expected 4 ntoskrnl.c:2282: Test failed: id 0 poll: got usage_and_pages[0] UsagePage cdcd, expected 9 ntoskrnl.c:2284: Test failed: id 0 poll: got usage_and_pages[1] UsagePage cdcd, expected 9 ntoskrnl.c:2286: Test failed: id 0 poll: got usage_and_pages[2] UsagePage cdcd, expected 7 ntoskrnl.c:2288: Test failed: id 0 poll: got usage_and_pages[3] UsagePage cdcd, expected 7 ntoskrnl.c:2290: Test failed: id 0 poll: got usage_and_pages[4] UsagePage cdcd, expected 8 ntoskrnl.c:2292: Test failed: id 0 poll: got usage_and_pages[5] UsagePage cdcd, expected 8 ntoskrnl.c:2294: Test failed: id 0 poll: got usage_and_pages[0] Usage cdcd, expected 4 ntoskrnl.c:2296: Test failed: id 0 poll: got usage_and_pages[1] Usage cdcd, expected 6 ntoskrnl.c:2298: Test failed: id 0 poll: got usage_and_pages[2] Usage cdcd, expected 9 ntoskrnl.c:2300: Test failed: id 0 poll: got usage_and_pages[3] Usage cdcd, expected b ntoskrnl.c:2302: Test failed: id 0 poll: got usage_and_pages[4] Usage cdcd, expected 6 ntoskrnl.c:2304: Test failed: id 0 poll: got usage_and_pages[5] Usage cdcd, expected 4 ntoskrnl.c:2310: Test failed: id 0 poll: HidP_MaxDataListLength(HidP_Input) returned 0, expected 50 ntoskrnl.c:2314: Test failed: id 0 poll: HidP_MaxDataListLength(HidP_Feature) returned 0, expected 13 ntoskrnl.c:2318: Test failed: id 0 poll: HidP_GetData returned 0xc0110001 ntoskrnl.c:2319: Test failed: id 0 poll: got data count 1, expected 11 ntoskrnl.c:2322: Test failed: id 0 poll: HidP_GetData returned 0xc0110001 ntoskrnl.c:2326: Test failed: id 0 poll: data[1]: got DataIndex 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[2]: got DataIndex 0, expected 5 ntoskrnl.c:2327: Test failed: id 0 poll: data[2]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[3]: got DataIndex 0, expected 7 ntoskrnl.c:2327: Test failed: id 0 poll: data[3]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[4]: got DataIndex 0, expected 19 ntoskrnl.c:2327: Test failed: id 0 poll: data[4]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[5]: got DataIndex 0, expected 21 ntoskrnl.c:2327: Test failed: id 0 poll: data[5]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[6]: got DataIndex 0, expected 30 ntoskrnl.c:2326: Test failed: id 0 poll: data[7]: got DataIndex 0, expected 31 ntoskrnl.c:2326: Test failed: id 0 poll: data[8]: got DataIndex 0, expected 32 ntoskrnl.c:2327: Test failed: id 0 poll: data[8]: got RawValue 0, expected -17970434 ntoskrnl.c:2326: Test failed: id 0 poll: data[9]: got DataIndex 0, expected 37 ntoskrnl.c:2327: Test failed: id 0 poll: data[9]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[10]: got DataIndex 0, expected 39 ntoskrnl.c:2327: Test failed: id 0 poll: data[10]: got RawValue 0, expected 1 ntoskrnl.c:2333: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2337: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2342: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2360: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2364: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2369: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2375: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2379: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2384: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2391: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2398: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2401: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2405: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2410: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2414: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2419: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2420: Test failed: id 0 poll: got value deadbeef, expected 0x1005 ntoskrnl.c:2426: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2429: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2430: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2435: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2438: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2440: Test failed: id 0 poll: unexpected report value ntoskrnl.c:2445: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2450: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2455: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2464: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2475: Test failed: id 0 poll: HidD_GetInputReport failed, last error 6 ntoskrnl.c:2476: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2481: Test failed: id 0 poll: IOCTL_HID_GET_INPUT_REPORT failed, last error 6 ntoskrnl.c:2482: Test failed: id 0 poll: got length 46, expected 3 ntoskrnl.c:2483: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2488: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2493: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2498: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2507: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2518: Test failed: id 0 poll: HidD_GetFeature failed, last error 6 ntoskrnl.c:2519: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2524: Test failed: id 0 poll: IOCTL_HID_GET_FEATURE failed, last error 6 ntoskrnl.c:2525: Test failed: id 0 poll: got length 34, expected 3 ntoskrnl.c:2526: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2531: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2536: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2541: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2550: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2560: Test failed: id 0 poll: HidD_SetFeature failed, last error 6 ntoskrnl.c:2566: Test failed: id 0 poll: IOCTL_HID_SET_FEATURE returned error 6 ntoskrnl.c:2570: Test failed: id 0 poll: IOCTL_HID_SET_FEATURE failed, last error 6 ntoskrnl.c:2571: Test failed: id 0 poll: got length 0, expected 3 ntoskrnl.c:2576: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2583: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2588: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2597: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2607: Test failed: id 0 poll: HidD_SetOutputReport failed, last error 6 ntoskrnl.c:2613: Test failed: id 0 poll: IOCTL_HID_SET_OUTPUT_REPORT returned error 6 ntoskrnl.c:2617: Test failed: id 0 poll: IOCTL_HID_SET_OUTPUT_REPORT failed, last error 6 ntoskrnl.c:2618: Test failed: id 0 poll: got length 0, expected 3 ntoskrnl.c:2624: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2629: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2640: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2654: Test failed: id 0 poll: WriteFile failed, last error 6 ntoskrnl.c:2655: Test failed: id 0 poll: WriteFile wrote 0 ntoskrnl.c:2662: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2666: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2674: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2675: Test failed: id 0 poll: ReadFile returned 0 ntoskrnl.c:2676: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2685: Test failed: id 0 poll: ReadFile returned error 6 ntoskrnl: Timeout
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 1 + dlls/ntoskrnl.exe/tests/driver.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index b2ffb7cfbb2..f1248300683 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1990,6 +1990,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost ) else device = NULL; irp->PendingReturned = !!(irpsp->Control & SL_PENDING_RETURNED); + irpsp->Control = 0; if (call_flag) { TRACE( "calling %p( %p, %p, %p )\n", routine, device, irp, irpsp->Context ); diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 8a4856ca3f0..ce74b9e9512 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1753,7 +1753,7 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS), "Got control flags %#x.\n", stack->Control); stack = IoGetNextIrpStackLocation(irp); - todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); stack = irp->Tail.Overlay.CurrentStackLocation + 1; /* previous location */ ok(!stack->Control, "Got control flags %#x.\n", stack->Control);
@@ -1768,9 +1768,9 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont ok(irp->CurrentLocation == 3, "Got current location %u.\n", irp->CurrentLocation); ok(!stack->Control, "Got control flags %#x.\n", stack->Control); stack = IoGetNextIrpStackLocation(irp); - todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); stack = irp->Tail.Overlay.CurrentStackLocation - 2; /* lowest location */ - todo_wine ok(!stack->Control, "Got control flags %#x.\n", stack->Control); + ok(!stack->Control, "Got control flags %#x.\n", stack->Control); }
++got_completion;