This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/System.Net.Ping/tests/FunctionalTests Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,18 @@ public static async Task PacketSizeIsRespected(int payloadSize)
5353 p . BeginOutputReadLine ( ) ;
5454 p . BeginErrorReadLine ( ) ;
5555
56+ // There are multiple issues with ping6 in macOS 10.12 (Sierra), see https://github.com/dotnet/corefx/issues/26358.
57+ bool isPing6OnMacSierra = utilityPath . Equals ( UnixCommandLinePing . Ping6UtilityPath ) &&
58+ RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) &&
59+ ! PlatformDetection . IsMacOsHighSierraOrHigher ;
60+
5661 string pingOutput ;
5762 if ( ! p . WaitForExit ( TestSettings . PingTimeout ) )
5863 {
64+ // Workaround known issues with ping6 in macOS 10.12
65+ if ( isPing6OnMacSierra )
66+ return ;
67+
5968 pingOutput = string . Join ( "\n " , stdOutLines ) ;
6069 string stdErr = string . Join ( "\n " , stdErrLines ) ;
6170 throw new Exception (
@@ -69,6 +78,10 @@ public static async Task PacketSizeIsRespected(int payloadSize)
6978 var exitCode = p . ExitCode ;
7079 if ( exitCode != 0 )
7180 {
81+ // Workaround known issues with ping6 in macOS 10.12
82+ if ( isPing6OnMacSierra )
83+ return ;
84+
7285 string stdErr = string . Join ( "\n " , stdErrLines ) ;
7386 throw new Exception (
7487 $ "[{ utilityPath } { arguments } ] process exit code is { exitCode } .\n StdOut:[{ pingOutput } ]\n StdErr:[{ stdErr } ]") ;
You can’t perform that action at this time.
0 commit comments