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

Skip Linq tests, which are not supported in interpreter only build (without FEATURE_COMPILE) #61914

Closed

Conversation

gbalykov
Copy link
Member

These tests require MakeNewCustomDelegate, which throws PlatformNotSupportedException without FEATURE_COMPILE

To enable interpreter only build:

diff --git a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
index 0a9d7eba08b..aac8ca704da 100644
--- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
+++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
@@ -3,8 +3,8 @@
     <FeatureInterpret>true</FeatureInterpret>
     <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst</TargetFrameworks>
     <Nullable>enable</Nullable>
-    <IsInterpreting>false</IsInterpreting>
-    <IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting>
+    <IsInterpreting>true</IsInterpreting>
+    <!-- IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting -->
     <DefineConstants> $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE</DefineConstants>
     <DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
     <DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
diff --git a/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj b/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
index c2efe998ee9..8e3031fb8d3 100644
--- a/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
+++ b/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
@@ -1,8 +1,8 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <FeatureInterpret>true</FeatureInterpret>
-    <IsInterpreting>false</IsInterpreting>
-    <IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting>
+    <IsInterpreting>true</IsInterpreting>
+    <!-- IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting -->
     <DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
     <DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
     <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst</TargetFrameworks>

Without this change exception is thrown:

Discovered:  System.Linq.Expressions.Tests (found 5505 of 5514 test cases)
Starting:    System.Linq.Expressions.Tests (parallel test collections = on, max threads = 2)
        System.Linq.Expressions.Tests.LambdaTests.AboveByteMaxArityArg(useInterpreter: True) [FAIL]
            System.PlatformNotSupportedException : Operation is not supported on this platform.
            Stack Trace:
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd5+0x5
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000ddb+0x7c
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeDelegateType(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd6+0x2e
                at System.Linq.Expressions.Expression.Lambda(Expression body, String name, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x600025f+0x98
                at System.Linq.Expressions.Expression.Lambda(Expression body, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x6000259+0x0
                at System.Linq.Expressions.Expression.Lambda(Expression body, ParameterExpression[] parameters) in System.Linq.Expressions.dll:token 0x6000256+0x0
            /home/abuild/rpmbuild/BUILD/coreclr-6.0.0/src/libraries/System.Linq.Expressions/tests/Lambda/LambdaTests.cs(786,0): at System.Linq.Expressions.Tests.LambdaTests.AboveByteMaxArityArg(Boolean useInterpreter)
        System.Linq.Expressions.Tests.LambdaTests.ExcessiveArity(useInterpreter: True) [FAIL]
            System.PlatformNotSupportedException : Operation is not supported on this platform.
            Stack Trace:
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd5+0x5
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000ddb+0x7c
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeDelegateType(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd6+0x2e
                at System.Linq.Expressions.Expression.Lambda(Expression body, String name, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x600025f+0x98
                at System.Linq.Expressions.Expression.Lambda(Expression body, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x6000259+0x0
                at System.Linq.Expressions.Expression.Lambda(Expression body, ParameterExpression[] parameters) in System.Linq.Expressions.dll:token 0x6000256+0x0
            /home/abuild/rpmbuild/BUILD/coreclr-6.0.0/src/libraries/System.Linq.Expressions/tests/Lambda/LambdaTests.cs(912,0): at System.Linq.Expressions.Tests.LambdaTests.ExcessiveArity(Boolean useInterpreter)
Finished:    System.Linq.Expressions.Tests

cc @alpencolt

…ithout FEATURE_COMPILE)

These tests require MakeNewCustomDelegate, which throws PlatformNotSupportedException without FEATURE_COMPILE
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Nov 22, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Linq.Expressions and removed community-contribution Indicates that the PR has been added by a community member labels Nov 22, 2021
@ghost
Copy link

ghost commented Nov 22, 2021

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

Issue Details

These tests require MakeNewCustomDelegate, which throws PlatformNotSupportedException without FEATURE_COMPILE

To enable interpreter only build:

diff --git a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
index 0a9d7eba08b..aac8ca704da 100644
--- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
+++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
@@ -3,8 +3,8 @@
     <FeatureInterpret>true</FeatureInterpret>
     <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst</TargetFrameworks>
     <Nullable>enable</Nullable>
-    <IsInterpreting>false</IsInterpreting>
-    <IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting>
+    <IsInterpreting>true</IsInterpreting>
+    <!-- IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting -->
     <DefineConstants> $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE</DefineConstants>
     <DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
     <DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
diff --git a/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj b/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
index c2efe998ee9..8e3031fb8d3 100644
--- a/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
+++ b/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj
@@ -1,8 +1,8 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <FeatureInterpret>true</FeatureInterpret>
-    <IsInterpreting>false</IsInterpreting>
-    <IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting>
+    <IsInterpreting>true</IsInterpreting>
+    <!-- IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting -->
     <DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
     <DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
     <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst</TargetFrameworks>

Without this change exception is thrown:

Discovered:  System.Linq.Expressions.Tests (found 5505 of 5514 test cases)
Starting:    System.Linq.Expressions.Tests (parallel test collections = on, max threads = 2)
        System.Linq.Expressions.Tests.LambdaTests.AboveByteMaxArityArg(useInterpreter: True) [FAIL]
            System.PlatformNotSupportedException : Operation is not supported on this platform.
            Stack Trace:
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd5+0x5
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000ddb+0x7c
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeDelegateType(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd6+0x2e
                at System.Linq.Expressions.Expression.Lambda(Expression body, String name, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x600025f+0x98
                at System.Linq.Expressions.Expression.Lambda(Expression body, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x6000259+0x0
                at System.Linq.Expressions.Expression.Lambda(Expression body, ParameterExpression[] parameters) in System.Linq.Expressions.dll:token 0x6000256+0x0
            /home/abuild/rpmbuild/BUILD/coreclr-6.0.0/src/libraries/System.Linq.Expressions/tests/Lambda/LambdaTests.cs(786,0): at System.Linq.Expressions.Tests.LambdaTests.AboveByteMaxArityArg(Boolean useInterpreter)
        System.Linq.Expressions.Tests.LambdaTests.ExcessiveArity(useInterpreter: True) [FAIL]
            System.PlatformNotSupportedException : Operation is not supported on this platform.
            Stack Trace:
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd5+0x5
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate(Type[] types) in System.Linq.Expressions.dll:token 0x6000ddb+0x7c
                at System.Linq.Expressions.Compiler.DelegateHelpers.MakeDelegateType(Type[] types) in System.Linq.Expressions.dll:token 0x6000dd6+0x2e
                at System.Linq.Expressions.Expression.Lambda(Expression body, String name, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x600025f+0x98
                at System.Linq.Expressions.Expression.Lambda(Expression body, Boolean tailCall, IEnumerable`1 parameters) in System.Linq.Expressions.dll:token 0x6000259+0x0
                at System.Linq.Expressions.Expression.Lambda(Expression body, ParameterExpression[] parameters) in System.Linq.Expressions.dll:token 0x6000256+0x0
            /home/abuild/rpmbuild/BUILD/coreclr-6.0.0/src/libraries/System.Linq.Expressions/tests/Lambda/LambdaTests.cs(912,0): at System.Linq.Expressions.Tests.LambdaTests.ExcessiveArity(Boolean useInterpreter)
Finished:    System.Linq.Expressions.Tests

cc @alpencolt

Author: gbalykov
Assignees: -
Labels:

area-System.Linq.Expressions

Milestone: -

@MichalStrehovsky
Copy link
Member

Sigh, great timing. #61952 is going to delete FEATURE_COMPILE. I would prefer this goes in after because that one is a big change.

@MichalStrehovsky MichalStrehovsky added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Nov 23, 2021
@marek-safar marek-safar removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Dec 20, 2021
@marek-safar
Copy link
Contributor

@gbalykov could you please update the tests and resolve the conflict

@jkotas jkotas added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 24, 2022
@ghost ghost added the no-recent-activity label Feb 7, 2022
@ghost
Copy link

ghost commented Feb 7, 2022

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@ghost
Copy link

ghost commented Feb 21, 2022

This pull request will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the pull request, but please note that it will be locked if it remains inactive for another 30 days.

@ghost ghost closed this Feb 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 23, 2022
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Linq.Expressions needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants