[PATCH 2/2] hid/tests: Do not fail, when the device is busy
Detlef Riekenberg
wine.dev at web.de
Thu Mar 21 09:19:49 CDT 2019
Some devices do not allow shared access (mouse, sound device)
Example failures:
http://test.winehq.org/data/3d0cf846f9a2cef078c7c28c60e83334b9bf5f12/win8_dr-RS740-wow/hid:device.html
Patch tested:
https://testbot.winehq.org/JobDetails.pl?Key=49765
--
bye bye ...
... Detlef
Signed-off-by: Detlef Riekenberg <wine.dev at web.de>
---
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 ff17229785..4651ced06d 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());
--
2.21.0.windows.1
More information about the wine-devel
mailing list