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

Condition some NamedPipe tests on COM support #79578

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

MichalStrehovsky
Copy link
Member

There's nothing we can do about this, these should be conditional.

Fixes #79180.

These are failing on NativeAOT:

   at System.Runtime.InteropServices.ComWrappers.ComObjectForInterface(IntPtr) + 0x5c
   at System.DirectoryServices.UnsafeNativeMethods.ADsOpenObject(String, String, String, Int32, Guid&, Object&) + 0x94
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean) + 0x1ac
   at System.DirectoryServices.DirectoryEntry.RefreshCache() + 0x1c
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit() + 0x190
   at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize() + 0x78
   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext, Type, Nullable`1, String, DateTime) + 0x30
   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext, Type, String) + 0x48
   at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext, String) + 0x30
   at System.IO.Pipes.Tests.TestAccountImpersonator..ctor() + 0xa8

They also fail on Mono when one drills into the logs but don't show as failing in the CI legs:

        ----- Inner Stack Trace #1 (System.PlatformNotSupportedException) -----
        /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs(274,0): at System.Threading.Thread.SetApartmentStateUnchecked(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(521,0): at System.Threading.Thread.SetApartmentState(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(499,0): at System.Threading.Thread.SetApartmentState(ApartmentState state)
        /_/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs(528,0): at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
        /_/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs(499,0): at System.DirectoryServices.DirectoryEntry.Bind()
        /_/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs(934,0): at System.DirectoryServices.DirectoryEntry.RefreshCache()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs(663,0): at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs(577,0): at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs(1062,0): at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs(929,0): at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs(908,0): at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue)
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/User.cs(256,0): at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
        /_/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.Windows.cs(34,0): at System.IO.Pipes.Tests.TestAccountImpersonator..ctor()

@ghost
Copy link

ghost commented Dec 13, 2022

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

Issue Details

There's nothing we can do about this, these should be conditional.

Fixes #79180.

These are failing on NativeAOT:

   at System.Runtime.InteropServices.ComWrappers.ComObjectForInterface(IntPtr) + 0x5c
   at System.DirectoryServices.UnsafeNativeMethods.ADsOpenObject(String, String, String, Int32, Guid&, Object&) + 0x94
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean) + 0x1ac
   at System.DirectoryServices.DirectoryEntry.RefreshCache() + 0x1c
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit() + 0x190
   at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize() + 0x78
   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext, Type, Nullable`1, String, DateTime) + 0x30
   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext, Type, String) + 0x48
   at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext, String) + 0x30
   at System.IO.Pipes.Tests.TestAccountImpersonator..ctor() + 0xa8

They also fail on Mono when one drills into the logs but don't show as failing in the CI legs:

        ----- Inner Stack Trace #1 (System.PlatformNotSupportedException) -----
        /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs(274,0): at System.Threading.Thread.SetApartmentStateUnchecked(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(521,0): at System.Threading.Thread.SetApartmentState(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(499,0): at System.Threading.Thread.SetApartmentState(ApartmentState state)
        /_/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs(528,0): at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
        /_/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs(499,0): at System.DirectoryServices.DirectoryEntry.Bind()
        /_/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs(934,0): at System.DirectoryServices.DirectoryEntry.RefreshCache()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs(663,0): at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs(577,0): at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs(1062,0): at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs(929,0): at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs(908,0): at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue)
        /_/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/User.cs(256,0): at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
        /_/src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.Windows.cs(34,0): at System.IO.Pipes.Tests.TestAccountImpersonator..ctor()
Author: MichalStrehovsky
Assignees: -
Labels:

area-System.IO

Milestone: -

@MichalStrehovsky
Copy link
Member Author

I opened #79579 to track why the Mono leg was green even though the test is failing. We would not have found out. I was just puzzled why Mono only has one ActiveIssue and the other one was not ActiveIssue's. Mystery.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @MichalStrehovsky !

@adamsitnik adamsitnik merged commit 7edc1f6 into main Dec 13, 2022
@MichalStrehovsky MichalStrehovsky deleted the MichalStrehovsky-patch-1 branch December 13, 2022 08:27
@ghost ghost locked as resolved and limited conversation to collaborators Jan 12, 2023
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.

Named pipe Allow_Connection_UnderDifferentUsers_ForClientReading test fails on Mono on Windows
2 participants