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

[libraries][Android] Reenable System.Diagnostics.Debug, System.Net.Http.Json, System.Net.Ping, System.Security.Cryptography.X509Certificates #56852

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public void Debug_WriteNull_SkipsIndentation()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50570", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36882", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void Debug_WriteLineNull_IndentsEmptyStringProperly()
{
Expand Down Expand Up @@ -210,7 +209,6 @@ public void IndentSize_Set_GetReturnsExpected(int indentSize, int expectedIndent
[InlineData(-1, 0)]
[InlineData(0, 0)]
[InlineData(1, 1)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50570", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36882", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void IndentLevel_Set_GetReturnsExpected(int indentLevel, int expectedIndentLevel)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ public void TraceWriteIf()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50570", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/36882", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void TraceWriteLineIf()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public void JsonContentInputTypeIsNull()
=> AssertExtensions.Throws<ArgumentNullException>("inputType", () => JsonContent.Create(null, inputType: null, mediaType: null));

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52650", TestPlatforms.Android)]
public void JsonContentThrowsOnIncompatibleTypeAsync()
{
using (HttpClient client = new HttpClient())
Expand Down
12 changes: 1 addition & 11 deletions src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public async Task SendPingAsync_InvalidArgs()
[Theory]
[InlineData(AddressFamily.InterNetwork)]
[InlineData(AddressFamily.InterNetworkV6)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithIPAddress(AddressFamily addressFamily)
{
Expand Down Expand Up @@ -167,7 +166,6 @@ await SendBatchPingAsync(
[Theory]
[InlineData(AddressFamily.InterNetwork)]
[InlineData(AddressFamily.InterNetworkV6)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithIPAddress_AddressAsString(AddressFamily addressFamily)
{
Expand Down Expand Up @@ -201,7 +199,6 @@ await SendBatchPingAsync(
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithIPAddressAndTimeout()
{
Expand Down Expand Up @@ -263,7 +260,6 @@ await SendBatchPingAsync(

[PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithIPAddressAndTimeoutAndBuffer_Unix()
{
Expand Down Expand Up @@ -354,7 +350,6 @@ await SendBatchPingAsync(
[Theory]
[InlineData(AddressFamily.InterNetwork)]
[InlineData(AddressFamily.InterNetworkV6)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithIPAddressAndTimeoutAndBufferAndPingOptions_Unix(AddressFamily addressFamily)
{
Expand Down Expand Up @@ -418,7 +413,6 @@ await SendBatchPingAsync(
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithHost()
{
Expand Down Expand Up @@ -447,7 +441,6 @@ await SendBatchPingAsync(
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithHostAndTimeout()
{
Expand Down Expand Up @@ -509,7 +502,6 @@ await SendBatchPingAsync(

[PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithHostAndTimeoutAndBuffer_Unix()
{
Expand Down Expand Up @@ -596,7 +588,6 @@ await SendBatchPingAsync(

[PlatformSpecific(TestPlatforms.AnyUnix)] // On Unix, Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply.
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SendPingWithHostAndTimeoutAndBufferAndPingOptions_Unix()
{
Expand Down Expand Up @@ -656,7 +647,7 @@ public async Task SendPingWithIPAddressAndBigSize()
{
// Assert.DoesNotThrow
PingReply pingReply = await p.SendPingAsync(localIpAddress, TestSettings.PingTimeout, new byte[10001]);

// Depending on platform the call may either succeed, report timeout or report too big packet. It
// should not throw wrapped SocketException though which is what this test guards.
//
Expand Down Expand Up @@ -688,7 +679,6 @@ public async Task SendPings_ReuseInstance_Hostname()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52617", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public async Task Sends_ReuseInstance_Hostname()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void TimeoutIsRespected(int timeout)
p.StartInfo.RedirectStandardOutput = true;

Stopwatch stopWatch = Stopwatch.StartNew();

p.Start();
p.WaitForExit();

Expand All @@ -47,23 +47,22 @@ public static void TimeoutIsRespected(int timeout)
[InlineData(50)]
[InlineData(1000)]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Tests un-priviledged Ping support on Unix
[ActiveIssue("https://github.com/dotnet/runtime/issues/50574", TestPlatforms.Android)]
public static async Task PacketSizeIsRespected(int payloadSize)
{
var stdOutLines = new List<string>();
var stdErrLines = new List<string>();

Process p = ConstructPingProcess(await TestSettings.GetLocalIPAddressAsync(), payloadSize, 1000);
p.StartInfo.RedirectStandardOutput = true;
p.OutputDataReceived += delegate (object sendingProcess, DataReceivedEventArgs outputLine)
{
stdOutLines.Add(outputLine.Data);
p.OutputDataReceived += delegate (object sendingProcess, DataReceivedEventArgs outputLine)
{
stdOutLines.Add(outputLine.Data);
};

p.StartInfo.RedirectStandardError = true;
p.ErrorDataReceived += delegate (object sendingProcess, DataReceivedEventArgs errorLine)
{
stdErrLines.Add(errorLine.Data);
p.ErrorDataReceived += delegate (object sendingProcess, DataReceivedEventArgs errorLine)
{
stdErrLines.Add(errorLine.Data);
};

p.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ public static void Uri_CachesDnsSafeHost()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49932", TestPlatforms.Android)]
public static void Uri_DoesNotLockOnString()
{
// Don't intern the string we lock on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void OffsetOf_ClassWithSequentialLayout_ReturnsExpected()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49872", TestPlatforms.Android)]
public void OffsetOf_ExplicitLayout_ReturnsExpected()
{
Type t = typeof(ExplicitLayoutTest);
Expand Down Expand Up @@ -106,7 +105,6 @@ public void OffsetOf_ValidField_ReturnsExpected()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49872", TestPlatforms.Android)]
public void OffsetOf_Decimal_ReturnsExpected()
{
Type t = typeof(FieldAlignmentTest_Decimal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ public static void CheckTimeNested()
[InlineData("Empty", "")]
[InlineData("Reserved Tag", "0F00")]
[InlineData("Zero Tag", "0000")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public static void InvalidPublicKeyEncoding(string caseName, string parametersHex)
{
_ = caseName;
Expand Down Expand Up @@ -526,7 +525,6 @@ public static void InvalidPublicKeyEncoding(string caseName, string parametersHe
[InlineData("Non-Nested Data", "300206035102013001")]
[InlineData("Indefinite Encoding", "3002060351020130800000")]
[InlineData("Dangling LengthLength", "300206035102013081")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public static void InvalidSignatureAlgorithmEncoding(string caseName, string sigAlgHex)
{
_ = caseName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ protected abstract void ReadUnreadablePfx(
int altWin32Error = 0);

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public void EmptyPfx_NoMac()
{
Pkcs12Builder builder = new Pkcs12Builder();
Expand All @@ -116,7 +115,6 @@ public void EmptyPfx_NoMac()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public void EmptyPfx_NoMac_ArbitraryPassword()
{
Pkcs12Builder builder = new Pkcs12Builder();
Expand All @@ -128,7 +126,6 @@ public void EmptyPfx_NoMac_ArbitraryPassword()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public void EmptyPfx_EmptyPassword()
{
Pkcs12Builder builder = new Pkcs12Builder();
Expand All @@ -140,7 +137,6 @@ public void EmptyPfx_EmptyPassword()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public void EmptyPfx_NullPassword()
{
Pkcs12Builder builder = new Pkcs12Builder();
Expand All @@ -152,7 +148,6 @@ public void EmptyPfx_NullPassword()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public void EmptyPfx_BadPassword()
{
Pkcs12Builder builder = new Pkcs12Builder();
Expand Down Expand Up @@ -871,7 +866,7 @@ public void CertAndKeyTwice_KeysUntagged()
cert,
new[] { cert, cert },
CheckMultiBoundKeyConsistency);
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public static void VerifySeparatorProcessing(X500DistinguishedNameFlags flags)
[InlineData("CN=\"unterminated", InvalidX500NameFragment)]
// Non-ASCII values in an E field
[InlineData("E=\u65E5\u672C\u8A9E", InvalidIA5StringFragment)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public static void InvalidInput(string input, string messageFragment)
{
CryptographicException exception =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static void CreateFromPem_CryptographicException_MalformedCertificate()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public static void CreateFromPem_CryptographicException_InvalidKeyAlgorithm()
{
CryptographicException ce = Assert.Throws<CryptographicException>(() =>
Expand Down Expand Up @@ -206,7 +205,6 @@ public static void CreateFromEncryptedPem_Rsa_KeyMismatch_Fail()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50937", TestPlatforms.Android)]
public static void CreateFromEncryptedPem_Rsa_InvalidPassword_Fail()
{
CryptographicException ce = Assert.Throws<CryptographicException>(() =>
Expand Down