ntoskrnl.exe/tests: Avoid race condition in test driver.

Might fix random driver crash on testbot Win8 machine.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Paul Gofman 2020-06-03 14:29:44 +03:00 committed by Alexandre Julliard
parent 8d7c39b860
commit d0d1601e6c
1 changed files with 2 additions and 1 deletions

View File

@ -2194,7 +2194,9 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
main_test_work_item = IoAllocateWorkItem(lower_device);
ok(main_test_work_item != NULL, "main_test_work_item = NULL\n");
IoMarkIrpPending(irp);
IoQueueWorkItem(main_test_work_item, main_test_task, DelayedWorkQueue, irp);
return STATUS_PENDING;
}
@ -2380,7 +2382,6 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp)
irp->IoStatus.Status = status;
IoCompleteRequest(irp, IO_NO_INCREMENT);
}
else IoMarkIrpPending(irp);
return status;
}