[PATCH 1/2] d3d8/tests: Use correct index variable in test_resource_access() (Coverity).
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- dlls/d3d8/tests/device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 49d2a9818cc4..a812f032a3d9 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -9081,17 +9081,19 @@ static void test_resource_access(void) HRESULT expected_hr; D3DLOCKED_BOX lb; - if (tests[j].format == FORMAT_DEPTH) + if (tests[i].format == FORMAT_DEPTH) continue; - if (tests[j].format == FORMAT_ATI2) + if (tests[i].format == FORMAT_ATI2) format = MAKEFOURCC('A','T','I','2'); else format = colour_format; hr = IDirect3DDevice8_CreateVolumeTexture(device, 16, 16, 1, 1, tests[i].usage, format, tests[i].pool, &texture); - ok(hr == (!(tests[i].usage & ~D3DUSAGE_DYNAMIC) ? D3D_OK : D3DERR_INVALIDCALL), + todo_wine_if(tests[i].pool == D3DPOOL_SCRATCH && tests[i].format == FORMAT_ATI2) + ok(hr == (!(tests[i].usage & ~D3DUSAGE_DYNAMIC) && tests[i].format != FORMAT_ATI2 + ? D3D_OK : D3DERR_INVALIDCALL), "Test %u: Got unexpected hr %#x.\n", i, hr); if (FAILED(hr)) continue; -- 2.18.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=45269 Your paranoid android. === w1064 (32 bit report) === d3d8: device.c:1537: Test failed: Reset failed, hr 0x80070057. device.c:1539: Test failed: TestCooperativeLevel failed, hr 0x88760869. device.c:1551: Test failed: D3DVIEWPORT->Width = 400. device.c:1552: Test failed: D3DVIEWPORT->Height = 300. 084c:device: unhandled exception c0000005 at 706FA86E === debian9 (build log) === X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) === debian9 (build log) === X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
participants (3)
-
Henri Verbeet -
Józef Kucia -
Marvin