Merge pull request #22431 from BruceForstall/DisableCorefxFailingTests
authorBruce Forstall <brucefo@microsoft.com>
Tue, 5 Feb 2019 21:27:21 +0000 (13:27 -0800)
committerGitHub <noreply@github.com>
Tue, 5 Feb 2019 21:27:21 +0000 (13:27 -0800)
Disable failing Linux/arm64 corefx tests

12 files changed:
build-test.cmd
build-test.sh
build.cmd
build.sh
eng/platform-matrix.yml
netci.groovy
src/System.Private.CoreLib/shared/System/Resources/ResourceManager.Uap.cs
src/corefx/System.Globalization.Native/pal_collation.c
src/jit/importer.cpp
tests/issues.targets
tests/runtest.cmd
tests/runtest.py

index 26b2b86..0c1ded3 100644 (file)
@@ -36,6 +36,7 @@ set "__SourceDir=%__ProjectDir%\src"
 set "__PackagesDir=%__ProjectDir%\packages"
 set "__RootBinDir=%__ProjectDir%\bin"
 set "__LogsDir=%__RootBinDir%\Logs"
+set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
 
 :: Default __Exclude to issues.targets
 set __Exclude=%__TestDir%\issues.targets
@@ -158,6 +159,10 @@ if not exist "%__TestBinDir%"                   md "%__TestBinDir%"
 if not exist "%__NativeTestIntermediatesDir%"   md "%__NativeTestIntermediatesDir%"
 if not exist "%__ManagedTestIntermediatesDir%"  md "%__ManagedTestIntermediatesDir%"
 if not exist "%__LogsDir%"                      md "%__LogsDir%"
+if not exist "%__MsbuildDebugLogsDir%"          md "%__MsbuildDebugLogsDir%"
+
+REM Set up the directory for MSBuild debug logs.
+set MSBUILDDEBUGPATH=%__MsbuildDebugLogsDir%
 
 echo %__MsgPrefix%Checking prerequisites
 
index 86472d1..75c8570 100755 (executable)
@@ -180,6 +180,13 @@ generate_layout()
         echo "Creating LogsDir: ${__LogsDir}"
         mkdir -p $__LogsDir
     fi
+    if [ ! -f "$__MsbuildDebugLogsDir" ]; then
+        echo "Creating MsbuildDebugLogsDir: ${__MsbuildDebugLogsDir}"
+        mkdir -p $__MsbuildDebugLogsDir
+    fi
+
+    # Set up the directory for MSBuild debug logs.
+    export MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}"
 
     __BuildProperties="-p:OSGroup=${__BuildOS} -p:BuildOS=${__BuildOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}"
 
@@ -283,6 +290,13 @@ build_Tests()
         echo "Creating LogsDir: ${__LogsDir}"
         mkdir -p $__LogsDir
     fi
+    if [ ! -f "$__MsbuildDebugLogsDir" ]; then
+        echo "Creating MsbuildDebugLogsDir: ${__MsbuildDebugLogsDir}"
+        mkdir -p $__MsbuildDebugLogsDir
+    fi
+
+    # Set up the directory for MSBuild debug logs.
+    export MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}"
 
     __BuildProperties="-p:OSGroup=${__BuildOS} -p:BuildOS=${__BuildOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}"
 
@@ -898,6 +912,7 @@ fi
 
 # Set dependent variables
 __LogsDir="$__RootBinDir/Logs"
+__MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
 
 # init the host distro name
 initHostDistroRid
index cc03454..dec253b 100644 (file)
--- a/build.cmd
+++ b/build.cmd
@@ -58,6 +58,7 @@ set "__PackagesDir=%DotNetRestorePackagesPath%"
 if [%__PackagesDir%]==[] set "__PackagesDir=%__ProjectDir%\packages"
 set "__RootBinDir=%__ProjectDir%\bin"
 set "__LogsDir=%__RootBinDir%\Logs"
+set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
 
 set __BuildAll=
 
@@ -319,9 +320,13 @@ REM Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
 set "__CMakeBinDir=%__BinDir%"
 set "__CMakeBinDir=%__CMakeBinDir:\=/%"
 
-if not exist "%__BinDir%"           md "%__BinDir%"
-if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"
-if not exist "%__LogsDir%"          md "%__LogsDir%"
+if not exist "%__BinDir%"              md "%__BinDir%"
+if not exist "%__IntermediatesDir%"    md "%__IntermediatesDir%"
+if not exist "%__LogsDir%"             md "%__LogsDir%"
+if not exist "%__MsbuildDebugLogsDir%" md "%__MsbuildDebugLogsDir%"
+
+REM Set up the directory for MSBuild debug logs.
+set MSBUILDDEBUGPATH=%__MsbuildDebugLogsDir%
 
 REM It is convenient to have your Nuget search path include the location where the build
 REM will place packages.  However nuget used during the build will fail if that directory
index 536dbe8..ef50b3e 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -140,6 +140,7 @@ setup_dirs()
     mkdir -p "$__RootBinDir"
     mkdir -p "$__BinDir"
     mkdir -p "$__LogsDir"
+    mkdir -p "$__MsbuildDebugLogsDir"
     mkdir -p "$__IntermediatesDir"
 
     if [ $__CrossBuild == 1 ]; then
@@ -996,6 +997,7 @@ fi
 
 # Set dependent variables
 __LogsDir="$__RootBinDir/Logs"
+__MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs"
 
 # init the host distro name
 initHostDistroRid
@@ -1047,6 +1049,9 @@ initTargetDistroRid
 # Make the directories necessary for build if they don't exist
 setup_dirs
 
+# Set up the directory for MSBuild debug logs.
+export MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}"
+
 # Check prereqs.
 check_prereqs
 
index d7d6b43..f699177 100644 (file)
@@ -19,9 +19,9 @@ jobs:
     containerName: ubuntu_1404_arm_cross_build_image
     helixQueues:
       ${{ if eq(variables['System.TeamProject'], 'public') }}:
-        asString: 'Ubuntu.1404.Arm32.Open'
-        asArray:
-        - Ubuntu.1404.Arm32.Open
+        # TODO: add Ubuntu.1404.Arm32.Open once Jenkins has been shutdown
+        asString: ''
+        asArray: []
       ${{ if eq(variables['System.TeamProject'], 'internal') }}:
         # We don't have any Linux/arm32 internal Helix queues
         asString: ''
index 00d42d1..53210cd 100755 (executable)
@@ -1568,6 +1568,15 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
             if ((architecture == 'arm64') && isCoreFxScenario(scenario) && !isFlowJob) {
                 break
             }
+            // Windows arm64 corefx testing all fails due to time out, partially due to no parallelism
+            // in the test run harness. So don't create cron jobs for these. We could alternatively
+            // just increase the timeout, but we don't have enough Windows arm64 machines to
+            // take so much time running these. We also have Linux/arm64 corefx test coverage.
+            // It would be best to improve the runtime of the tests.
+            // See issue https://github.com/dotnet/coreclr/issues/21236.
+            if ((architecture == 'arm64') && isCoreFxScenario(scenario) && (os == 'Windows_NT')) {
+                break
+            }
             if (jobRequiresLimitedHardware(architecture, os)) {
                 if ((architecture == 'arm64') && (os == 'Ubuntu16.04')) {
                     // These jobs are very fast on Linux/arm64 hardware, so run them daily.
@@ -1928,10 +1937,19 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
                         needsTrigger = false
                         break
                     }
-
-                    if (scenario == 'crossgen_comparison') {
-                        if (os == 'Ubuntu' && architecture == 'arm' && (configuration == 'Checked' || configuration == 'Release')) {
-                            isDefaultTrigger = true
+                    if (os == 'Ubuntu' && architecture == 'arm') {
+                        switch (scenario) {
+                            case 'innerloop':
+                            case 'no_tiered_compilation_innerloop':
+                                if (configuration == 'Checked') {
+                                    isDefaultTrigger = true
+                                }
+                                break
+                             case 'crossgen_comparison':
+                                if (configuration == 'Checked' || configuration == 'Release') {
+                                    isDefaultTrigger = true
+                                }
+                                break
                         }
                     }
                     break
@@ -2246,7 +2264,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     }
 
                     // Archive the logs, even if the build failed (which is when they are most interesting).
-                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
+                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err,bin/Logs/MsbuildDebugLogs/*", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
                     break
                 case 'arm':
                 case 'arm64':
@@ -2298,7 +2316,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     }
 
                     // Archive the logs, even if the build failed (which is when they are most interesting).
-                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
+                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err,bin/Logs/MsbuildDebugLogs/*", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
                     break
                 default:
                     println("Unknown architecture: ${architecture}");
@@ -2422,7 +2440,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     }
 
                     // Archive the logs, even if the build failed (which is when they are most interesting).
-                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
+                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err,bin/Logs/MsbuildDebugLogs/*", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
                     break
                 case 'armem':
                     // Emulator cross builds for ARM runs on Tizen currently
@@ -2547,7 +2565,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     }
 
                     // Archive the logs, even if the build failed (which is when they are most interesting).
-                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
+                    Utilities.addArchival(newJob, "bin/Logs/*.log,bin/Logs/*.wrn,bin/Logs/*.err,bin/Logs/MsbuildDebugLogs/*", "", /* doNotFailIfNothingArchived */ true, /* archiveOnlyIfSuccessful */ false)
 
                     // We need to clean up the build machines; the docker build leaves newly built files with root permission, which
                     // the cleanup task in Jenkins can't remove.
index 1faf55f..1a89d56 100644 (file)
@@ -73,7 +73,7 @@ namespace System.Resources
 #if FEATURE_APPX
             Type WinRTResourceManagerType = Type.GetType("System.Resources.WindowsRuntimeResourceManager, System.Runtime.WindowsRuntime", throwOnError: true);
 #else // ENABLE_WINRT
-            Assembly hiddenScopeAssembly = Assembly.Load(RuntimeAugments.HiddenScopeAssemblyName);
+            Assembly hiddenScopeAssembly = Assembly.Load(Internal.Runtime.Augments.RuntimeAugments.HiddenScopeAssemblyName);
             Type WinRTResourceManagerType = hiddenScopeAssembly.GetType("System.Resources.WindowsRuntimeResourceManager", true);
 #endif
             return (WindowsRuntimeResourceManagerBase)Activator.CreateInstance(WinRTResourceManagerType, true);
@@ -142,6 +142,7 @@ namespace System.Resources
             if (!ApplicationModel.IsUap)
                 return;
 #else // ENABLE_WINRT
+            Internal.Runtime.Augments.WinRTInteropCallbacks callbacks = Internal.Runtime.Augments.WinRTInterop.UnsafeCallbacks;
             if (!(callbacks != null && callbacks.IsAppxModel()))
                 return;
 #endif
index a0ce96d..a8c94cf 100644 (file)
@@ -42,9 +42,8 @@ typedef struct { int32_t key; UCollator* UCollator; } TCollatorMap;
 struct SortHandle
 {
     UCollator* regular;
-    TCollatorMap* collatorsPerOption;
     pthread_mutex_t collatorsLockObject;
-    void* pRoot;
+    void* collatorsPerOptionRoot;
 };
 
 typedef struct { UChar* items; size_t capacity; size_t size; } UCharList;
@@ -372,7 +371,7 @@ void CreateSortHandle(SortHandle** ppSortHandle)
         return;
     }
 
-    (*ppSortHandle)->pRoot = NULL;
+    (*ppSortHandle)->collatorsPerOptionRoot = NULL;
     int result = pthread_mutex_init(&(*ppSortHandle)->collatorsLockObject, NULL);
 
     if (result != 0)
@@ -410,10 +409,10 @@ void GlobalizationNative_CloseSortHandle(SortHandle* pSortHandle)
     ucol_close(pSortHandle->regular);
     pSortHandle->regular = NULL;
 
-    while (pSortHandle->pRoot != NULL)
+    while (pSortHandle->collatorsPerOptionRoot != NULL)
     {
-        TCollatorMap* data = *(TCollatorMap **)pSortHandle->pRoot;
-        tdelete(data, &pSortHandle->pRoot, TreeComparer);
+        TCollatorMap* data = *(TCollatorMap **)pSortHandle->collatorsPerOptionRoot;
+        tdelete(data, &pSortHandle->collatorsPerOptionRoot, TreeComparer);
         ucol_close(data->UCollator);
         free(data);
     }
@@ -440,12 +439,11 @@ const UCollator* GetCollatorFromSortHandle(SortHandle* pSortHandle, int32_t opti
 
         TCollatorMap* map = (TCollatorMap*)malloc(sizeof(TCollatorMap));
         map->key = options;
-        void* entry = tfind(map, &pSortHandle->pRoot, TreeComparer);
-        if (entry == NULL)
+        void* entry = tsearch(map, &pSortHandle->collatorsPerOptionRoot, TreeComparer);
+        if ((*(TCollatorMap**)entry) == map)
         {
             pCollator = CloneCollatorWithOptions(pSortHandle->regular, options, pErr);
             map->UCollator = pCollator;
-            tsearch(map, &pSortHandle->pRoot, TreeComparer);
         }
         else
         {
index 163779c..477b124 100644 (file)
@@ -6696,10 +6696,12 @@ bool Compiler::impCanPInvokeInlineCallSite(BasicBlock* block)
         return true;
     }
 
-#ifdef _TARGET_AMD64_
-    // On x64, we disable pinvoke inlining inside of try regions.
-    // Here is the comment from JIT64 explaining why:
+#ifdef _TARGET_64BIT_
+    // On 64-bit platforms, we disable pinvoke inlining inside of try regions.
+    // Note that this could be needed on other architectures too, but we
+    // haven't done enough investigation to know for sure at this point.
     //
+    // Here is the comment from JIT64 explaining why:
     //   [VSWhidbey: 611015] - because the jitted code links in the
     //   Frame (instead of the stub) we rely on the Frame not being
     //   'active' until inside the stub.  This normally happens by the
@@ -6721,7 +6723,7 @@ bool Compiler::impCanPInvokeInlineCallSite(BasicBlock* block)
     {
         return false;
     }
-#endif // _TARGET_AMD64_
+#endif // _TARGET_64BIT_
 
     return true;
 }
index d7dd371..3387516 100644 (file)
         <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/DefaultInterfaceMethods/methodimpl/methodimpl/*">
             <Issue>9565</Issue>
         </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)/Interop/NativeLibraryResolveEvent/ResolveEventTests/*">
-            <Issue>21964</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)/Interop/NativeLibraryResolveCallback/CallbackTests/*">
-            <Issue>21964</Issue>
-        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/Regressions/coreclr/16064/methodimpl/*">
             <Issue>9565</Issue>
         </ExcludeList>
index 37c5341..e691e7f 100644 (file)
@@ -34,6 +34,7 @@ if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
 set "__ProjectFilesDir=%__ProjectDir%"
 set "__RootBinDir=%__ProjectDir%\..\bin"
 set "__LogsDir=%__RootBinDir%\Logs"
+set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
 
 set __Sequential=
 set __msbuildExtraArgs=
@@ -283,7 +284,11 @@ if defined DoLink (
     set __msbuildCommonArgs=%__msbuildCommonArgs% /p:RunTestsViaIllink=true
 )
 
-if not exist %__LogsDir% md %__LogsDir%
+if not exist "%__LogsDir%"                      md "%__LogsDir%"
+if not exist "%__MsbuildDebugLogsDir%"          md "%__MsbuildDebugLogsDir%"
+
+REM Set up the directory for MSBuild debug logs.
+set MSBUILDDEBUGPATH=%__MsbuildDebugLogsDir%
 
 REM These log files are created automatically by the test run process. Q: what do they depend on being set?
 set __TestRunHtmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.html
index 7d66a83..c3c7fdc 100755 (executable)
@@ -640,7 +640,14 @@ def call_msbuild(coreclr_repo_location,
     logs_dir = os.path.join(coreclr_repo_location, "bin", "Logs")
     if not os.path.isdir(logs_dir):
         os.makedirs(logs_dir)
-    
+
+    msbuild_debug_logs_dir = os.path.join(logs_dir, "MsbuildDebugLogs")
+    if not os.path.isdir(msbuild_debug_logs_dir):
+        os.makedirs(msbuild_debug_logs_dir)
+
+    # Set up the directory for MSBuild debug logs.
+    os.environ["MSBUILDDEBUGPATH"] = msbuild_debug_logs_dir
+
     command =   [dotnetcli_location,
                  "msbuild",
                  os.path.join(coreclr_repo_location, "tests", "runtest.proj"),