From 4564b0148b5fd3e3eff1447928c8185daf0c1436 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 15 May 2016 17:20:24 +0200 Subject: [PATCH] iphlpapi-System_Ping: Add/remove todo_wine to avoid test failures. --- ...k-to-system-ping-when-ICMP-permissio.patch | 28 ++++++++++++++++--- patches/patchinstall.sh | 2 +- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/patches/iphlpapi-System_Ping/0001-iphlpapi-Fallback-to-system-ping-when-ICMP-permissio.patch b/patches/iphlpapi-System_Ping/0001-iphlpapi-Fallback-to-system-ping-when-ICMP-permissio.patch index ca3bafc9..b4de1482 100644 --- a/patches/iphlpapi-System_Ping/0001-iphlpapi-Fallback-to-system-ping-when-ICMP-permissio.patch +++ b/patches/iphlpapi-System_Ping/0001-iphlpapi-Fallback-to-system-ping-when-ICMP-permissio.patch @@ -1,4 +1,4 @@ -From 9cd3bea619679a76467705957d9b9f9d4d888a1c Mon Sep 17 00:00:00 2001 +From a08076678e154c913713221f8eea87c70c11d788 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 13 Jun 2015 05:03:54 +0200 Subject: iphlpapi: Fallback to system ping when ICMP permissions are not @@ -6,8 +6,9 @@ Subject: iphlpapi: Fallback to system ping when ICMP permissions are not Based on an idea by Bruno Jesus. --- - dlls/iphlpapi/icmp.c | 256 +++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 250 insertions(+), 6 deletions(-) + dlls/iphlpapi/icmp.c | 256 ++++++++++++++++++++++++++++++++++++++++- + dlls/iphlpapi/tests/iphlpapi.c | 2 +- + 2 files changed, 251 insertions(+), 7 deletions(-) diff --git a/dlls/iphlpapi/icmp.c b/dlls/iphlpapi/icmp.c index ebc2f2b..330dd73a 100644 @@ -334,6 +335,25 @@ index ebc2f2b..330dd73a 100644 /* Prepare the request */ id=getpid() & 0xFFFF; seq=InterlockedIncrement(&icmp_sequence) & 0xFFFF; +diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c +index 73e4302..f9c6b99 100644 +--- a/dlls/iphlpapi/tests/iphlpapi.c ++++ b/dlls/iphlpapi/tests/iphlpapi.c +@@ -1028,13 +1028,13 @@ todo_wine + replysz = sizeof(ICMP_ECHO_REPLY) + ICMP_MINLEN; + ret = pIcmpSendEcho(icmp, address, senddata, ICMP_MINLEN, NULL, replydata, replysz, 1000); + error = GetLastError(); +-todo_wine + ok (ret, "IcmpSendEcho failed unexpectedly with error %d\n", error); + + SetLastError(0xdeadbeef); + replysz = sizeof(ICMP_ECHO_REPLY) + ICMP_MINLEN; + ret = pIcmpSendEcho(icmp, address, senddata, ICMP_MINLEN + 1, NULL, replydata, replysz, 1000); + error = GetLastError(); ++todo_wine + ok (!ret, "IcmpSendEcho succeeded unexpectedly\n"); + todo_wine + ok (error == IP_GENERAL_FAILURE -- -2.4.2 +2.8.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 165e6824..0fc5a8f8 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -3856,7 +3856,7 @@ fi # | * [#8332] Fallback to system ping command when CAP_NET_RAW is not available # | # | Modified files: -# | * dlls/iphlpapi/icmp.c +# | * dlls/iphlpapi/icmp.c, dlls/iphlpapi/tests/iphlpapi.c # | if test "$enable_iphlpapi_System_Ping" -eq 1; then patch_apply iphlpapi-System_Ping/0001-iphlpapi-Fallback-to-system-ping-when-ICMP-permissio.patch