runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Renable SocketOptionName.ReuseUnicastPort test

Open davidsh opened this issue 10 years ago • 9 comments

Some Windows CoreFx features like System.Net.Sockets socket option SocketOptionName.ReuseUnicastPort require a specific version of Windows (10) and customized networking configuration using Powershell scripts. And changing these settings requires a machine reboot. This is difficult to test in the current CI environment.

Need to find a way to create 'disposable' test machines/VM's with these customized settings so that these kinds of specific tests can be automated.

davidsh avatar Dec 08 '15 17:12 davidsh

@davidsh Is this something that can be solved by just creating a new VM image, with the appropriate configuration, and setting up a new CI job to use that image?

mellinoe avatar Nov 11 '16 19:11 mellinoe

this something that can be solved by just creating a new VM image, with the appropriate configuration, and setting up a new CI job to use that image?

Yes. And in particular it would be good to be able to have various Windows 10 images with RTM versus other versions of Windows 10, i.e. Windows 10 RTM (build 10240) vs. TH2 (build 10586) vs. RS1 (build 14393) etc. This will enable us to do positive testing of expected features/behaviors from each release.

davidsh avatar Nov 12 '16 16:11 davidsh

@karelz, @davidsh we should consider this for netstandard2.0 work and decide if we want to have an automated test for this case or not.

CIPop avatar Dec 12 '16 23:12 CIPop

Closing. We will see if we need it for more tests in future - then we can reconsider. We have a way to express it in the test code.

If the tests are disabled now, we will enable them in the networking test push which is in progress cc @steveharter @Priya91 @ianhays

karelz avatar Feb 02 '17 19:02 karelz

Disabled test, reopen it.

KristinXie1 avatar Feb 24 '17 06:02 KristinXie1

This test is not tracked in networking push, as it requires special CI infrastructure to run the test, so out of scope of stabilization effort. The test is already there, what's missing is the right version of windows, and setup scripts. One way is to write the powershell script that's required to set the setting, and ensure to execute the script before running the test.

cc @davidsh Can you provide more info on which specific Windows version/build number is required for the test, and also the powershell scripts required for configuration.

Priya91 avatar Feb 24 '17 19:02 Priya91

ActiveIssue reference: https://github.com/dotnet/corefx/blob/master/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs#L81

KristinXie1 avatar Feb 27 '17 01:02 KristinXie1

This should be Future - it is not blocking 2.0 release

karelz avatar Feb 28 '17 20:02 karelz

Ref: https://support.microsoft.com/en-us/help/3014399/various-network-and-computer-issues-occur-when-tcp-ephemeral-ports-are

For an application to use these new socket parameters, the auto-reuse port range must be defined as in the following example:

Set-NetTCPSetting –SettingName Custom -AutoReusePortRangeStartPort 40000  -AutoReusePortRangeNumberOfPorts 1000
Note Restart requirement: You have to restart the computer after you change the AutoReusePortRange settings for the setting to take effect.

After the reboot you can verify your defined settings using the PowerShell command:

Get-NetTCPSetting

davidsh avatar Mar 15 '19 22:03 davidsh