Skip to content

Android on-device tests that fail under LLVM #89190

Open
@jonathanpeppers

Description

@jonathanpeppers

Description

We have a set of on-device tests that only fail when building with -p:EnableLLVM=true.

Error message
Expected: True
But was:  False
Stack trace
   at Java.InteropTests.JniValueMarshalerContractTests`1[[System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].CreateValue()
   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , IntPtr* )
   at System.Reflection.MethodInvoker.Invoke(Object , IntPtr* , BindingFlags )

Example:

They only fail on bool, sbyte, char, and short. The tests pass if -p:EnableLLVM is false (which is the default for customers) and they pass for the other data types.

Reproduction Steps

Build and run the xamarin/xamarin-android device test project with -c Release -p:EnableLLVM=true:

Expected behavior

Tests pass when -p:EnableLLVM=true.

Actual behavior

Tests fail when -p:EnableLLVM=true.

Regression?

Yes, this worked in .NET 6 & .NET 7 and past .NET 8 previews.

Known Workarounds

Use -p:EnableLLVM=false instead.

Configuration

Started happening: dotnet/android#8176

.NET SDK: 8.0.100-preview.7.23364.32

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions