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

Add back fixed xunit decimal, IntPtr and UIntPtr commented test cases #87084

Merged
merged 5 commits into from
Jun 7, 2023

Conversation

joaonunomota
Copy link
Contributor

Closes #27187

These tests were removed due to an issue in xunit that is now resolved on the latest version. The test projects are also on the latest xunit version, so all that is needed is to uncomment the marked tests.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 3, 2023
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jun 3, 2023
@danmoseley
Copy link
Member

Could you look at the build errors?

@joaonunomota
Copy link
Contributor Author

@danmoseley Sorry! Looking at those now, putting this as a draft PR until I get that fixed.

@joaonunomota joaonunomota marked this pull request as draft June 3, 2023 13:46
@joaonunomota joaonunomota marked this pull request as ready for review June 3, 2023 15:31
@joaonunomota
Copy link
Contributor Author

@danmoseley The failing tests are related to Native AOT deployments. I'm not familiar with this kind of deployment, but it seems odd that it only fails with the Decimal type.

Are these tests failing expected behavior or am I missing some Native AOT deployment specific configuration?

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

LGTM when CI is happy

@danmoseley
Copy link
Member

[SKIP] System.Reflection.Tests.MethodBaseTests.TestMethodBody
[FAIL] System.Reflection.Tests.InvokeRefReturnNetcoreTests.TestNullRefReturnInvoke
System.NotSupportedException : 'System.Reflection.Tests.InvokeRefReturnNetcoreTests.TestNullRefReturnInvoke[System.Decimal](System.Decimal)' is missing native code. MethodInfo.MakeGenericMethod() is not compatible with AOT compilation. Inspect and fix AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.GetUncachedMethodInvoker(RuntimeTypeInfo[], MemberInfo) + 0x30
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.MakeGenericMethod(Type[]) + 0x1c4
[FAIL] System.Reflection.Tests.InvokeRefReturnNetcoreTests.TestRefReturnPropertyGetValue
System.NotSupportedException : 'System.Reflection.Tests.InvokeRefReturnNetcoreTests.TestRefReturnPropertyGetValue[System.Decimal](System.Decimal)' is missing native code. MethodInfo.MakeGenericMethod() is not compatible with AOT compilation. Inspect and fix AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.GetUncachedMethodInvoker(RuntimeTypeInfo[], MemberInfo) + 0x30
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.MakeGenericMethod(Type[]) + 0x1c4
[FAIL] System.Reflection.Tests.InvokeRefReturnNetcoreTests.TestRefReturnMethodInvoke
System.NotSupportedException : 'System.Reflection.Tests.InvokeRefReturnNetcoreTests.TestRefReturnMethodInvoke[System.Decimal](System.Decimal)' is missing native code. MethodInfo.MakeGenericMethod() is not compatible with AOT compilation. Inspect and fix AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.GetUncachedMethodInvoker(RuntimeTypeInfo[], MemberInfo) + 0x30
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.MakeGenericMethod(Type[]) + 0x1c4
[SKIP] System.Tests.ExceptionTests.ThrowStatementDoesNotResetExceptionStackLineOtherMethod

@danmoseley
Copy link
Member

I pushed a change that will likely fix it, but I didn't attempt to test. we'll see.

@ghost
Copy link

ghost commented Jun 5, 2023

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

Issue Details

Closes #27187

These tests were removed due to an issue in xunit that is now resolved on the latest version. The test projects are also on the latest xunit version, so all that is needed is to uncomment the marked tests.

Author: joaonunomota
Assignees: -
Labels:

area-Meta, community-contribution, needs-area-label

Milestone: -

@danmoseley danmoseley removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 5, 2023
@danmoseley danmoseley closed this Jun 6, 2023
@danmoseley danmoseley reopened this Jun 6, 2023
@danmoseley
Copy link
Member

@joaonunomota I should be able to merge tomorrow. Thanks for your first contribution! Are you interested in another? We have quite a few issues marked "help wanted" and also a fair number marked "api-approved" that would be adding a new API to .NET. You are welcome to grab any not already assigned.

@joaonunomota
Copy link
Contributor Author

@danmoseley Thank you for all the help! I'll have a look through those other issues

@danmoseley
Copy link
Member

@dotnet/dnceng a variety of flavors ran over 4 hours here and timed out. this is the 2nd time around. is there a known issue -- does this mean low capacity, or slow machines?

@missymessa
Copy link
Member

@dotnet/dnceng a variety of flavors ran over 4 hours here and timed out. this is the 2nd time around. is there a known issue -- does this mean low capacity, or slow machines?

Yes: dotnet/arcade#13774

@danmoseley danmoseley closed this Jun 7, 2023
@danmoseley danmoseley reopened this Jun 7, 2023
@danmoseley
Copy link
Member

Unrelated


System.Threading.Tasks.Dataflow.Tests (parallel test collections = on, max threads = 6)
Process terminated. Assertion failed.
m_stateObject must only be for ExecutionContext but contained .
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.get_Context() in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 336
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 376
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 344
   at System.Threading.ThreadPool.<>c.<.cctor>b__53_0(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 1367
   at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SignalCompletion() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs:line 235
   at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SetResult(TResult result) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs:line 68
   at System.Threading.Tasks.Dataflow.Tests.AsyncEnumerable.Repeat(Int32 item, Int32 count)+MoveNext() in /_/src/libraries/System.Threading.Tasks.Dataflow/tests/Dataflow/DataflowTestHelper.IAsyncEnumerable.cs:line 22
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 286
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 270
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 370
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecuteFromThreadPool(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 341
   at System.Threading.ThreadPoolWorkQueue.Dispatch() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 919
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.NonBrowser.cs:line 58
   at System.Threading.Thread.StartCallback() in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs:line 105
./RunTests.sh: line 168: 95931 Abort trap: 6           

@danmoseley
Copy link
Member

@stephentoub Any thoughts about above stack?

@danmoseley danmoseley merged commit c81f310 into dotnet:main Jun 7, 2023
@joaonunomota joaonunomota deleted the add-fixed-xunit-tests branch June 7, 2023 12:58
@stephentoub
Copy link
Member

Any thoughts about above stack?

Seems like there's a race condition that may have happened during the assert; the assert is checking for null and then checking for something else, and it looks most likely that the value changed to null just after it was checked for null, and thus failed. The assert is easily fixable. I'm more concerned about in what situation there could be a race condition here... it's not immediately obvious.

@danmoseley
Copy link
Member

Thanks. I'll not open an issue since it's not actionable -- with your assert, it will be next time.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Meta community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add back xunit decimal, IntPtr and UIntPtr commented test cases
4 participants