Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2019-05-15 02:30:01 +0300
committerMarek Safar <marek.safar@gmail.com>2019-05-21 13:33:55 +0300
commit1eb9161ca6b096e5f13f1a604e38557dde6e5c74 (patch)
tree5850fd48b180661a540c55d9114b010cc26c4bd7 /mcs/class/System
parentaee4cdd248cded15c47dc64e61c78ca48c235af3 (diff)
Removing some remoting and multi-appdomain APIs on wasm and the AOT test profiles.
Build / profile changes: ------------------------ * `build/profiles/testing_aot_common.make`: define `DISABLE_REMOTING = yes` and `NO_MULTIPLE_APPDOMAINS = yes`. * `mcs/class/corlib/Makefile`: check `DISABLE_REMOTING` when setting `REFERENCE_SOURCES_FLAGS` (and don't define `FEATURE_REMOTING`, `MONO_COM` and `FEATURE_COMINTEROP`). * added new `testing_aot_common_corlib.dll.exclude.sources`. Several types in the `System.Runtime.Remoting.Messaging` namespace are used by the runtime in non-remoting scenarios, so those need to be preserved. For all other remoting namespaces, we only need a few stripped down stub versions of the some of the types; those have been added to a new `legacy` directory, so we can wildcard-exclude all the files here. * added new `testing_aot_common_corlib.dll.sources`; this currently only contains `legacy/*.cs` to list above mentioned stub versions. * added new `testing_aot_common_corlib_test.dll.exclude.sources` as a common test excludes file. API Changes (conditional to `DISABLE_REMOTING`): ------------------------------------------------ * `mcs/class/corlib/legacy/`: add stub-versions for some of the remoting-related classes that are used by the runtime (so we can't completely remove those types): - `System.MarshalByRefObject`. - `System.Runtime.Remoting.IRemotingTypeInfo`. - `System.Runtime.Remoting.ObjectHandle`. - `System.Runtime.Remoting.RemotingServices`. - `System.Runtime.Remoting.Activation.ActivationServices`. - `System.Runtime.Remoting.Contexts.Context`. - `System.Runtime.Remoting.Messaging.ILogicalThreadAffinative`. - `System.Runtime.Remoting.Messaging.LogicalCallContext`. - `System.Runtime.Remoting.Proxies.TransparentProxy`. - `System.Runtime.Remoting.Proxies.RealProxy`. some of these have fields that need to be preserved; these are marked with appropriate `#region` pragmas. All changes below are conditional to `DISABLE_REMOTING`. * `System.Runtime.Remoting.Messaging.AsyncResult`: this class is used by some of the async code, so we can't completely remove it. However, we can remove the `MonoMethodMessage call_message` field when `DISABLE_REMOTING`. * `System.Runtime.Remoting.Messaging.MonoMethodMessage`: this class is also used by some runtime code and thus needs to be preserved. However, when `DISABLE_REMOTING` is defined, then we make some changes to it: - remove all iterfaces (`IMethodCallMessage`, `IMethodReturnMessage`, and `IInternalMessage`). - `Properties` throws `PlatformNotSupportedException`. * `System.Runtime.InteropServices.Marshal`: disable some COM-related code. * `System.Threading.Thread`: remove `CurrentContext` property. * `System.Threading.ExecutionContext`: adjust conditional logic; don't define `FEATURE_REMOTING` if `DISABLE_REMOTING`. * `System.Activator`: add `DISABLE_REMOTING` to the existing `#if FEATURE_REMOTING || MOBILE_LEGACY` conditional in this class. * `System.AppDomain`: since we only have one domain, `DefaultDomain` will always return the root domain; comment out the call to `RemotingServices.GetDomainProxy` as well as some internal methods. * `System.__ComObject`: stub out on `DISABLE_REMOTING` as well as `!FULL_AOT_RUNTIME`. * `System.Runtime.Serialization.Formatters.Binary.BinaryFormatter`: adjust `IFormatter` versus `IRemotingFormatter` interface logic to use the former when `DISABLE_REMOTING`. * `System.Runtime.Serialization.Formatters.Binary.BinaryObjectReader`: adjust existing `#if FEATURE_REMOTING || MOBILE_LEGACY` conditional to add `DISABLE_REMOTING` to it. * `System.Diagnostics.CorrelationManager`: comment out some `CallContext.LogicalGetData()` and `CallContext.LogicalSetData`. * `System.Diagnostics.TraceEventCache`: likewise. Test changes: ------------- * `mono/tests/Makefile.am`: conditionally disable some remoting tests. * `corlib/Test/System.Runtime.Serialization/SerializationTest.cs`: conditionally disable all tests requiring remoting. * `corlib/Test/System/ActivatorTest.cs`: same; trying to preserve as much as possible in this test. * added some `DISABLE_REMOTING` and `DISABLE_SECURITY` conditionals to some of the tests.
Diffstat (limited to 'mcs/class/System')
-rw-r--r--mcs/class/System/System.csproj6
-rw-r--r--mcs/class/System/Test/System.ComponentModel.Design.Serialization/InstanceDescriptorTest.cs4
2 files changed, 5 insertions, 5 deletions
diff --git a/mcs/class/System/System.csproj b/mcs/class/System/System.csproj
index 0de252d165b..b07267da366 100644
--- a/mcs/class/System/System.csproj
+++ b/mcs/class/System/System.csproj
@@ -67,17 +67,17 @@
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
<OutputPath>./../../class/lib/testing_aot_full_interp</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full_interp</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;FEATURE_COMPILED;MONO_FEATURE_BTLS</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_SECURITY_ALIAS;FEATURE_COMPILED;MONO_FEATURE_BTLS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
<OutputPath>./../../class/lib/testing_aot_hybrid</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_hybrid</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;FEATURE_COMPILED;MONO_FEATURE_BTLS</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_SECURITY_ALIAS;FEATURE_COMPILED;MONO_FEATURE_BTLS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../class/lib/testing_aot_full</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full</IntermediateOutputPath>
- <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_BTLS</DefineConstants>
+ <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_SECURITY_ALIAS;MONO_FEATURE_BTLS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../class/lib/winaot</OutputPath>
diff --git a/mcs/class/System/Test/System.ComponentModel.Design.Serialization/InstanceDescriptorTest.cs b/mcs/class/System/Test/System.ComponentModel.Design.Serialization/InstanceDescriptorTest.cs
index 250136e52f3..70b9cfdf649 100644
--- a/mcs/class/System/Test/System.ComponentModel.Design.Serialization/InstanceDescriptorTest.cs
+++ b/mcs/class/System/Test/System.ComponentModel.Design.Serialization/InstanceDescriptorTest.cs
@@ -189,7 +189,7 @@ namespace MonoTests.System.ComponentModel.Design.Serialization {
[Test]
public void Property_Arguments_Mismatch ()
{
-#if MOBILE
+#if MOBILE && !DISABLE_SECURITY
// ensure the property is not linked out of the application since it make the test fails
Assert.IsNotNull (Thread.CurrentPrincipal, "pre-test");
#endif
@@ -212,7 +212,7 @@ namespace MonoTests.System.ComponentModel.Design.Serialization {
[Test]
public void Property_Arguments_Null ()
{
-#if MOBILE
+#if MOBILE && !DISABLE_SECURITY
// ensure the property is not linked out of the application since it make the test fails
Assert.IsNotNull (Thread.CurrentPrincipal, "pre-test");
#endif