-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[QUIC] Added tests to check IsSupported. #81481
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a2f2b8a
Added tests to check IsSupported.
ManickaP b1615d8
Use find to locate msquic lib; Use ActiveIssue to skip win test on si…
ManickaP da36829
Strict test for Linux containers to check where we're missing libmsquic
ManickaP f9241c4
Updated readme
ManickaP 2ea6ef0
Some more matrix testing of msquic presence
ManickaP c7276e2
Suppressed failing tests against failing containers
ManickaP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
using System.Diagnostics; | ||
using System.Net.Security; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
@@ -20,21 +21,47 @@ public void UnsupportedPlatforms_ThrowsPlatformNotSupportedException() | |
Assert.ThrowsAsync<PlatformNotSupportedException>(async () => await CreateQuicConnection(new IPEndPoint(IPAddress.Loopback, 0))); | ||
} | ||
|
||
[ActiveIssue("https://github.com/dotnet/runtime/issues/73290", typeof(PlatformDetection), nameof(PlatformDetection.IsSingleFile))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on this run: https://dev.azure.com/dnceng-public/public/_build/results?buildId=158551&view=ms.vss-test-web.build-test-results-tab&runId=3276022&resultId=132009&paneView=debug |
||
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.SupportsTls13))] | ||
public void SupportedWindowsPlatforms_IsSupportedIsTrue() | ||
{ | ||
if (PlatformDetection.HasAssemblyFiles) | ||
Assert.True(QuicListener.IsSupported); | ||
Assert.True(QuicConnection.IsSupported); | ||
} | ||
|
||
[ActiveIssue("https://github.com/dotnet/runtime/issues/81901", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine314), nameof(PlatformDetection.IsInContainer))] | ||
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsLinux))] | ||
public async Task SupportedLinuxPlatformsWithMsquic_IsSupportedIsTrue() | ||
{ | ||
using Process find = new Process(); | ||
find.StartInfo.FileName = "find"; | ||
find.StartInfo.Arguments = "/usr/ -iname libmsquic.so*"; | ||
find.StartInfo.RedirectStandardOutput = true; | ||
find.Start(); | ||
string output = await find.StandardOutput.ReadToEndAsync(); | ||
_output.WriteLine(output); | ||
await find.WaitForExitAsync(); | ||
if (output.Contains("libmsquic.so")) | ||
{ | ||
Assert.True(QuicListener.IsSupported); | ||
Assert.True(QuicConnection.IsSupported); | ||
} | ||
else | ||
{ | ||
// The above if check can be deleted when https://github.com/dotnet/runtime/issues/73290 | ||
// gets fixed and this test starts failing. | ||
Assert.False(QuicListener.IsSupported); | ||
Assert.False(QuicConnection.IsSupported); | ||
_output.WriteLine("No msquic library found."); | ||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
||
[ActiveIssue("https://github.com/dotnet/runtime/issues/81901", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine313), nameof(PlatformDetection.IsInContainer))] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/81901", typeof(PlatformDetection), nameof(PlatformDetection.IsAlpine314), nameof(PlatformDetection.IsInContainer))] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/81901", typeof(PlatformDetection), nameof(PlatformDetection.IsMariner1), nameof(PlatformDetection.IsInContainer))] | ||
[ActiveIssue("https://github.com/dotnet/runtime/issues/81901", typeof(PlatformDetection), nameof(PlatformDetection.IsCentos7), nameof(PlatformDetection.IsInContainer))] | ||
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsLinux))] | ||
public void SupportedLinuxPlatforms_IsSupportedIsTrue() | ||
{ | ||
_output.WriteLine($"Running on {PlatformDetection.GetDistroVersionString()}"); | ||
Assert.True(QuicListener.IsSupported); | ||
Assert.True(QuicConnection.IsSupported); | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the
IsRedHatFamily7
above?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It includes RHEL (or rather excludes from testing) as well. So no, I don't think that's advisable as we want exact list of images that are failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they should be basically identical. but I guess they are not:
dotnet/arcade#10253 (comment)
Perhaps something we should investigate. We have at least one of the runs in container so it should be easy to check.