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:
authorZoltan Varga <vargaz@gmail.com>2019-11-26 04:59:31 +0300
committerGitHub <noreply@github.com>2019-11-26 04:59:31 +0300
commit5b4cd5ce50e293548fd097622e41010807fcf2b8 (patch)
treef1eb466fa80f0e12835f99fb73db212d02a0492d
parente917c950539b2226ae0a4f74c7ddd11312bba92b (diff)
WASM + Netcore. (#17915)
* [runtime] Throw an exception from Thread::StartInternal () if threads are disabled. * Add more test suites and a corefx exclusions file.
-rw-r--r--mono/metadata/threads.c5
-rw-r--r--sdks/wasm/Makefile28
-rw-r--r--sdks/wasm/corefx-exclusions.rsp68
3 files changed, 97 insertions, 4 deletions
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 645543125cc..b17e8293bb0 100644
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -6689,6 +6689,11 @@ ves_icall_System_Threading_Thread_StartInternal (MonoThreadObjectHandle thread_h
THREAD_DEBUG (g_message("%s: Trying to start a new thread: this (%p)", __func__, internal));
+#ifdef DISABLE_THREADS
+ mono_error_set_not_supported (error, NULL);
+ return;
+#endif
+
LOCK_THREAD (internal);
if ((internal->state & ThreadState_Unstarted) == 0) {
diff --git a/sdks/wasm/Makefile b/sdks/wasm/Makefile
index 350433a1792..5823b95026c 100644
--- a/sdks/wasm/Makefile
+++ b/sdks/wasm/Makefile
@@ -257,20 +257,40 @@ COREFX_TESTS_DIR=
# $(5) - command line arguments
define NetcoreTestTemplate
-bin/$(2)/mono.js: packager.exe runtime-tests.js
+bin/$(2)/mono.js: packager.exe runtime-tests.js corefx-exclusions.rsp
@if test -z "$(COREFX_TESTS_DIR)"; then echo "COREFX_TESTS_DIR is not set"; exit 1; fi
- $(PACKAGER) --debugrt --search-path=$(COREFX_TESTS_DIR)/$(3) --template=runtime-tests.js --appdir=bin/$(2) --builddir=obj/$(2) --framework=netcoreapp3.0 --netcore-sdkdir=$(NETCOREAPP_DIR)/runtimes/webassembly-wasm/lib/netcoreapp3.0 --search-path=$(COREFX_TESTS_DIR)/$(3) xunit-runner/bin/Debug/netcoreapp3.0/xunit-runner.dll $(COREFX_TESTS_DIR)/$(3)/$(4)
+ $(PACKAGER) --debugrt --search-path=$(COREFX_TESTS_DIR)/$(3) --template=runtime-tests.js --appdir=bin/$(2) --builddir=obj/$(2) --asset=corefx-exclusions.rsp --framework=netcoreapp3.0 --netcore-sdkdir=$(NETCOREAPP_DIR)/runtimes/webassembly-wasm/lib/netcoreapp3.0 --search-path=$(COREFX_TESTS_DIR)/$(3) xunit-runner/bin/Debug/netcoreapp3.0/xunit-runner.dll $(COREFX_TESTS_DIR)/$(3)/$(4)
ninja -v -C obj/$(2)
# $(PACKAGER) --debugrt --search-path=$(WASM_BCL_DIR)/tests --search-path=$(XUNIT_DIR) --template=runtime-tests.js --appdir=bin/$(2) --builddir=obj/$(2) --asset=xunit-exclusions.rsp xunit-runner.exe $(WASM_BCL_DIR)/tests/xunit.execution.dotnet.dll $(WASM_BCL_DIR)/tests/$(3) $(WASM_BCL_DIR)/tests/Xunit.NetCore.Extensions.dll
build-$(1): bin/$(2)/mono.js
run-$(1): bin/$(2)/mono.js
- (cd bin/$(2) && $$(SM) runtime.js --enable-gc --run xunit-runner.dll $(4))
+ (cd bin/$(2) && $$(SM) runtime.js --enable-gc --run xunit-runner.dll $(4) `cat corefx-exclusions.rsp | grep -v '#'`)
+
+run-corefx-tests-netcore: run-$(1)
endef
-$(eval $(call NetcoreTestTemplate,Common-netcore,Common-netcore,Common.Tests,Common.Tests.dll))
+NETCORE_COREFX_FAILING_TEST_SUITES = \
+ System.CodeDom.Tests \
+ Microsoft.XmlSerializer.Generator.Tests
+
+NETCORE_COREFX_TEST_SUITES = \
+ Common.Tests \
+ Invariant.Tests \
+ Microsoft.CSharp.Tests \
+ Microsoft.VisualBasic.Core.Tests \
+ Microsoft.Win32.Primitives.Tests \
+ System.AppContext.Tests \
+ System.Buffers.Tests \
+ System.Collections.Concurrent.Tests \
+ System.Collections.Immutable.Tests \
+ System.Collections.NonGeneric.Tests \
+ System.Collections.Specialized.Tests \
+ System.Collections.Tests
+
+$(foreach suite,$(NETCORE_COREFX_TEST_SUITES),$(eval $(call NetcoreTestTemplate,$(suite)-netcore,$(suite)-netcore,$(suite),$(suite).dll)))
# Path to a fully built https://github.com/dotnet/performance
PERF_REPO_ROOT=
diff --git a/sdks/wasm/corefx-exclusions.rsp b/sdks/wasm/corefx-exclusions.rsp
new file mode 100644
index 00000000000..9eef9c11743
--- /dev/null
+++ b/sdks/wasm/corefx-exclusions.rsp
@@ -0,0 +1,68 @@
+# Takes too long
+-nomethod System.Net.Test.Common.VirtualNetworkTest.VirtualNetwork_SingleThreadIntegrityTest_Ok
+-nomethod System.Net.Test.Common.VirtualNetworkStreamTest.VirtualNetworkStream_SingleThreadIntegrityTest_Ok
+
+# Threads
+-nomethod System.Net.Test.Common.VirtualNetworkTest.VirtualNetwork_MultiThreadIntegrityTest_Ok
+-nomethod System.Net.Test.Common.VirtualNetworkStreamTest.VirtualNetworkStream_MultiThreadIntegrityTest_Ok
+-nomethod System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests.UsePoolInParallel
+-nonamespace System.Collections.Concurrent.Tests
+-noclass System.Collections.Immutable.Tests.ImmutableInterlockedTests
+-nomethod System.Collections.Immutable.Tests.ImmutableArrayTest.AddThreadSafety
+-nomethod System.Collections.Tests.ArrayList_SyncRootTests.GetSyncRoot
+-noclass System.Collections.Tests.ArrayList_SynchronizedTests
+-nomethod System.Collections.Tests.Queue_SyncRootTests.SyncRoot
+-nomethod System.Collections.Tests.Stack_SyncRootTests.GetSyncRootBasic
+-nomethod System.Collections.Tests.Hashtable_SyncRootTests.SyncRoot
+-nomethod System.Collections.Tests.Queue_SynchronizedTests.SynchronizedEnqueue
+
+# Needs crypto
+-noclass Tests.System.MarvinTests
+-noclass Tests.System.Security.IdentityHelperTests
+
+# File IO
+-nomethod Microsoft.VisualBasic.FileIO.Tests.FileSystemTests.GetDriveInfo_Drive
+
+# RemoteExecutor
+-nomethod Microsoft.VisualBasic.Tests.FileSystemTests.CloseAllFiles
+-nomethod System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests.RentingManyBuffersFiresExpectedDiagnosticEvents
+-nomethod System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests.RentBufferFiresRentedDiagnosticEvent
+-nomethod System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests.ReturnBufferFiresDiagnosticEvent
+-nomethod System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests.RentingNonExistentBufferFiresAllocatedDiagnosticEvent
+-nomethod System.Buffers.ArrayPool.Tests.ArrayPoolUnitTests.RentingBufferOverConfiguredMaximumSizeFiresDiagnosticEvent
+
+# Serialization + mscorlib not found
+-nomethod *.EqualityComparer_SerializationRoundtrip
+-nomethod *.IGenericSharedAPI_SerializeDeserialize
+-nomethod System.Collections.Tests.Dictionary_Tests.ComparerSerialization
+
+# Unclassified
+## Microsoft.VisualBasic.Core.Tests
+-noclass Microsoft.VisualBasic.Tests.ConversionsTests
+-noclass Microsoft.VisualBasic.Tests.ConversionTests
+-nomethod Microsoft.VisualBasic.Tests.FinancialTests.PV
+-nomethod Microsoft.VisualBasic.Tests.FinancialTests.Rate
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.CharTypeTests.FromObject_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.CharTypeTests.FromString_ThrowsInvalidCastException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.CharTypeTests.FromString_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.DateTypeTests.FromObject_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.DateTypeTests.FromString_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.IntegerTypeTests.FromString_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.LongTypeTests.FromString_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.DateTypeTests.FromObject_ThrowsInvalidCastException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.ObjectTypeTests.ObjTst
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.ProjectDataTests.EndApp
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.SingleTypeTests.FromObject_ThrowsOverflowException
+-nomethod Microsoft.VisualBasic.CompilerServices.Tests.StringTypeTests.StrCmp
+## System.Collections.Immutable.Tests
+-nomethod System.Collections.Immutable.Tests.ImmutableArrayTest.IStructuralEquatableGetHashCode
+## System.Collections.NonGeneric.Tests
+-nomethod System.Collections.Tests.CaseInsensitiveComparerTests.Ctor_CultureInfo_Compare_TurkishI
+-nomethod System.Collections.Tests.ComparerTests.Default_Compare
+-nomethod System.Collections.Tests.ComparerTests.DefaultInvariant_Compare
+-nomethod System.Collections.Tests.SortedListTests.Item_Get_DifferentCulture
+-nomethod System.Collections.Tests.CaseInsensitiveHashCodeProviderTests.Ctor_CultureInfo_GetHashCodeCompare_TurkishI
+-nomethod System.Collections.Tests.CaseInsensitiveHashCodeProviderTests.Default_Compare_TurkishI
+## System.Collections.Specialized.Tests
+## System.Collections.Tests
+-nomethod System.Collections.Tests.StructuralComparisonsTests.StructuralComparer_Compare