Skip to content

[mono] TestUserCredentialsPropertiesOnWindows and other tests fail with "Token cannot be zero." #80019

@akoeplinger

Description

@akoeplinger

This outerloop test fails on Windows on Mono:

    System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows [FAIL]
      System.ArgumentException : Token cannot be zero.
      Stack Trace:
        /_/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs(293,0): at System.Security.Principal.WindowsIdentity.DuplicateAccessToken(IntPtr accessToken)
        /_/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs(320,0): at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
        /_/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs(107,0): at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken, String authType, Int32 isAuthenticated)
        /_/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs(63,0): at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken)
        /_/src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs(108,0): at System.WindowsTestAccount.CreateUser()
        /_/src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs(47,0): at System.WindowsTestAccount..ctor(String userName)
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs(472,0): at System.Diagnostics.Tests.ProcessStartInfoTests.TestUserCredentialsPropertiesOnWindows()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodInvoker.Mono.cs(30,0): at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(59,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Filing this issue to track disabling the test (sometimes with a bit different stacktrace).

The same applies to these tests:

  • TestUserNetworkCredentialsPropertiesOnWindows
  • RunImpersonated_NameResolution
  • RunImpersonatedAsync_TaskAndTaskOfT
  • RunImpersonatedAsync_NameResolution

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions