Merge pull request #3387 from xmcclure/test-suite-bump
authormonojenkins <jo.shields+jenkins@xamarin.com>
Tue, 9 Aug 2016 22:30:10 +0000 (00:30 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Aug 2016 22:30:10 +0000 (00:30 +0200)
Update ms-test-suite to fix broken test

acceptance-tests/ms-test-suite.mk
mcs/class/System.Windows.Forms/Test/System.Windows.Forms/DateTimePickerTest.cs
mcs/tools/mdoc/Makefile
mono/metadata/monitor.c
mono/metadata/monitor.h
mono/mini/test_op_il_seq_point.sh
mono/tests/Makefile.am

index c1c16199481352d873f6df2c7a077a43197dcbe3..bd85bd494bd3b5e960de1e90ffc6c07330dbeb88 100644 (file)
@@ -1,10 +1,10 @@
 check-ms-test-suite:
        @if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
-               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -t:library -warn:1 -r:nunit.framework" && \
+               $(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug -t:library -warn:1 -r:nunit.framework" && \
                $(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-console.exe -nologo -exclude=MonoBug,BadTest" NUNIT_XML_RESULT=$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml || EXIT_CODE=1; \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug -warn:1" && \
                $(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
                exit $$EXIT_CODE; \
        else \
                echo "*** [ms-test-suite] Getting the repository failed, you probably don't have access to this Xamarin-internal resource. Skipping."; \
-       fi
\ No newline at end of file
+       fi
index 17156b8b708bdef62e4659b9f104360ce575f311..7fc177f9851e5e48925bc4e9c97038948f047abf 100644 (file)
@@ -3014,7 +3014,7 @@ namespace MonoTests.System.Windows.Forms {
                                 * Without this everytime a "y" or "yy" comes first in the format, it will always show as 
                                 * a 4-digit string if this is not done.
                                 */
-                               if (typeof (int).GetType ().GetType ().Name != "MonoType") {
+                               if (Type.GetType ("Mono.Runtime") == null) {
                                        // Only do this for MS, not implemented in Mono.
                                        dt.CustomFormat = "y";
                                        Assert.AreEqual ("2007", dt.Text, "#msbug1?");
index aa235d31fbda17f9698cffa9442ca7a350d11c53..f7074361022d4314aa934b4e5954245d5adacf89 100644 (file)
@@ -160,7 +160,7 @@ check-monodocer-addNonGeneric: $(PROGRAM)
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-addNonGeneric-v2.dll
-       diff --exclude=.svn -rup Test/en.expected-addNonGeneric Test/en.actual
+       diff -rup Test/en.expected-addNonGeneric Test/en.actual
 
 check-monodocer-dropns-classic: $(PROGRAM)
        # tests the simplest --dropns case, a single class where the root namespace was dropped.
@@ -168,7 +168,7 @@ check-monodocer-dropns-classic: $(PROGRAM)
        $(MAKE) Test/DocTest-DropNS-classic.dll
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll --api-style=classic
        $(MAKE) update-monodocer-dropns-unified
-       diff --exclude=.svn -rup Test/en.expected-dropns-classic-v1 Test/en.actual
+       diff -rup Test/en.expected-dropns-classic-v1 Test/en.actual
 
 check-monodocer-dropns-multi: $(PROGRAM)
        -rm -Rf Test/en.actual
@@ -185,7 +185,7 @@ check-monodocer-dropns-multi: $(PROGRAM)
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic 
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework 
        
-       diff --exclude=.svn -rup Test/en.expected-dropns-multi Test/en.actual
+       diff -rup Test/en.expected-dropns-multi Test/en.actual
 
 
 check-monodocer-dropns-multi-withexisting: $(PROGRAM)
@@ -203,7 +203,7 @@ check-monodocer-dropns-multi-withexisting: $(PROGRAM)
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-CLASSIC) --api-style=classic 
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual $(MULTI-UNIFIED) --api-style=unified --dropns Test/DocTest-DropNS-unified.dll=MyFramework --dropns Test/DocTest-DropNS-unified-multitest.dll=MyFramework 
        
-       diff --exclude=.svn -rup Test/en.expected-dropns-multi-withexisting Test/en.actual
+       diff -rup Test/en.expected-dropns-multi-withexisting Test/en.actual
 
 check-monodocer-dropns-delete: $(PROGRAM)
        -rm -Rf Test/en.actual
@@ -217,7 +217,7 @@ check-monodocer-dropns-delete: $(PROGRAM)
        $(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic-deletetest.dll --api-style=classic
        $(MAKE) Test/DocTest-DropNS-unified-deletetest-V2.dll
        $(MONO) $(PROGRAM) update --delete --exceptions=all -o Test/en.actual Test/DocTest-DropNS-unified-deletetest.dll --api-style=unified --dropns Test/DocTest-DropNS-unified-deletetest.dll=MyFramework
-       diff --exclude=.dvn -rup Test/en.expected-dropns-delete Test/en.actual
+       diff -rup Test/en.expected-dropns-delete Test/en.actual
 
 check-monodocer-dropns-classic-withsecondary: $(PROGRAM)
        # tests case where a secondary assembly is included with a --dropns parameter
@@ -226,7 +226,7 @@ check-monodocer-dropns-classic-withsecondary: $(PROGRAM)
        $(MAKE) Test/DocTest-DropNS-classic-secondary.dll
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-DropNS-classic.dll Test/DocTest-DropNS-classic-secondary.dll --api-style=classic
        $(MAKE) update-monodocer-dropns-unified-withsecondary
-       diff --exclude=.svn -rup Test/en.expected-dropns-classic-withsecondary Test/en.actual
+       diff -rup Test/en.expected-dropns-classic-withsecondary Test/en.actual
 
 update-monodocer-dropns-unified: $(PROGRAM)
        $(MAKE) Test/DocTest-DropNS-unified.dll
@@ -245,13 +245,13 @@ check-monodocer-internal-interface: $(PROGRAM)
        -rm -Rf Test/en.actual
        $(MAKE) Test/DocTest-InternalInterface.dll
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-InternalInterface.dll
-       diff --exclude=.svn -rup Test/en.expected-internal-interface Test/en.actual
+       diff -rup Test/en.expected-internal-interface Test/en.actual
 
 check-monodocer-enumerations: $(PROGRAM)
        -rm -Rf Test/en.actual
        $(MAKE) Test/DocTest-enumerations.dll
        $(MONO) $(PROGRAM) update --exceptions=all -o Test/en.actual Test/DocTest-enumerations.dll
-       diff --exclude=.svn -rup Test/en.expected-enumerations Test/en.actual
+       diff -rup Test/en.expected-enumerations Test/en.actual
 
 check-monodocer-update: $(PROGRAM)
        find Test/en.expected -name \*.xml -exec rm "{}" \;
@@ -262,9 +262,9 @@ check-monodocer: $(PROGRAM)
        -rm -Rf Test/en.actual
        $(MAKE) Test/DocTest.dll-v1
        $(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll
-       diff --exclude=.svn -rup Test/en.expected Test/en.actual
+       diff -rup Test/en.expected Test/en.actual
        $(MONO) $(PROGRAM) update --debug --exceptions=all -o Test/en.actual Test/DocTest.dll 
-       diff --exclude=.svn -rup Test/en.expected Test/en.actual
+       diff -rup Test/en.expected Test/en.actual
 
 check-monodocer-since-update: $(PROGRAM)
        find Test/en.expected.since -name \*.xml -exec rm "{}" \;
@@ -281,7 +281,7 @@ check-monodocer-since: $(PROGRAM)
        $(MAKE) Test/DocTest.dll-v2
        $(MONO) $(PROGRAM) --debug update --exceptions=all --since="Version 2.0" \
                -o Test/en.actual Test/DocTest.dll 
-       diff --exclude=.svn -rup Test/en.expected.since Test/en.actual
+       diff -rup Test/en.expected.since Test/en.actual
 
 check-monodocer-delete-update: $(PROGRAM)
        find Test/en.expected.delete -type f -exec rm "{}" \;
@@ -301,7 +301,7 @@ check-monodocer-delete: $(PROGRAM)
        $(MONO) $(PROGRAM) --debug update --exceptions=all -o Test/en.actual Test/DocTest.dll
        $(MAKE) Test/DocTest.dll-v1
        $(MONO) $(PROGRAM) --debug update -fno-assembly-versions --delete --exceptions=all -o Test/en.actual Test/DocTest.dll
-       diff --exclude=.svn -rup Test/en.expected.delete Test/en.actual
+       diff -rup Test/en.expected.delete Test/en.actual
 
 check-monodocer-importslashdoc-update: $(PROGRAM)
        find Test/en.expected.importslashdoc -name \*.xml -exec rm "{}" \;
@@ -314,7 +314,7 @@ check-monodocer-importslashdoc: $(PROGRAM)
        $(MAKE) Test/DocTest.dll-v1 TEST_CSCFLAGS=-doc:Test/DocTest.xml
        $(MONO) $(PROGRAM) --debug update --exceptions=all -i Test/DocTest.xml \
                -o Test/en.actual Test/DocTest.dll 
-       diff --exclude=.svn -rup Test/en.expected.importslashdoc Test/en.actual
+       diff -rup Test/en.expected.importslashdoc Test/en.actual
 
 check-monodocer-importecmadoc-update: $(PROGRAM)
        find Test/en.expected.importecmadoc -name \*.xml -exec rm "{}" \;
@@ -331,7 +331,7 @@ check-monodocer-importecmadoc: $(PROGRAM)
                '--type=System.Action`1' --type=System.AsyncCallback \
                --type=System.Environment --type=System.Array \
                -o Test/en.actual Test/DocTest.dll 
-       diff --exclude=.svn -rup Test/en.expected.importecmadoc Test/en.actual
+       diff -rup Test/en.expected.importecmadoc Test/en.actual
 
 check-mdoc-export-html-update: $(PROGRAM)
        find Test/html.expected -name \*.html -exec rm "{}" \;
@@ -342,7 +342,7 @@ check-mdoc-export-html: check-monodocer $(PROGRAM)
        rm -Rf Test/html.actual
        $(MONO) $(PROGRAM) export-html -o Test/html.actual \
                Test/en.expected.importslashdoc
-       diff --exclude=.svn -rup Test/html.expected Test/html.actual
+       diff -rup Test/html.expected Test/html.actual
 
 check-mdoc-export-html-with-version: $(PROGRAM)
        rm -Rf Test/html.actual.v0 Test/html.actual.since-with-v0 .v0.txt .v2.txt
@@ -357,7 +357,7 @@ check-mdoc-export-html-with-version: $(PROGRAM)
 check-md-html-dir: $(PROGRAM)
        rm -Rf Test/html.actual
        $(MONO) $(PROGRAM) export-html -dest:Test/html.actual $(DIR) 
-       diff --exclude=.svn -rup Test/html.expected Test/html.actual
+       diff -rup Test/html.expected Test/html.actual
 
 check-mdoc-export-msxdoc-update:
        $(MONO) $(PROGRAM) export-msxdoc -o - Test/en.expected.importslashdoc \
index 3dfd3c4e08f720871d564e55926e9009fa568e7a..fe09d0c24b881a1c10ee7046c94cb5c5aba395e8 100644 (file)
@@ -357,7 +357,8 @@ mon_finalize (MonoThreadsSync *mon)
        LOCK_DEBUG (g_message ("%s: Finalizing sync %p", __func__, mon));
 
        if (mon->entry_sem != NULL) {
-               CloseHandle (mon->entry_sem);
+               mono_coop_sem_destroy (mon->entry_sem);
+               g_free (mon->entry_sem);
                mon->entry_sem = NULL;
        }
        /* If this isn't empty then something is seriously broken - it
@@ -679,7 +680,7 @@ mono_monitor_exit_inflated (MonoObject *obj)
                        tmp_status = InterlockedCompareExchange ((gint32*)&mon->status, new_status, old_status);
                        if (tmp_status == old_status) {
                                if (have_waiters)
-                                       ReleaseSemaphore (mon->entry_sem, 1, NULL);
+                                       mono_coop_sem_post (mon->entry_sem);
                                break;
                        }
                        old_status = tmp_status;
@@ -745,8 +746,8 @@ mono_monitor_try_enter_inflated (MonoObject *obj, guint32 ms, gboolean allow_int
        HANDLE sem;
        gint64 then = 0, now, delta;
        guint32 waitms;
-       guint32 ret;
        guint32 new_status, old_status, tmp_status;
+       MonoSemTimedwaitRet wait_ret;
        MonoInternalThread *thread;
        gboolean interrupted = FALSE;
 
@@ -838,11 +839,12 @@ retry_contended:
         */
        if (mon->entry_sem == NULL) {
                /* Create the semaphore */
-               sem = CreateSemaphore (NULL, 0, 0x7fffffff, NULL);
-               g_assert (sem != NULL);
+               sem = g_new0 (MonoCoopSem, 1);
+               mono_coop_sem_init (sem, 0);
                if (InterlockedCompareExchangePointer ((gpointer*)&mon->entry_sem, sem, NULL) != NULL) {
                        /* Someone else just put a handle here */
-                       CloseHandle (sem);
+                       mono_coop_sem_destroy (sem);
+                       g_free (sem);
                }
        }
 
@@ -878,12 +880,10 @@ retry_contended:
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
 
        /*
-        * We pass TRUE instead of allow_interruption since we have to check for the
+        * We pass ALERTABLE instead of allow_interruption since we have to check for the
         * StopRequested case below.
         */
-       MONO_ENTER_GC_SAFE;
-       ret = WaitForSingleObjectEx (mon->entry_sem, waitms, TRUE);
-       MONO_EXIT_GC_SAFE;
+       wait_ret = mono_coop_sem_timedwait (mon->entry_sem, waitms, MONO_SEM_FLAGS_ALERTABLE);
 
        mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
        
@@ -891,7 +891,7 @@ retry_contended:
        mono_perfcounters->thread_queue_len--;
 #endif
 
-       if (ret == WAIT_IO_COMPLETION && !allow_interruption) {
+       if (wait_ret == MONO_SEM_TIMEDWAIT_RET_ALERTED && !allow_interruption) {
                interrupted = TRUE;
                /* 
                 * We have to obey a stop/suspend request even if 
@@ -914,11 +914,11 @@ retry_contended:
                        /* retry from the top */
                        goto retry_contended;
                }
-       } else if (ret == WAIT_OBJECT_0) {
+       } else if (wait_ret == MONO_SEM_TIMEDWAIT_RET_SUCCESS) {
                interrupted = FALSE;
                /* retry from the top */
                goto retry_contended;
-       } else if (ret == WAIT_TIMEOUT) {
+       } else if (wait_ret == MONO_SEM_TIMEDWAIT_RET_TIMEDOUT) {
                /* we're done */
        }
 
@@ -927,10 +927,10 @@ retry_contended:
 
        mono_profiler_monitor_event (obj, MONO_PROFILER_MONITOR_FAIL);
 
-       if (ret == WAIT_IO_COMPLETION) {
+       if (wait_ret == MONO_SEM_TIMEDWAIT_RET_ALERTED) {
                LOCK_DEBUG (g_message ("%s: (%d) interrupted waiting, returning -1", __func__, id));
                return -1;
-       } else if (ret == WAIT_TIMEOUT) {
+       } else if (wait_ret == MONO_SEM_TIMEDWAIT_RET_ALERTED) {
                LOCK_DEBUG (g_message ("%s: (%d) timed out waiting, returning FALSE", __func__, id));
                return 0;
        } else {
index f43e08caece432d1aba4a7bedd81d8e063138ff1..39afe1b69abeb67585e596f58b0759f0e7294f07 100644 (file)
@@ -13,7 +13,8 @@
 #include <glib.h>
 #include <mono/metadata/object.h>
 #include <mono/io-layer/io-layer.h>
-#include "mono/utils/mono-compiler.h"
+#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-coop-semaphore.h>
 
 G_BEGIN_DECLS
 
@@ -39,9 +40,9 @@ struct _MonoThreadsSync
 #ifdef HAVE_MOVING_COLLECTOR
        gint32 hash_code;
 #endif
-       HANDLE entry_sem;
        GSList *wait_list;
        void *data;
+       MonoCoopSem *entry_sem;
 };
 
 /*
index a22c14b08ea8e9e4d89ffcde322238f4eac55f83..ee235f5c739cb4a91bb87edfe55e0b5bb5a14f3c 100755 (executable)
@@ -18,7 +18,7 @@ RUNTIME=$BASEDIR/../../runtime/mono-wrapper
 trap "rm -rf ${TMP_FILE_PREFIX}*" EXIT
 
 tmp_file () {
-       mktemp ./${TMP_FILE_PREFIX}XXXX
+       mktemp ./${TMP_FILE_PREFIX}XXXXXX
 }
 
 clean_aot () {
index f8e557492a5fdda0111d1232ad11cdced805d78d..1cfd4fdb897ecec92dd246cf7b6bc7452b68d09f 100644 (file)
@@ -917,7 +917,7 @@ endif
 # Remove empty .stdout and .stderr files for wrench
 rm-empty-logs:
        @echo "Removing empty logs..."
-       @find . '(' -name "*.stdout" -o -name "*.stderr" ')' -empty -exec rm {} \;
+       find . '(' -name "*.stdout" -o -name "*.stderr" ')' -size 0 -exec rm {} \;
 
 assemblyresolve/test/asm.dll:
        $(MAKE) -C assemblyresolve prereq