Skip to content

Some of NativeAOT tests are disabled after sharing test cases with ILLink #82447

@tlakollo

Description

@tlakollo

With #82216 we started to share the test cases between ILLink and NativeAOT this allows us to delete duplicated code and keep tests consistent, given that a change in one of the tests will affect both codebases. Not all the ILLink tests apply to NativeAOT and that's why NativeAOT only enables a subset of them in its TestDatabase file, the test database file enables testing in a folder fashion, a folder is assigned to a feature being tested. But even in these features NativeAOT has not triaged/enabled all of the tests, and some of the tests inside a feature might not apply to NativeAOT.
For these reasons we are disabling the test that have not been triaged inside a feature until they are triaged for:

  • Annotating the expectations of the test. Sometimes the test behavior is just different for NativeAOT and is expected.
  • A particular bug is fixed
  • A new feature is implemented
  • We determine that the feature doesn't apply to NativeAOT

Incomplete list of features which are still missing/tests:

  • Requires* on attributes RequiresOnAttributeCtor.cs, RequiresOnAttribute.cs parts of RequiresOnClass.cs
  • Requires* on a virtual method (directly or indirectly) causes warnings in NativeAOT, but in trimmer we rely on hierarchy checks and only warn on the base method (not on the override when marked via DAM).
  • ReflectionAccessFromCompilerGeneratedCode.cs is completely disabled for NativeAOT
  • RequiresOnStaticConstructors.cs is completely disabled for NativeAOT
  • RequiresOnVirtualsAndInterfaces.cs is completely disabled for NativeAOT
  • NativeAOT difference in behavior to ILLink with descriptor preserved code and constant propagation #85161
  • Activator.CreateInstance doesn't parse the string argument and instead always produces IL2032
  • Suppressing warnings by adding UnconditionalSuppressMessage via XML is not supported in NativeAOT
  • LocalDataFlow tests - these test various aspects of local data flow which are slightly off between the two compilers. Also NativeAOT in debug mode (running just the JIT) will produce very different results because it would be effectively testing JIT's behavior. Probably not a goal to fix this.
  • IReflectDataFlow this test validates a lot of Kept stuff, but NativeAOT seems to handle it very differently from ILLink. Probably needs some more investigation.
  • Enable ILLinker tests for externally-specified substitions #88647

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions