From a1f8ace9447a19dbec39a0d312048e9ec9937960 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Wed, 15 Mar 2023 16:30:47 +0100 Subject: [PATCH 1/5] BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived -> BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Linux for Android --- .../tests/FunctionalTests/DualModeSocketTest.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index ab9e26f7c99bcd..cdb4f97134752f 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -1432,8 +1432,7 @@ public void BeginReceiveMessageFromV6BoundToSpecificV4_NotReceived() } [Fact] - [SkipOnPlatform(TestPlatforms.Linux | TestPlatforms.OSX | TestPlatforms.MacCatalyst | TestPlatforms.iOS | TestPlatforms.tvOS, "Expected behavior is different on Apple platforms and Linux")] - [ActiveIssue("https://github.com/dotnet/runtime/issues/81946", TestPlatforms.Android)] + [SkipOnPlatform(TestPlatforms.Linux | TestPlatforms.Android | TestPlatforms.OSX | TestPlatforms.MacCatalyst | TestPlatforms.iOS | TestPlatforms.tvOS, "Expected behavior is different on Apple platforms, Linux and Android")] public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() { Assert.Throws(() => @@ -1450,7 +1449,7 @@ public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [Fact] - [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Android)] // Read the comment above public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Linux() { AssertExtensions.Throws("remoteEP", () => From 2eb0131e1696d73c8cb054a8e98fda9cb3453f38 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Thu, 16 Mar 2023 16:46:07 +0100 Subject: [PATCH 2/5] try Windows/Unix distinction --- .../tests/FunctionalTests/DualModeSocketTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index cdb4f97134752f..ceea2019e6e6cb 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -1432,7 +1432,7 @@ public void BeginReceiveMessageFromV6BoundToSpecificV4_NotReceived() } [Fact] - [SkipOnPlatform(TestPlatforms.Linux | TestPlatforms.Android | TestPlatforms.OSX | TestPlatforms.MacCatalyst | TestPlatforms.iOS | TestPlatforms.tvOS, "Expected behavior is different on Apple platforms, Linux and Android")] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior is different on Unix public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() { Assert.Throws(() => @@ -1449,8 +1449,8 @@ public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [Fact] - [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Android)] // Read the comment above - public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Linux() + [PlatformSpecific(TestPlatforms.AnyUnix)] // Read the comment above + public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Unix() { AssertExtensions.Throws("remoteEP", () => { From 4c6000f04bfbbd69aa1996c722d6dfe31f87931c Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Thu, 16 Mar 2023 22:17:03 +0100 Subject: [PATCH 3/5] run ArgumentException variants only on Linux+Android, also fix ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived --- .../tests/FunctionalTests/DualModeSocketTest.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index ceea2019e6e6cb..19e2fdaa2b6e45 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -1449,8 +1449,8 @@ public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] // Read the comment above - public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Unix() + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Android)] // Read the comment above + public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived_Linux() { AssertExtensions.Throws("remoteEP", () => { @@ -1605,8 +1605,7 @@ public void ReceiveMessageFromAsyncV6BoundToSpecificV4_NotReceived() } [Fact] - [SkipOnPlatform(TestPlatforms.Linux | TestPlatforms.OSX | TestPlatforms.MacCatalyst | TestPlatforms.iOS | TestPlatforms.tvOS, "Expected behavior is different on Apple platforms and Linux")] - [ActiveIssue("https://github.com/dotnet/runtime/issues/81946", TestPlatforms.Android)] + [SkipOnPlatform(TestPlatforms.Windows, "Expected behavior is different on Apple platforms and Linux")] public void ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived() { Assert.Throws(() => @@ -1623,7 +1622,7 @@ public void ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived() // an acceptable difference due to the extra state that would otherwise // be necessary to emulate the Winsock behavior. [Fact] - [PlatformSpecific(TestPlatforms.Linux)] // Read the comment above + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Android)] // Read the comment above public void ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived_Linux() { AssertExtensions.Throws("remoteEP", () => From c6b674eeb6997d79de67c6afdfe964daf7f288a6 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Fri, 17 Mar 2023 17:14:12 +0100 Subject: [PATCH 4/5] oops --- .../tests/FunctionalTests/DualModeSocketTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index 19e2fdaa2b6e45..fda3aea5011609 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -1432,7 +1432,7 @@ public void BeginReceiveMessageFromV6BoundToSpecificV4_NotReceived() } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior is different on Unix + [PlatformSpecific(TestPlatforms.Windows)] // // Expected behavior is different on Apple platforms and Linux public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() { Assert.Throws(() => @@ -1605,7 +1605,7 @@ public void ReceiveMessageFromAsyncV6BoundToSpecificV4_NotReceived() } [Fact] - [SkipOnPlatform(TestPlatforms.Windows, "Expected behavior is different on Apple platforms and Linux")] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior is different on Apple platforms and Linux public void ReceiveMessageFromAsyncV4BoundToSpecificV6_NotReceived() { Assert.Throws(() => From fa2390fa11f2e61bec9aabaee98ee89e559f7a84 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Fri, 31 Mar 2023 17:23:34 +0200 Subject: [PATCH 5/5] fix comment --- .../tests/FunctionalTests/DualModeSocketTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index fda3aea5011609..d9d75bfc5e4502 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -1432,7 +1432,7 @@ public void BeginReceiveMessageFromV6BoundToSpecificV4_NotReceived() } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // // Expected behavior is different on Apple platforms and Linux + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior is different on Apple platforms and Linux public void BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived() { Assert.Throws(() =>