Consolidate approach for conditional tests that check for privileged processes (...
authorJeff Handley <jeffhandley@users.noreply.github.com>
Wed, 30 Nov 2022 09:32:35 +0000 (01:32 -0800)
committerGitHub <noreply@github.com>
Wed, 30 Nov 2022 09:32:35 +0000 (01:32 -0800)
commit555369171d198c49d45051e61dee2797ab0561fb
tree6fab1696d3ec9ddce0344224360774554b5d7c62
parentc7460d008c8631e2b7b83cd712d2036250fca5fd
Consolidate approach for conditional tests that check for privileged processes (#78793)

* Consolidate approach for conditional tests that check for privileged processes

* Simpler privileged process helpers

* Revert SLN file changes

* Remove platform-specific helpers for privileged process conditions

* Fix System.IO tests for unix-specific privileged process scenarios

* Browser does not support privileged processes

* Fix System.IO tests for unix-specific privileged process scenarios

* Enable the Environment.IsPrivilegedProcess test for browser

* PR feedback

Omit [PlatformSpecific] in modified tests that are in platform-specific test files.

Remove [Outerloop] attributes from privileged process tests.

Better multithreaded handling in PlatformDetection.IsPrivilegedProcess
47 files changed:
src/libraries/Common/tests/System/IO/ReparsePointUtilities.cs
src/libraries/Common/tests/TestUtilities/System/AdminHelpers.cs
src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs
src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs
src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs
src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs
src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/FuzzyTests.Etw.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.Etw.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestUtilities.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestGeneration.Etw.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEvent.Etw.cs
src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWriteEventToListener.Etw.cs
src/libraries/System.Formats.Tar/tests/TarEntry/TarEntry.ExtractToFile.Tests.Unix.cs
src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectory.File.Tests.Unix.cs
src/libraries/System.Formats.Tar/tests/TarFile/TarFile.ExtractToDirectoryAsync.File.Tests.Unix.cs
src/libraries/System.Formats.Tar/tests/TarReader/TarReader.TarEntry.ExtractToFile.Tests.Unix.cs
src/libraries/System.Formats.Tar/tests/TarReader/TarReader.TarEntry.ExtractToFileAsync.Tests.Unix.cs
src/libraries/System.Formats.Tar/tests/TarTestsBase.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.Unix.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.File.Tests.Unix.cs
src/libraries/System.IO.FileSystem/tests/Directory/Delete.cs
src/libraries/System.IO.FileSystem/tests/File/Delete.cs
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytes.cs
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllBytesAsync.cs
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllLines.cs
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllLinesAsync.cs
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllText.cs
src/libraries/System.IO.FileSystem/tests/File/ReadWriteAllTextAsync.cs
src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs
src/libraries/System.IO.FileSystem/tests/RandomAccess/GetLength.cs
src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.Windows.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs
src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.IsPrivilegedProcess.cs
src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs
src/libraries/System.Security.Cryptography.Cng/tests/SymmetricCngTestHelpers.cs
src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs
src/libraries/System.ServiceProcess.ServiceController/tests/ServiceControllerTests.cs
src/libraries/System.ServiceProcess.ServiceController/tests/ServiceControllerTests.netcoreapp.cs