The EnumAddressTypes tests wasn't actually calling the enum function.
The code within the test_EnumAddressTypes function appear to be setup for calling EnumAddresses, so added a test for this scenario as well.
-- v2: dplayx/tests: Correct Enum tests.
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
The EnumAddressTypes tests wasn't actually calling the enum function.
The code within the test_EnumAddressTypes function appear to be setup for calling EnumAddresses, so added a test for this scenario as well. --- dlls/dplayx/tests/dplayx.c | 52 +++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index 0785b6535f1..8c68b114403 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -1936,7 +1936,22 @@ static void test_GetCaps(void) IDirectPlayX_Release( pDP ); }
-static void test_EnumAddressTypes(void) +static int enum_addresses_cb_count = 0; +static BOOL CALLBACK EnumAddressesCallback(REFGUID guidDataType, DWORD size, const void *data, void *context) +{ + if (IsEqualGUID(guidDataType, &DPAID_TotalSize)) + enum_addresses_cb_count++; + else if (IsEqualGUID(guidDataType, &DPAID_ServiceProvider)) + enum_addresses_cb_count++; + else if(IsEqualGUID(guidDataType, &invalid_guid)) + enum_addresses_cb_count++; + else + ok(0, "guidDataType %s\n", wine_dbgstr_guid(guidDataType)); + + return TRUE; +} + +static void test_EnumAddresses(void) { IDirectPlay4 *pDP; HRESULT hr; @@ -1976,6 +1991,11 @@ static void test_EnumAddressTypes(void) checkHR( DP_OK, hr ); }
+ enum_addresses_cb_count = 0; + hr = IDirectPlayLobby_EnumAddress(pDPL, EnumAddressesCallback, pAddress, dwAddressSize, NULL); + ok (SUCCEEDED (hr), "IDirectPlayLobby3A_EnumAddress %lx\n", hr); + todo_wine ok (enum_addresses_cb_count == 3, "wrong count %d\n", enum_addresses_cb_count); + IDirectPlayX_Close(pDP); IDirectPlayX_Release(pDP); IDirectPlayLobby_Release(pDPL); @@ -1983,6 +2003,35 @@ static void test_EnumAddressTypes(void) free( pAddress ); }
+static int enum_address_cb_count = 0; +static BOOL CALLBACK EnumAddressTypeCallback(REFGUID guidDataType, LPVOID lpContext, DWORD flags) +{ + if (IsEqualGUID(guidDataType, &DPAID_INet)) + enum_address_cb_count++; + else + ok(0, "guidDataType %s\n", wine_dbgstr_guid(guidDataType)); + + return TRUE; +} + +static void test_EnumAddressTypes(void) +{ + HRESULT hr; + IDirectPlayLobby3 *pDPL; + + hr = CoCreateInstance( &CLSID_DirectPlayLobby, NULL, CLSCTX_ALL, + &IID_IDirectPlayLobby3A, (LPVOID*) &pDPL ); + ok (SUCCEEDED (hr), "CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed\n"); + if (FAILED (hr)) return; + + enum_address_cb_count = 0; + hr = IDirectPlayLobby_EnumAddressTypes(pDPL, EnumAddressTypeCallback, &DPSPGUID_TCPIP, NULL, 0); + ok (SUCCEEDED (hr), "IDirectPlayLobby3A_EnumAddress %lx\n", hr); + todo_wine ok (enum_address_cb_count == 1, "IDirectPlayLobby3A_EnumAddress %lx\n", hr); + + IDirectPlayLobby_Release(pDPL); +} + /* Open */
static BOOL CALLBACK EnumSessions_cb2( LPCDPSESSIONDESC2 lpThisSD, @@ -8520,6 +8569,7 @@ START_TEST(dplayx) test_InitializeConnection(); test_GetCaps(); test_EnumAddressTypes(); + test_EnumAddresses(); test_EnumSessions(); test_Open();
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148968
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
dplayx: dplayx.c:3055: Test failed: recv() returned 52. dplayx.c:3069: Test failed: recv() returned 52. dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x1. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: recv() returned 70. dplayx.c:2452: Test failed: got mixed 0xfab00046. dplayx.c:2452: Test failed: got password offset 32. dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x1. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: recv() returned 70. dplayx.c:2452: Test failed: got mixed 0xfab00046. dplayx.c:2452: Test failed: got password offset 32. dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2466: Test failed: got session count 0. dplayx.c:2473: Test failed: accept() returned 0xffffffff. dplayx.c:2473: Test failed: select() returned -1. dplayx.c:2473: Test failed: got mixed 0xcccccccc. dplayx.c:2473: Test failed: got family -13108. dplayx.c:2473: Test failed: got port 52428. dplayx.c:2473: Test failed: got address 0xcccccccc. dplayx.c:2473: Test failed: got magic 0xcccccccc. dplayx.c:2473: Test failed: got command 52428. dplayx.c:2473: Test failed: got flags 0xcccccccc. dplayx.c:2473: Test failed: select() returned -1. dplayx.c:2473: Test failed: Open() returned 0x88770005. dplayx.c:2477: Test failed: accept() returned 0xffffffff. dplayx.c:2477: Test failed: select() returned -1. dplayx.c:2477: Test failed: got mixed 0xcccccccc. dplayx.c:2477: Test failed: got family -13108. dplayx.c:2477: Test failed: got port 52428. dplayx.c:2477: Test failed: got address 0xcccccccc. dplayx.c:2477: Test failed: got magic 0xcccccccc. dplayx.c:2477: Test failed: got command 52428. dplayx.c:2477: Test failed: got flags 0xcccccccc. dplayx.c:2477: Test failed: select() returned -1. dplayx.c:2477: Test failed: recv() returned -1. dplayx.c:2272: Test failed: send() returned -1. dplayx.c:2477: Test failed: Open() returned 0xdeadbeef. dplayx.c:2477: Test failed: select() returned 1. dplayx: Timeout
=== w7u_el (32 bit report) ===
dplayx: dplayx.c:2459: Test failed: expected=DP_OK got=48879
=== w10pro64 (32 bit report) ===
dplayx: dplayx.c:3058: Test failed: recv() returned 52. dplayx.c:3069: Test failed: got flags 0x40. dplayx.c:2452: Test failed: got flags 0x1. dplayx.c:2452: Test failed: got flags 0. dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0x10. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: recv() returned 70. dplayx.c:2452: Test failed: got mixed 0xfab00046. dplayx.c:2452: Test failed: got password offset 32. dplayx.c:2452: Test failed: got flags 0. dplayx.c:2459: Test failed: expected=DP_OK got=48879 dplayx.c:2452: Test failed: got flags 0.