From 980b038e31dec247694afcaeaa1c41fbb7db07bd Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Wed, 21 Nov 2018 22:52:14 -0800 Subject: [PATCH 1/7] add test to validate loaded assemblies on startup --- test/powershell/Host/Startup.Tests.ps1 | 120 +++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 test/powershell/Host/Startup.Tests.ps1 diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 new file mode 100644 index 00000000000..b7c4e4cb881 --- /dev/null +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -0,0 +1,120 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +Describe "Validate start of console host" -Tag CI { + BeforeAll { + $expectedAssemblies = @( + 'Microsoft.ApplicationInsights.dll' + 'Microsoft.Management.Infrastructure.dll' + 'Microsoft.PowerShell.Commands.Management.dll' + 'Microsoft.PowerShell.Commands.Utility.dll' + 'Microsoft.PowerShell.ConsoleHost.dll' + 'Microsoft.PowerShell.MarkdownRender.dll' + 'Microsoft.PowerShell.Security.dll' + 'Microsoft.Win32.Primitives.dll' + 'Microsoft.Win32.Registry.dll' + 'netstandard.dll' + 'Newtonsoft.Json.dll' + 'pwsh.dll' + 'System.Buffers.dll' + 'System.Collections.Concurrent.dll' + 'System.Collections.dll' + 'System.Collections.Immutable.dll' + 'System.Collections.NonGeneric.dll' + 'System.Collections.Specialized.dll' + 'System.ComponentModel.dll' + 'System.ComponentModel.Primitives.dll' + 'System.ComponentModel.TypeConverter.dll' + 'System.Console.dll' + 'System.Data.Common.dll' + 'System.Diagnostics.Debug.dll' + 'System.Diagnostics.DiagnosticSource.dll' + 'System.Diagnostics.FileVersionInfo.dll' + 'System.Diagnostics.Process.dll' + 'System.Diagnostics.StackTrace.dll' + 'System.Diagnostics.Tools.dll' + 'System.Diagnostics.TraceSource.dll' + 'System.Diagnostics.Tracing.dll' + 'System.DirectoryServices.dll' + 'System.Globalization.dll' + 'System.IO.FileSystem.AccessControl.dll' + 'System.IO.FileSystem.dll' + 'System.IO.FileSystem.DriveInfo.dll' + 'System.IO.Pipes.dll' + 'System.Linq.dll' + 'System.Linq.Expressions.dll' + 'System.Management.Automation.dll' + 'System.Memory.dll' + 'System.Net.Http.dll' + 'System.Net.Mail.dll' + 'System.Net.NetworkInformation.dll' + 'System.Net.Primitives.dll' + 'System.ObjectModel.dll' + 'System.Private.CoreLib.dll' + 'System.Private.Uri.dll' + 'System.Private.Xml.dll' + 'System.Private.Xml.Linq.dll' + 'System.Reflection.dll' + 'System.Reflection.Emit.dll' + 'System.Reflection.Emit.ILGeneration.dll' + 'System.Reflection.Emit.Lightweight.dll' + 'System.Reflection.Extensions.dll' + 'System.Reflection.Primitives.dll' + 'System.Resources.ResourceManager.dll' + 'System.Runtime.dll' + 'System.Runtime.Extensions.dll' + 'System.Runtime.InteropServices.dll' + 'System.Runtime.InteropServices.RuntimeInformation.dll' + 'System.Runtime.Loader.dll' + 'System.Runtime.Numerics.dll' + 'System.Runtime.Serialization.Formatters.dll' + 'System.Runtime.Serialization.Primitives.dll' + 'System.Security.AccessControl.dll' + 'System.Security.Claims.dll' + 'System.Security.Cryptography.Algorithms.dll' + 'System.Security.Cryptography.Encoding.dll' + 'System.Security.Cryptography.Primitives.dll' + 'System.Security.Cryptography.X509Certificates.dll' + 'System.Security.Principal.dll' + 'System.Security.Principal.Windows.dll' + 'System.Text.Encoding.CodePages.dll' + 'System.Text.Encoding.Extensions.dll' + 'System.Text.RegularExpressions.dll' + 'System.Threading.dll' + 'System.Threading.AccessControl.dll' + 'System.Threading.Tasks.dll' + 'System.Threading.Tasks.Parallel.dll' + 'System.Threading.Thread.dll' + 'System.Threading.ThreadPool.dll' + 'System.Threading.Timer.dll' + 'System.Xml.ReaderWriter.dll' + 'System.Xml.XDocument.dll' + ) + + if ($IsWindows) { + $expectedAssemblies += @( + 'Microsoft.Management.Infrastructure.CimCmdlets.dll' + 'Microsoft.PowerShell.CoreCLR.Eventing.dll' + 'System.DirectoryServices.dll' + 'System.Management.dll' + 'System.Reflection.Metadata.dll' + 'System.Security.Permissions.dll' + 'System.Threading.Overlapped.dll' + ) + } + else { + $expectedAssemblies += @( + 'System.IO.MemoryMappedFiles.dll' + 'System.Net.Sockets.dll' + 'System.Reflection.Metadata.dll' ) + } + + $loadedAssemblies = pwsh -noprofile -command '([System.AppDomain]::CurrentDomain.GetAssemblies()).manifestmodule | ? { $_.Name -notlike ""<*>"" } | % { $_.Name }' + } + + It "No new assemblies are loaded" { + foreach ($assembly in $loadedAssemblies) { + $expectedAssemblies | Should -Contain $assembly + } + } +} From 73c67ef251c9f9775d71471ee93f5881df61df32 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 4 Dec 2018 17:17:52 -0800 Subject: [PATCH 2/7] address feedback --- test/powershell/Host/Startup.Tests.ps1 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index b7c4e4cb881..1d2d733dd42 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -3,7 +3,7 @@ Describe "Validate start of console host" -Tag CI { BeforeAll { - $expectedAssemblies = @( + $allowedAssemblies = @( 'Microsoft.ApplicationInsights.dll' 'Microsoft.Management.Infrastructure.dll' 'Microsoft.PowerShell.Commands.Management.dll' @@ -19,7 +19,6 @@ Describe "Validate start of console host" -Tag CI { 'System.Buffers.dll' 'System.Collections.Concurrent.dll' 'System.Collections.dll' - 'System.Collections.Immutable.dll' 'System.Collections.NonGeneric.dll' 'System.Collections.Specialized.dll' 'System.ComponentModel.dll' @@ -59,6 +58,7 @@ Describe "Validate start of console host" -Tag CI { 'System.Reflection.Emit.ILGeneration.dll' 'System.Reflection.Emit.Lightweight.dll' 'System.Reflection.Extensions.dll' + 'System.Reflection.Metadata.dll' 'System.Reflection.Primitives.dll' 'System.Resources.ResourceManager.dll' 'System.Runtime.dll' @@ -71,7 +71,6 @@ Describe "Validate start of console host" -Tag CI { 'System.Runtime.Serialization.Primitives.dll' 'System.Security.AccessControl.dll' 'System.Security.Claims.dll' - 'System.Security.Cryptography.Algorithms.dll' 'System.Security.Cryptography.Encoding.dll' 'System.Security.Cryptography.Primitives.dll' 'System.Security.Cryptography.X509Certificates.dll' @@ -81,7 +80,6 @@ Describe "Validate start of console host" -Tag CI { 'System.Text.Encoding.Extensions.dll' 'System.Text.RegularExpressions.dll' 'System.Threading.dll' - 'System.Threading.AccessControl.dll' 'System.Threading.Tasks.dll' 'System.Threading.Tasks.Parallel.dll' 'System.Threading.Thread.dll' @@ -92,29 +90,27 @@ Describe "Validate start of console host" -Tag CI { ) if ($IsWindows) { - $expectedAssemblies += @( + $allowedAssemblies += @( 'Microsoft.Management.Infrastructure.CimCmdlets.dll' 'Microsoft.PowerShell.CoreCLR.Eventing.dll' 'System.DirectoryServices.dll' 'System.Management.dll' - 'System.Reflection.Metadata.dll' - 'System.Security.Permissions.dll' 'System.Threading.Overlapped.dll' ) } else { - $expectedAssemblies += @( + $allowedAssemblies += @( 'System.IO.MemoryMappedFiles.dll' 'System.Net.Sockets.dll' - 'System.Reflection.Metadata.dll' ) + ) } - $loadedAssemblies = pwsh -noprofile -command '([System.AppDomain]::CurrentDomain.GetAssemblies()).manifestmodule | ? { $_.Name -notlike ""<*>"" } | % { $_.Name }' + $loadedAssemblies = pwsh -noprofile -command '([System.AppDomain]::CurrentDomain.GetAssemblies()).manifestmodule | Where-Object { $_.Name -notlike ""<*>"" } | ForEach-Object { $_.Name }' } It "No new assemblies are loaded" { foreach ($assembly in $loadedAssemblies) { - $expectedAssemblies | Should -Contain $assembly + $allowedAssemblies | Should -Contain $assembly } } } From 12bb1478bd64da1341373167d667430546a21a5e Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 4 Dec 2018 17:45:30 -0800 Subject: [PATCH 3/7] add 'System.Collections.Immutable.dll' back as it's loaded on startup --- test/powershell/Host/Startup.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index 1d2d733dd42..46d627c30fd 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -19,6 +19,7 @@ Describe "Validate start of console host" -Tag CI { 'System.Buffers.dll' 'System.Collections.Concurrent.dll' 'System.Collections.dll' + 'System.Collections.Immutable.dll' 'System.Collections.NonGeneric.dll' 'System.Collections.Specialized.dll' 'System.ComponentModel.dll' From 7a3cb5888490aec7883a32edf0a0e894e9cd9951 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 4 Dec 2018 18:04:50 -0800 Subject: [PATCH 4/7] need to add back 'System.Security.Cryptography.Algorithms.dll' --- test/powershell/Host/Startup.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index 46d627c30fd..608b84fee5b 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -72,6 +72,7 @@ Describe "Validate start of console host" -Tag CI { 'System.Runtime.Serialization.Primitives.dll' 'System.Security.AccessControl.dll' 'System.Security.Claims.dll' + 'System.Security.Cryptography.Algorithms.dll' 'System.Security.Cryptography.Encoding.dll' 'System.Security.Cryptography.Primitives.dll' 'System.Security.Cryptography.X509Certificates.dll' From 06313ee9fb78e72533fa1d90289bd0a74ab743de Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Wed, 5 Dec 2018 11:00:00 -0800 Subject: [PATCH 5/7] add back 'System.Security.Permissions.dll' --- test/powershell/Host/Startup.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index 608b84fee5b..2b3243a43be 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -97,6 +97,7 @@ Describe "Validate start of console host" -Tag CI { 'Microsoft.PowerShell.CoreCLR.Eventing.dll' 'System.DirectoryServices.dll' 'System.Management.dll' + 'System.Security.Permissions.dll' 'System.Threading.Overlapped.dll' ) } From 042424efa8b1024dd65a93803bb106c2b89f22ad Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 5 Dec 2018 13:19:36 -0800 Subject: [PATCH 6/7] Update the test and the path for storing the optimization profile --- .../host/msh/ConsoleHost.cs | 3 +- .../engine/InitialSessionState.cs | 6 +- test/powershell/Host/Startup.Tests.ps1 | 161 +++++++++--------- 3 files changed, 89 insertions(+), 81 deletions(-) diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs index 2541435d203..002f51b8c3c 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs @@ -126,8 +126,7 @@ internal static int Start( #if UNIX profileDir = Platform.SelectProductNameForDirectory(Platform.XDG_Type.CACHE); #else - profileDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + - @"\Microsoft\Windows\PowerShell"; + profileDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Microsoft\PowerShell"; if (!Directory.Exists(profileDir)) { diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 2b745bbe786..811a5274b15 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -2651,16 +2651,16 @@ private Exception ProcessUserDrive(Runspace initializedRunspace) } // Create the User drive path directory in current user local appdata location: - // SystemDrive\Users\[user]\AppData\Local\Microsoft\Windows\PowerShell\DriveRoots\[UserName] + // SystemDrive\Users\[user]\AppData\Local\Microsoft\PowerShell\DriveRoots\[UserName] // Or for virtual accounts - // WinDir\System32\Microsoft\Windows\PowerShell\DriveRoots\[UserName] + // WinDir\System32\Microsoft\PowerShell\DriveRoots\[UserName] string directoryName = MakeUserNamePath(); #if UNIX string userDrivePath = Path.Combine(Platform.SelectProductNameForDirectory(Platform.XDG_Type.CACHE), "DriveRoots", directoryName); #else string userDrivePath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - @"Microsoft\Windows\PowerShell\DriveRoots", + @"Microsoft\PowerShell\DriveRoots", directoryName); #endif diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index 2b3243a43be..954d21ba916 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -4,116 +4,125 @@ Describe "Validate start of console host" -Tag CI { BeforeAll { $allowedAssemblies = @( - 'Microsoft.ApplicationInsights.dll' - 'Microsoft.Management.Infrastructure.dll' - 'Microsoft.PowerShell.Commands.Management.dll' - 'Microsoft.PowerShell.Commands.Utility.dll' + 'System.Private.CoreLib.dll' + 'pwsh.dll' + 'System.Runtime.dll' 'Microsoft.PowerShell.ConsoleHost.dll' - 'Microsoft.PowerShell.MarkdownRender.dll' - 'Microsoft.PowerShell.Security.dll' 'Microsoft.Win32.Primitives.dll' - 'Microsoft.Win32.Registry.dll' - 'netstandard.dll' - 'Newtonsoft.Json.dll' - 'pwsh.dll' - 'System.Buffers.dll' - 'System.Collections.Concurrent.dll' + 'System.Management.Automation.dll' + 'System.Resources.ResourceManager.dll' 'System.Collections.dll' - 'System.Collections.Immutable.dll' - 'System.Collections.NonGeneric.dll' + 'System.Threading.dll' + 'System.Threading.Thread.dll' + 'System.Runtime.Extensions.dll' + 'System.Security.Cryptography.X509Certificates.dll' + 'System.Security.Cryptography.Encoding.dll' + 'System.Net.Primitives.dll' + 'System.Net.Mail.dll' + 'System.Linq.Expressions.dll' + 'System.Runtime.InteropServices.RuntimeInformation.dll' + 'Microsoft.Management.Infrastructure.dll' + 'System.Runtime.InteropServices.dll' + 'System.Runtime.Serialization.Formatters.dll' + 'System.Runtime.Serialization.Primitives.dll' + 'System.Text.RegularExpressions.dll' + 'System.Collections.Concurrent.dll' + 'System.Private.Uri.dll' + 'System.Diagnostics.FileVersionInfo.dll' + 'System.IO.FileSystem.dll' + 'System.Xml.ReaderWriter.dll' + 'System.Text.Encoding.Extensions.dll' + 'System.Private.Xml.dll' + 'System.Runtime.Numerics.dll' + 'System.Security.AccessControl.dll' + 'System.Net.NetworkInformation.dll' + 'System.Security.Cryptography.Primitives.dll' + 'System.Buffers.dll' 'System.Collections.Specialized.dll' - 'System.ComponentModel.dll' - 'System.ComponentModel.Primitives.dll' + 'System.Linq.dll' + 'System.Data.Common.dll' 'System.ComponentModel.TypeConverter.dll' + 'System.ComponentModel.dll' + 'System.ObjectModel.dll' + 'Newtonsoft.Json.dll' + 'netstandard.dll' + 'System.Runtime.Loader.dll' 'System.Console.dll' - 'System.Data.Common.dll' 'System.Diagnostics.Debug.dll' - 'System.Diagnostics.DiagnosticSource.dll' - 'System.Diagnostics.FileVersionInfo.dll' + 'Microsoft.ApplicationInsights.dll' 'System.Diagnostics.Process.dll' - 'System.Diagnostics.StackTrace.dll' - 'System.Diagnostics.Tools.dll' - 'System.Diagnostics.TraceSource.dll' + 'System.Threading.Tasks.dll' + 'System.ComponentModel.Primitives.dll' + 'System.Reflection.dll' 'System.Diagnostics.Tracing.dll' - 'System.DirectoryServices.dll' + 'System.Diagnostics.Tools.dll' + 'System.Reflection.Extensions.dll' + 'System.Xml.XDocument.dll' + 'System.Private.Xml.Linq.dll' + 'System.Security.Principal.dll' 'System.Globalization.dll' - 'System.IO.FileSystem.AccessControl.dll' - 'System.IO.FileSystem.dll' - 'System.IO.FileSystem.DriveInfo.dll' + 'System.Threading.Timer.dll' + 'System.Collections.NonGeneric.dll' 'System.IO.Pipes.dll' - 'System.Linq.dll' - 'System.Linq.Expressions.dll' - 'System.Management.Automation.dll' + 'System.Security.Principal.Windows.dll' + 'Microsoft.PowerShell.Security.dll' + 'Microsoft.Win32.Registry.dll' + 'System.Threading.Tasks.Parallel.dll' + 'System.IO.FileSystem.DriveInfo.dll' + 'System.IO.FileSystem.AccessControl.dll' 'System.Memory.dll' - 'System.Net.Http.dll' - 'System.Net.Mail.dll' - 'System.Net.NetworkInformation.dll' - 'System.Net.Primitives.dll' - 'System.ObjectModel.dll' - 'System.Private.CoreLib.dll' - 'System.Private.Uri.dll' - 'System.Private.Xml.dll' - 'System.Private.Xml.Linq.dll' - 'System.Reflection.dll' - 'System.Reflection.Emit.dll' - 'System.Reflection.Emit.ILGeneration.dll' + 'System.Diagnostics.TraceSource.dll' 'System.Reflection.Emit.Lightweight.dll' - 'System.Reflection.Extensions.dll' - 'System.Reflection.Metadata.dll' 'System.Reflection.Primitives.dll' - 'System.Resources.ResourceManager.dll' - 'System.Runtime.dll' - 'System.Runtime.Extensions.dll' - 'System.Runtime.InteropServices.dll' - 'System.Runtime.InteropServices.RuntimeInformation.dll' - 'System.Runtime.Loader.dll' - 'System.Runtime.Numerics.dll' - 'System.Runtime.Serialization.Formatters.dll' - 'System.Runtime.Serialization.Primitives.dll' - 'System.Security.AccessControl.dll' - 'System.Security.Claims.dll' - 'System.Security.Cryptography.Algorithms.dll' - 'System.Security.Cryptography.Encoding.dll' - 'System.Security.Cryptography.Primitives.dll' - 'System.Security.Cryptography.X509Certificates.dll' - 'System.Security.Principal.dll' - 'System.Security.Principal.Windows.dll' - 'System.Text.Encoding.CodePages.dll' - 'System.Text.Encoding.Extensions.dll' - 'System.Text.RegularExpressions.dll' - 'System.Threading.dll' - 'System.Threading.Tasks.dll' - 'System.Threading.Tasks.Parallel.dll' - 'System.Threading.Thread.dll' - 'System.Threading.ThreadPool.dll' - 'System.Threading.Timer.dll' - 'System.Xml.ReaderWriter.dll' - 'System.Xml.XDocument.dll' + 'System.Reflection.Emit.ILGeneration.dll' ) if ($IsWindows) { $allowedAssemblies += @( - 'Microsoft.Management.Infrastructure.CimCmdlets.dll' 'Microsoft.PowerShell.CoreCLR.Eventing.dll' - 'System.DirectoryServices.dll' 'System.Management.dll' - 'System.Security.Permissions.dll' + 'System.DirectoryServices.dll' + 'System.Security.Claims.dll' 'System.Threading.Overlapped.dll' ) } else { $allowedAssemblies += @( + 'System.Reflection.Metadata.dll' + 'System.Collections.Immutable.dll' 'System.IO.MemoryMappedFiles.dll' 'System.Net.Sockets.dll' ) } + if ($IsWindows) { + $profileDataFile = Join-Path $env:LOCALAPPDATA "Microsoft\PowerShell\StartupProfileData-NonInteractive" + } else { + $profileDataFile = Join-Path ([System.Management.Automation.Platform]::SelectProductNameForDirectory("CACHE")) "StartupProfileData-NonInteractive" + } + + if (Test-Path $profileDataFile) { + Remove-Item $profileDataFile -Force + } + $loadedAssemblies = pwsh -noprofile -command '([System.AppDomain]::CurrentDomain.GetAssemblies()).manifestmodule | Where-Object { $_.Name -notlike ""<*>"" } | ForEach-Object { $_.Name }' } It "No new assemblies are loaded" { - foreach ($assembly in $loadedAssemblies) { - $allowedAssemblies | Should -Contain $assembly + $diffs = Compare-Object -ReferenceObject $allowedAssemblies -DifferenceObject $loadedAssemblies + + if ($null -ne $diffs) { + $assembliesAllowedButNotLoaded = $diffs | Where-Object SideIndicator -eq "<=" | ForEach-Object InputObject + $assembliesLoadedButNotAllowed = $diffs | Where-Object SideIndicator -eq "=>" | ForEach-Object InputObject + + if ($assembliesAllowedButNotLoaded) { + Write-Host ("Assemblies that are expected but not loaded: {0}" -f ($assembliesAllowedButNotLoaded -join ", ")) + } + if ($assembliesLoadedButNotAllowed) { + Write-Host ("Assemblies that are loaded but not expected: {0}" -f ($assembliesLoadedButNotAllowed -join ", ")) + } } + + $diffs | Should -BeExactly $null } } From 67e9813f64e2bd31562a93fcb05507797b8545a2 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 5 Dec 2018 18:40:42 -0800 Subject: [PATCH 7/7] Sort the assembly list --- test/powershell/Host/Startup.Tests.ps1 | 118 ++++++++++++------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/test/powershell/Host/Startup.Tests.ps1 b/test/powershell/Host/Startup.Tests.ps1 index 954d21ba916..8570d6c8a67 100644 --- a/test/powershell/Host/Startup.Tests.ps1 +++ b/test/powershell/Host/Startup.Tests.ps1 @@ -4,94 +4,94 @@ Describe "Validate start of console host" -Tag CI { BeforeAll { $allowedAssemblies = @( - 'System.Private.CoreLib.dll' - 'pwsh.dll' - 'System.Runtime.dll' + 'Microsoft.ApplicationInsights.dll' + 'Microsoft.Management.Infrastructure.dll' 'Microsoft.PowerShell.ConsoleHost.dll' + 'Microsoft.PowerShell.Security.dll' 'Microsoft.Win32.Primitives.dll' - 'System.Management.Automation.dll' - 'System.Resources.ResourceManager.dll' - 'System.Collections.dll' - 'System.Threading.dll' - 'System.Threading.Thread.dll' - 'System.Runtime.Extensions.dll' - 'System.Security.Cryptography.X509Certificates.dll' - 'System.Security.Cryptography.Encoding.dll' - 'System.Net.Primitives.dll' - 'System.Net.Mail.dll' - 'System.Linq.Expressions.dll' - 'System.Runtime.InteropServices.RuntimeInformation.dll' - 'Microsoft.Management.Infrastructure.dll' - 'System.Runtime.InteropServices.dll' - 'System.Runtime.Serialization.Formatters.dll' - 'System.Runtime.Serialization.Primitives.dll' - 'System.Text.RegularExpressions.dll' - 'System.Collections.Concurrent.dll' - 'System.Private.Uri.dll' - 'System.Diagnostics.FileVersionInfo.dll' - 'System.IO.FileSystem.dll' - 'System.Xml.ReaderWriter.dll' - 'System.Text.Encoding.Extensions.dll' - 'System.Private.Xml.dll' - 'System.Runtime.Numerics.dll' - 'System.Security.AccessControl.dll' - 'System.Net.NetworkInformation.dll' - 'System.Security.Cryptography.Primitives.dll' + 'Microsoft.Win32.Registry.dll' + 'netstandard.dll' + 'Newtonsoft.Json.dll' + 'pwsh.dll' 'System.Buffers.dll' + 'System.Collections.Concurrent.dll' + 'System.Collections.dll' + 'System.Collections.NonGeneric.dll' 'System.Collections.Specialized.dll' - 'System.Linq.dll' - 'System.Data.Common.dll' - 'System.ComponentModel.TypeConverter.dll' 'System.ComponentModel.dll' - 'System.ObjectModel.dll' - 'Newtonsoft.Json.dll' - 'netstandard.dll' - 'System.Runtime.Loader.dll' + 'System.ComponentModel.Primitives.dll' + 'System.ComponentModel.TypeConverter.dll' 'System.Console.dll' + 'System.Data.Common.dll' 'System.Diagnostics.Debug.dll' - 'Microsoft.ApplicationInsights.dll' + 'System.Diagnostics.FileVersionInfo.dll' 'System.Diagnostics.Process.dll' - 'System.Threading.Tasks.dll' - 'System.ComponentModel.Primitives.dll' - 'System.Reflection.dll' - 'System.Diagnostics.Tracing.dll' 'System.Diagnostics.Tools.dll' - 'System.Reflection.Extensions.dll' - 'System.Xml.XDocument.dll' - 'System.Private.Xml.Linq.dll' - 'System.Security.Principal.dll' + 'System.Diagnostics.TraceSource.dll' + 'System.Diagnostics.Tracing.dll' 'System.Globalization.dll' - 'System.Threading.Timer.dll' - 'System.Collections.NonGeneric.dll' - 'System.IO.Pipes.dll' - 'System.Security.Principal.Windows.dll' - 'Microsoft.PowerShell.Security.dll' - 'Microsoft.Win32.Registry.dll' - 'System.Threading.Tasks.Parallel.dll' - 'System.IO.FileSystem.DriveInfo.dll' 'System.IO.FileSystem.AccessControl.dll' + 'System.IO.FileSystem.dll' + 'System.IO.FileSystem.DriveInfo.dll' + 'System.IO.Pipes.dll' + 'System.Linq.dll' + 'System.Linq.Expressions.dll' + 'System.Management.Automation.dll' 'System.Memory.dll' - 'System.Diagnostics.TraceSource.dll' + 'System.Net.Mail.dll' + 'System.Net.NetworkInformation.dll' + 'System.Net.Primitives.dll' + 'System.ObjectModel.dll' + 'System.Private.CoreLib.dll' + 'System.Private.Uri.dll' + 'System.Private.Xml.dll' + 'System.Private.Xml.Linq.dll' + 'System.Reflection.dll' + 'System.Reflection.Emit.ILGeneration.dll' 'System.Reflection.Emit.Lightweight.dll' + 'System.Reflection.Extensions.dll' 'System.Reflection.Primitives.dll' - 'System.Reflection.Emit.ILGeneration.dll' + 'System.Resources.ResourceManager.dll' + 'System.Runtime.dll' + 'System.Runtime.Extensions.dll' + 'System.Runtime.InteropServices.dll' + 'System.Runtime.InteropServices.RuntimeInformation.dll' + 'System.Runtime.Loader.dll' + 'System.Runtime.Numerics.dll' + 'System.Runtime.Serialization.Formatters.dll' + 'System.Runtime.Serialization.Primitives.dll' + 'System.Security.AccessControl.dll' + 'System.Security.Cryptography.Encoding.dll' + 'System.Security.Cryptography.Primitives.dll' + 'System.Security.Cryptography.X509Certificates.dll' + 'System.Security.Principal.dll' + 'System.Security.Principal.Windows.dll' + 'System.Text.Encoding.Extensions.dll' + 'System.Text.RegularExpressions.dll' + 'System.Threading.dll' + 'System.Threading.Tasks.dll' + 'System.Threading.Tasks.Parallel.dll' + 'System.Threading.Thread.dll' + 'System.Threading.Timer.dll' + 'System.Xml.ReaderWriter.dll' + 'System.Xml.XDocument.dll' ) if ($IsWindows) { $allowedAssemblies += @( 'Microsoft.PowerShell.CoreCLR.Eventing.dll' - 'System.Management.dll' 'System.DirectoryServices.dll' + 'System.Management.dll' 'System.Security.Claims.dll' 'System.Threading.Overlapped.dll' ) } else { $allowedAssemblies += @( - 'System.Reflection.Metadata.dll' 'System.Collections.Immutable.dll' 'System.IO.MemoryMappedFiles.dll' 'System.Net.Sockets.dll' + 'System.Reflection.Metadata.dll' ) }