[PATCH resend 03/12] iphlpapi/tests: Trace the ICMP reply only with debug level > 1.

Gabriel Ivăncescu gabrielopcode at gmail.com
Mon Nov 23 07:47:40 CST 2020


Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
 dlls/iphlpapi/tests/iphlpapi.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index 1465e26..6cbe725 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -996,7 +996,11 @@ static void testIcmpSendEcho(void)
     address = htonl(INADDR_LOOPBACK);
     ret = IcmpSendEcho(icmp, address, senddata, sizeof(senddata), NULL, replydata, replysz, 1000);
     error = GetLastError();
-    if (ret)
+    if (!ret)
+    {
+        skip ("Failed to ping with error %d, is lo interface down?.\n", error);
+    }
+    else if (winetest_debug > 1)
     {
         PICMP_ECHO_REPLY pong = (PICMP_ECHO_REPLY) replydata;
         trace ("send addr  : %s\n", ntoa(address));
@@ -1008,10 +1012,6 @@ static void testIcmpSendEcho(void)
         trace ("ttl        : %u\n", pong->Options.Ttl);
         trace ("flags      : 0x%x\n", pong->Options.Flags);
     }
-    else
-    {
-        skip ("Failed to ping with error %d, is lo interface down?.\n", error);
-    }
 
     /* check reply data */
     SetLastError(0xdeadbeef);
-- 
2.21.0




More information about the wine-devel mailing list