diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index f883dfe5..142a8aa4 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -390,6 +390,7 @@ patch_enable_all () enable_ws2_32_APC_Performance="$1" enable_ws2_32_Connect_Time="$1" enable_ws2_32_Sort_default_route="$1" + enable_ws2_32_Tests="$1" enable_ws2_32_TransmitFile="$1" enable_ws2_32_WSACleanup="$1" enable_ws2_32_WriteWatches="$1" @@ -1340,6 +1341,9 @@ patch_enable () ws2_32-Sort_default_route) enable_ws2_32_Sort_default_route="$2" ;; + ws2_32-Tests) + enable_ws2_32_Tests="$2" + ;; ws2_32-TransmitFile) enable_ws2_32_TransmitFile="$2" ;; @@ -7639,6 +7643,18 @@ if test "$enable_ws2_32_Sort_default_route" -eq 1; then ) >> "$patchlist" fi +# Patchset ws2_32-Tests +# | +# | Modified files: +# | * dlls/ws2_32/tests/sock.c +# | +if test "$enable_ws2_32_Tests" -eq 1; then + patch_apply ws2_32-Tests/0001-ws2_32-tests-Hide-random-test-failures-in-socket-tests.patch + ( + echo '+ { "Sebastian Lackner", "ws2_32/tests: Hide random test failures in socket tests.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ws2_32-TransmitFile # | # | This patchset has the following (direct or indirect) dependencies: diff --git a/patches/ws2_32-Tests/0001-ws2_32-tests-Hide-random-test-failures-in-socket-tests.patch b/patches/ws2_32-Tests/0001-ws2_32-tests-Hide-random-test-failures-in-socket-tests.patch new file mode 100644 index 00000000..d44450e2 --- /dev/null +++ b/patches/ws2_32-Tests/0001-ws2_32-tests-Hide-random-test-failures-in-socket-tests.patch @@ -0,0 +1,40 @@ +From 11fa3c3d26b860036633ca2e1437586d5bcb99d1 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sun, 15 May 2016 17:00:46 +0200 +Subject: ws2_32/tests: Hide random test failures in socket tests. + +--- + dlls/ws2_32/tests/sock.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c +index 9e0c2f9..0b9e245 100644 +--- a/dlls/ws2_32/tests/sock.c ++++ b/dlls/ws2_32/tests/sock.c +@@ -2530,6 +2530,7 @@ static void test_WSASocket(void) + if (sock == INVALID_SOCKET) + { + err = WSAGetLastError(); ++ todo_wine_if (err == WSAEPROTONOSUPPORT) + ok(err == WSAEAFNOSUPPORT || broken(err == WSAEPROTONOSUPPORT), "Expected 10047, received %d\n", err); + skip("IPX is not supported\n"); + } +@@ -2799,13 +2800,13 @@ static void test_WSAEnumNetworkEvents(void) + "Test[%d]: WSAEnumNetworkEvents failed\n", i); + if (i >= 1 && j == 0) /* FD_WRITE is SET on first try for UDP and connected TCP */ + { +- todo_wine_if (i == 0) /* Remove when fixed */ ++ todo_wine_if (i == 0 || net_events.lNetworkEvents == 0) + ok (net_events.lNetworkEvents == FD_WRITE, "Test[%d]: expected 2, got %d\n", + i, net_events.lNetworkEvents); + } + else + { +- todo_wine_if (i != 0) /* Remove when fixed */ ++ todo_wine_if (i != 0 && net_events.lNetworkEvents != 0) + ok (net_events.lNetworkEvents == 0, "Test[%d]: expected 0, got %d\n", + i, net_events.lNetworkEvents); + } +-- +2.8.0 +