Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip System.Net.NetworkInformation.Tests.PingTest.SendPingWithIPAddressAndBigSize test on Android #64897

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

MaximLipnin
Copy link
Contributor

Addresses #64798.

The System.Net.NetworkInformation.Tests.PingTest.SendPingWithIPAddressAndBigSize test passes non-default and non-empty buffer when ping sending:

// Assert.DoesNotThrow
PingReply pingReply = await p.SendPingAsync(localIpAddress, TestSettings.PingTimeout, new byte[10001]);

which hits a new check was added in PingUtility class added in #64625:

// although the ping utility supports custom pattern via -p option, it supports
// specifying only up to 16B pattern which repeats in the payload. The option also might
// not be present in all distributions, so we forbid ping payload in general.
if (buffer != DefaultSendBuffer && buffer != Array.Empty<byte>())
{
    throw new PlatformNotSupportedException(SR.net_ping_utility_custom_payload);
}

The test was also marked with [ConditionalFact(nameof(DoesNotUsePingUtility))] so that it started failing with PNSE on Android.

This pull request is to update DoesNotUsePingUtility by adding Android to UsesPingUtility condition, so that the mentioned test is skipped on Android.

@ghost
Copy link

ghost commented Feb 7, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Addresses #64798.

The System.Net.NetworkInformation.Tests.PingTest.SendPingWithIPAddressAndBigSize test passes non-default and non-empty buffer when ping sending:

// Assert.DoesNotThrow
PingReply pingReply = await p.SendPingAsync(localIpAddress, TestSettings.PingTimeout, new byte[10001]);

which hits a new check was added in PingUtility class added in #64625:

// although the ping utility supports custom pattern via -p option, it supports
// specifying only up to 16B pattern which repeats in the payload. The option also might
// not be present in all distributions, so we forbid ping payload in general.
if (buffer != DefaultSendBuffer && buffer != Array.Empty<byte>())
{
    throw new PlatformNotSupportedException(SR.net_ping_utility_custom_payload);
}

The test was also marked with [ConditionalFact(nameof(DoesNotUsePingUtility))] so that it started failing with PNSE on Android.

This pull request is to update DoesNotUsePingUtility by adding Android to UsesPingUtility condition, so that the mentioned test is skipped on Android.

Author: MaximLipnin
Assignees: -
Labels:

area-System.Net

Milestone: -

@MaximLipnin
Copy link
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@steveisok
Copy link
Member

Failures are unrelated - merging to fix android test failure on the rolling build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants