Repository navigation
SupportedLinuxPlatforms_IsSupportedIsTrue fails on distros without quic #82077
Description
#81481 added a test which hard-codes the availability of quic for the runtime CI configuration:
runtime/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicPlatformDetectionTests.cs
Lines 55 to 65 in 327a244
| [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); | |
| } |
This test fails on our internal CI builds both on Fedora and RHEL as there is no quic there.
The other test that was added in this PR (SupportedLinuxPlatformsWithMsquic_IsSupportedIsTrue) looks like it is doing the right thing: check the IsSupported based on the availability of the native libmsquic library.
Can we remove SupportedLinuxPlatforms_IsSupportedIsTrue?
Additionally, SupportedLinuxPlatformsWithMsquic_IsSupportedIsTrue can probably be improved by using NativeLibrary to try and load libmsquic, and also verify that when the native library is not present, IsSupported returns false.
@ManickaP @CarnaViire @wfurt @karelz wdyt?
cc @omajid
Known Issue Error Message
Fill the error message using known issues guidance.
{
"ErrorMessage": "",
"BuildRetry": false
}
Activity
ManickaP commentedon Feb 14, 2023
This is on purpose, we had a big test hole exactly due to optionality of Quic support.
And for the
findvsNativeLibrary.Load, once again this is on purpose trying to get the library by other means than loading. As we also want to catch cases where libmsquic is present, but some of its dependencies aren't (we had this exact issue), which would not be caught with regular Load.But we can figure something out that would suppress that particular test in your environment but not in ours. Do you have any suggestion for this?
tmds commentedon Feb 14, 2023
If this test is meant to verify the the runtime CI configurations include quic, it can be skipped when not running on the runtime CI configurations.
Probably there is already a way to check this. It may be:
runtime/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
Line 27 in 327a244
@ViktorHofer is this the right property to detect Microsoft CI?
SupportedLinuxPlatforms_IsSupportedIsTruedoes this check already. You could make it explicit by asserting aNativeLibraryload works.SupportedLinuxPlatforms_IsSupportedIsTrueverifiesmsquicis available and loadable on Microsoft CI.SupportedLinuxPlatformsWithMsquic_IsSupportedIsTruecould just useNativeLibrary.wfurt commentedon Feb 14, 2023
There is also
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)]- and we can perhaps flip it.Preferably, your internal CI probably should include Quic & Https as well @tmds as it is part of the product.
But I understand if that takes some time.
tmds commentedon Feb 14, 2023
We don't consider it part of the product.
If it were part of the product, source-build .NET would build the native msquic library.
RHEL/Fedora don't provide it either.
That means there is no msquic library that is built (and supported) by Red Hat.
I'm not familiar with what is available or what may become available for quic (msquic or other) in RHEL, and other Linux distros.
Are there distros that build and ship msquic on their own?
wfurt commentedon Feb 14, 2023
Arch Linux seems to https://aur.archlinux.org/packages/msquic
I'm talking with MSQuic team about Alpine as they do not have any story for that.
For RHEL/Fedora/Centos we consume packages they publish and sign on packages.microsoft.com
wfurt commentedon Feb 14, 2023
BTW it would be great IMHO if msquic could become one or OS packages....
tmds commentedon Feb 14, 2023
As .NET maintainers, we're not looking to maintain msquic.
I have no idea where things are heading for quic support in Linux.
tmds commentedon Feb 14, 2023
I think this is meant for skipping tests that are inappropriate for CI, like tests that require some interaction.
We're looking for a condition that explicitly detects the Microsoft CI that is triggered on this repo.
ManickaP commentedon Feb 14, 2023
I used the "InHelix" as you suggested @tmds. It's already in PR.
5 remaining items
tmds commentedon Feb 17, 2023
This issue is about this test failing when it is not running in Microsoft CI.
@ManickaP is tracking the failures that happen in Microsoft CI here: #81901.
jakobbotsch commentedon Feb 17, 2023
Ok. I edited that issue with the known error details instead.
ilonatommy commentedon Aug 5, 2024
Failed on #105794, log
ManickaP commentedon Aug 5, 2024
This is another symptom of #105788. I'll temporarily fix up the docker images.
liveans commentedon Aug 6, 2024
This is fixed by dotnet/dotnet-buildtools-prereqs-docker#1156
Success run: link