Alex Henrie : iphlpapi/tests: Print a message when skipping GetUdp6Table tests.
Alexandre Julliard
julliard at winehq.org
Thu Feb 13 15:36:31 CST 2020
Module: wine
Branch: master
Commit: 31d1175f82e2d867e542f400415782b9ec939d36
URL: https://source.winehq.org/git/wine.git/?a=commit;h=31d1175f82e2d867e542f400415782b9ec939d36
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Mon Feb 10 23:48:47 2020 -0700
iphlpapi/tests: Print a message when skipping GetUdp6Table tests.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/iphlpapi/tests/iphlpapi.c | 43 ++++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 20 deletions(-)
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index a1fdf2716b..12e39fa27f 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -2233,37 +2233,40 @@ static void test_ConvertLengthToIpv4Mask(void)
static void test_GetUdp6Table(void)
{
- if (pGetUdp6Table) {
DWORD apiReturn;
ULONG dwSize = 0;
+ if (!pGetUdp6Table) {
+ win_skip("GetUdp6Table not available\n");
+ return;
+ }
+
apiReturn = pGetUdp6Table(NULL, &dwSize, FALSE);
if (apiReturn == ERROR_NOT_SUPPORTED) {
- skip("GetUdp6Table is not supported\n");
- return;
+ skip("GetUdp6Table is not supported\n");
+ return;
}
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
- "GetUdp6Table(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
- apiReturn);
+ "GetUdp6Table(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
+ apiReturn);
if (apiReturn == ERROR_INSUFFICIENT_BUFFER) {
- PMIB_UDP6TABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize);
+ PMIB_UDP6TABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize);
- apiReturn = pGetUdp6Table(buf, &dwSize, FALSE);
- ok(apiReturn == NO_ERROR,
- "GetUdp6Table(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
- apiReturn);
+ apiReturn = pGetUdp6Table(buf, &dwSize, FALSE);
+ ok(apiReturn == NO_ERROR,
+ "GetUdp6Table(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
+ apiReturn);
- if (apiReturn == NO_ERROR && winetest_debug > 1)
- {
- DWORD i;
- trace( "UDP6 table: %u entries\n", buf->dwNumEntries );
- for (i = 0; i < buf->dwNumEntries; i++)
- trace( "%u: %s%%%u:%u\n",
- i, ntoa6(&buf->table[i].dwLocalAddr), ntohs(buf->table[i].dwLocalScopeId), ntohs(buf->table[i].dwLocalPort) );
- }
- HeapFree(GetProcessHeap(), 0, buf);
+ if (apiReturn == NO_ERROR && winetest_debug > 1)
+ {
+ DWORD i;
+ trace( "UDP6 table: %u entries\n", buf->dwNumEntries );
+ for (i = 0; i < buf->dwNumEntries; i++)
+ trace( "%u: %s%%%u:%u\n",
+ i, ntoa6(&buf->table[i].dwLocalAddr), ntohs(buf->table[i].dwLocalScopeId), ntohs(buf->table[i].dwLocalPort) );
+ }
+ HeapFree(GetProcessHeap(), 0, buf);
}
- }
}
static void test_ParseNetworkString(void)
More information about the wine-cvs
mailing list