Most api-calls in test_device_info access uninitialized memory, when called with INVALID_HANDLE_VALUE
this results in broken device names and crashes
Example failures: http://test.winehq.org/data/6325d85406fbf7f46770bc739da4b7e2c9b199d7/win8_dr...
Patch tested: https://testbot.winehq.org/JobDetails.pl?Key=49763
-- bye bye ... ... Detlef
Signed-off-by: Detlef Riekenberg wine.dev@web.de --- dlls/hid/tests/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/hid/tests/device.c b/dlls/hid/tests/device.c index f20677fb1b..ff17229785 100644 --- a/dlls/hid/tests/device.c +++ b/dlls/hid/tests/device.c @@ -82,7 +82,8 @@ static void run_for_each_device(device_test *test) ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", wine_dbgstr_w(data->DevicePath), GetLastError());
- test(file); + if (file != INVALID_HANDLE_VALUE) + test(file);
CloseHandle(file); } -- 2.21.0.windows.1
Some devices do not allow shared access (mouse, sound device)
Example failures: http://test.winehq.org/data/3d0cf846f9a2cef078c7c28c60e83334b9bf5f12/win8_dr...
Patch tested: https://testbot.winehq.org/JobDetails.pl?Key=49765
-- bye bye ... ... Detlef
Signed-off-by: Detlef Riekenberg wine.dev@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
Signed-off-by: Aric Stewart aric@codeweavers.com
On 3/21/19 9:19 AM, Detlef Riekenberg wrote:
Some devices do not allow shared access (mouse, sound device)
Example failures: http://test.winehq.org/data/3d0cf846f9a2cef078c7c28c60e83334b9bf5f12/win8_dr...
Patch tested: https://testbot.winehq.org/JobDetails.pl?Key=49765
-- bye bye ... ... Detlef
Signed-off-by: Detlef Riekenberg wine.dev@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
Signed-off-by: Aric Stewart aric@codeweavers.com
On 3/21/19 9:19 AM, Detlef Riekenberg wrote:
Most api-calls in test_device_info access uninitialized memory, when called with INVALID_HANDLE_VALUE
this results in broken device names and crashes
Example failures: http://test.winehq.org/data/6325d85406fbf7f46770bc739da4b7e2c9b199d7/win8_dr...
Patch tested: https://testbot.winehq.org/JobDetails.pl?Key=49763
-- bye bye ... ... Detlef
Signed-off-by: Detlef Riekenberg wine.dev@web.de
dlls/hid/tests/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/hid/tests/device.c b/dlls/hid/tests/device.c index f20677fb1b..ff17229785 100644 --- a/dlls/hid/tests/device.c +++ b/dlls/hid/tests/device.c @@ -82,7 +82,8 @@ static void run_for_each_device(device_test *test) ok(file != INVALID_HANDLE_VALUE, "Failed to open %s, error %u.\n", wine_dbgstr_w(data->DevicePath), GetLastError());
test(file);
if (file != INVALID_HANDLE_VALUE)
test(file); CloseHandle(file); }
-- 2.21.0.windows.1