d3drm/tests: Skip following tests when device creation fails.

Stefan Dösinger stefandoesinger at gmail.com
Fri Oct 16 06:16:09 CDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 2015-10-15 um 21:54 schrieb Bernhard Übelacker:
>      hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm, pClipper, &driver, rc.right, rc.bottom, &device);
>      ok(hr == D3DRM_OK, "Cannot get IDirect3DRMDevice interface (hr = %x)\n", hr);
> +    if (FAILED(hr))
> +    {
> +        skip("Cannot get IDirect3DRMDevice interface (hr = %x), skipping tests\n", hr);
> +        IDirectDrawClipper_Release(pClipper);
> +        IDirect3DRM_Release(d3drm);
> +        DestroyWindow(window);
> +        return;
> +    }
The test will fail regardless, so you don't gain too much. It would be
nicer if the test skips without a failing ok() statement in this case.

Do you have a Windows VM to test how native d3drm responds if d3d is not
available? I.e., which error code is returned? It might be a bit tricky
to test because we request a software device that Wine doesn't implement
but should be available everywhere on Windows. If you need help finding
that out I can play a bit with my Windows XP box.

(Technically failing is correct because we should have a software device
without host GL in theory, but I don't expect that we'll ever implement
one, so I think not failing the test if GL isn't available is the best
thing to do)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWINx5AAoJEN0/YqbEcdMwcDYP/1mLNoDkllStJ4gySEeUgfxK
QUuTt7vIFiWGVl8/x9QUsO9dWakZ+2fPZJSl3cO8cUxuk/GbpwmKNYFG3IEcQUIo
1nTn5aM6kTxv4b+uVT2BnX/CwJLouQnjuFnsTxTORJad1WsPk/qTVcPAmknnTPlX
uHs30ed8QBm7ZWwi+549rQfFeGjp41xf05BVqjtSILtIhPiRYfnfsXAV/zFmUPMB
hCG3QtaSL4Ea4zS3aEr0II0aV6TcSSY1t+V0+SvCuZEgZDKbYF5qbEeKRiXubdga
mQEtEWcun0NUwtRD7ftNA6Ad5WumHUv3hj3fwb0q4hA0AtjvsW1L4zuYQs/DVb2v
T/vpyZLowUpUn4peTOwuNU5rBeUY9BRqeoqcE1ccyVUFQ2nt6Iq3XJGvzjRWf3RT
e5j1F9OyM31j8eDTVRO3Vr5SXqH3yDiwzSoLPJzTrE9AV4r1hj30Vb7MWjlqmOlq
03P83KwPDyNg5JBtr7R6a9TxQn7zhfZNzHctuJWI2ZSvXhbPTHgh0GZd1ka9ITkT
273sIi/VKU8e1HoBz5zTnGHYgE3utdqBk6RHVzSk/L+fhsVxD8LccyytRs7de+ai
7ut0IFuLsM3jd22g9FF3PTmpgZx3nEDUn0WN628hQO4w+Lf7w+MUmGslHMSrqx1r
yiscxon1fyODz+BewWKG
=NOTo
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list