Skip to content

add platform restriction to two socket tests to avoid test skip on Unix#36082

Merged
stephentoub merged 1 commit intodotnet:masterfrom
wfurt:socketSkipTest
May 9, 2020
Merged

add platform restriction to two socket tests to avoid test skip on Unix#36082
stephentoub merged 1 commit intodotnet:masterfrom
wfurt:socketSkipTest

Conversation

@wfurt
Copy link
Member

@wfurt wfurt commented May 8, 2020

I noticed this on Linux


Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 5.0.0-dev)
  Discovering: System.Net.Sockets.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Net.Sockets.Tests (found 824 of 1201 test cases)
  Starting:    System.Net.Sockets.Tests (parallel test collections = on, max threads = 4)
    System.Net.Sockets.Tests.UnixDomainSocketTest.Socket_CreateUnixDomainSocket_Throws_OnWindows [SKIP]
      Condition(s) not met: "IsSubWindows10"
    System.Net.Sockets.Tests.KeepAliveTest.Socket_KeepAlive_RetryCount_Failure [SKIP]
      Condition(s) not met: "IsWindowsBelow1703"
    System.Net.Sockets.Tests.CreateSocket.Ctor_Raw_Supported_Success [SKIP]
      Condition(s) not met: "SupportsRawSockets"
  Finished:    System.Net.Sockets.Tests
=== TEST EXECUTION SUMMARY ===
   System.Net.Sockets.Tests  Total: 1097, Errors: 0, Failed: 0, Skipped: 3, Time: 20.084s

Since first two conditions will never be true outside Windows, it will log and create Kusto entry for each Unix run.
With the change:

  ~/github/wfurt-runtime/artifacts/bin/System.Net.Sockets.Tests/net5.0-Unix-Debug ~/github/wfurt-runtime/src/libraries/System.Net.Sockets/tests/FunctionalTests
    Discovering: System.Net.Sockets.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.Net.Sockets.Tests (found 1081 of 1201 test cases)
    Starting:    System.Net.Sockets.Tests (parallel test collections = on, max threads = 4)
      System.Net.Sockets.Tests.CreateSocket.Ctor_Raw_Supported_Success [SKIP]
        Condition(s) not met: "SupportsRawSockets"
    Finished:    System.Net.Sockets.Tests
  === TEST EXECUTION SUMMARY ===
     System.Net.Sockets.Tests  Total: 1608, Errors: 0, Failed: 0, Skipped: 1, Time: 44.620s

@wfurt wfurt added area-System.Net.Sockets test-enhancement Improvements of test source code labels May 8, 2020
@wfurt wfurt requested a review from a team May 8, 2020 02:12
@wfurt wfurt self-assigned this May 8, 2020
@ghost
Copy link

ghost commented May 8, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@stephentoub stephentoub merged commit 5e5a22d into dotnet:master May 9, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
@wfurt wfurt deleted the socketSkipTest branch January 7, 2026 19:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net.Sockets test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants