Module: wine Branch: master Commit: 4640081494533f790c16d3a916a9fa09cb7edaa8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4640081494533f790c16d3a91...
Author: Detlef Riekenberg wine.dev@web.de Date: Thu Mar 21 15:19:49 2019 +0100
hid/tests: Do not fail when the device is busy.
Some devices do not allow shared access (mouse, sound device).
Signed-off-by: Detlef Riekenberg wine.dev@web.de Signed-off-by: Aric Stewart aric@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/hid/tests/device.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/hid/tests/device.c b/dlls/hid/tests/device.c index ff17229..4651ced 100644 --- a/dlls/hid/tests/device.c +++ b/dlls/hid/tests/device.c @@ -79,6 +79,12 @@ static void run_for_each_device(device_test *test) trace("Not enough permissions to read device %s.\n", wine_dbgstr_w(data->DevicePath)); continue; } + if (file == INVALID_HANDLE_VALUE && GetLastError() == ERROR_SHARING_VIOLATION) + { + trace("Device is busy: %s.\n", wine_dbgstr_w(data->DevicePath)); + continue; + } + ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", wine_dbgstr_w(data->DevicePath), GetLastError());