Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 69 additions & 1 deletion src/libraries/System.Threading/tests/MutexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@
public void Ctor_InvalidNames_Unix()
{
AssertExtensions.Throws<ArgumentException>("name", null, () => new Mutex(new string('a', 1000), options: default));
AssertExtensions.Throws<IOException>("name", null, () => new Mutex("Foo/Bar", options: default));

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 253 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime

src/libraries/System.Threading/tests/MutexTests.cs#L253

src/libraries/System.Threading/tests/MutexTests.cs(253,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.
AssertExtensions.Throws<IOException>("name", null, () => new Mutex("Foo\\Bar", options: default));

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 254 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime

src/libraries/System.Threading/tests/MutexTests.cs#L254

src/libraries/System.Threading/tests/MutexTests.cs(254,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.
AssertExtensions.Throws<IOException>("name", null, () => new Mutex("Global\\Foo/Bar", options: default));

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 255 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime

src/libraries/System.Threading/tests/MutexTests.cs#L255

src/libraries/System.Threading/tests/MutexTests.cs(255,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.
AssertExtensions.Throws<IOException>("name", null, () => new Mutex("Global\\Foo\\Bar", options: default));

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.

Check failure on line 256 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime

src/libraries/System.Threading/tests/MutexTests.cs#L256

src/libraries/System.Threading/tests/MutexTests.cs(256,30): error CS0311: (NETCORE_ENGINEERING_TELEMETRY=Build) The type 'System.IO.IOException' cannot be used as type parameter 'T' in the generic type or method 'AssertExtensions.Throws<T>(string, string, Action)'. There is no implicit reference conversion from 'System.IO.IOException' to 'System.ArgumentException'.
}

[Theory]
Expand Down Expand Up @@ -971,9 +975,73 @@
}
}

[ConditionalFact(nameof(IsCrossProcessNamedMutexSupported))]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void NamedMutex_OtherEvent_NotCompatible()
{
using Mutex m = new Mutex(Guid.NewGuid().ToString("N"), options: default);
using ManualResetEvent mre = new(false);

Assert.Throws<PlatformNotSupportedException>(() => WaitHandle.WaitAny(new WaitHandle[] { m, mre }, 0));
}

[ConditionalFact(nameof(IsCrossProcessNamedMutexSupported))]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void NamedMutex_InvalidSharedMemoryHeaderVersion()
{
string name = Guid.NewGuid().ToString("N");
string path = $"/tmp/.dotnet/shm/global/{name}";
using (FileStream fs = File.Create(path))
using (BinaryWriter bw = new(fs))
{
bw.Write((byte)1); // Write the shared memory type (mutex)
bw.Write((byte)2); // Write an invalid version number
// Make the file large enough for a valid named mutex file and divisible by page size (it should always be under one page).
fs.SetLength(Environment.SystemPageSize);
}

Assert.Throws<WaitHandleCannotBeOpenedException>(() => new Mutex($"Global\\{name}"));

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_Interpreter_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Mono_MiniJIT_LibrariesTests)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Release NativeAOT_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build browser-wasm linux Release LibraryTests_EAT)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'

Check failure on line 1003 in src/libraries/System.Threading/tests/MutexTests.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/libraries/System.Threading/tests/MutexTests.cs#L1003

src/libraries/System.Threading/tests/MutexTests.cs(1003,78): error CS1503: (NETCORE_ENGINEERING_TELEMETRY=Build) Argument 1: cannot convert from 'string' to 'bool'
}

[ConditionalFact(nameof(IsCrossProcessNamedMutexSupported))]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void NamedMutex_InvalidSharedMemoryHeaderKind()
{
string name = Guid.NewGuid().ToString("N");
string path = $"/tmp/.dotnet/shm/global/{name}";
using (FileStream fs = File.Create(path))
using (BinaryWriter bw = new(fs))
{
bw.Write((byte)2); // Write the shared memory type (invalid)
bw.Write((byte)1); // Write a version number
// Make the file large enough for a valid named mutex file and divisible by page size (it should always be under one page).
fs.SetLength(Environment.SystemPageSize);
}

Assert.Throws<WaitHandleCannotBeOpenedException>(() => new Mutex($"Global\\{name}"));
}

[ConditionalFact(nameof(IsCrossProcessNamedMutexSupported))]
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void NamedMutex_TooSmallSharedMemoryFile()
{
string name = Guid.NewGuid().ToString("N");
string path = $"/tmp/.dotnet/shm/global/{name}";
using (FileStream fs = File.Create(path))
using (BinaryWriter bw = new(fs))
{
bw.Write((byte)1); // Write the shared memory type (mutex)
bw.Write((byte)1); // Write a valid version number
// Make the file large enough for a valid named mutex file but not divisible by page size.
fs.SetLength(Environment.SystemPageSize - 1);
}

Assert.Throws<WaitHandleCannotBeOpenedException>(() => new Mutex($"Global\\{name}"));
}

public static TheoryData<string> GetValidNames()
{
var names = new TheoryData<string>() { Guid.NewGuid().ToString("N") };
var names = new TheoryData<string>() { Guid.NewGuid().ToString("N") };

// Windows native named mutexes and in-proc named mutexes support very long (1000+ char) names.
// Non-Windows cross-process named mutexes are emulated using file system. It imposes limit
Expand Down
Loading