runtime: XmlDsigC14NTransformTest failure due to concurrent file access
@krwq @tintoy @anthonylangsworth there are several tests potentially creating a file named doc.dtd in the same folder concurrently.
They should use a pattern like
using (var directory = new TempDirectory())
using (var file = new TempFile(Path.Combine(directory.Path, "doc.dtd")))
{.. }
MESSAGE:
System.IO.IOException : The process cannot access the file 'D:\\j\\workspace\\outerloop_win---bf7c4efa\\bin\\AnyOS.AnyCPU.Debug\\System.Security.Cryptography.Xml.Tests\\netcoreapp\\doc.dtd' because it is being used by another process.
+++++++++++++++++++
STACK TRACE:
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStreamHelpers.CreateFileStream(String path, Boolean write, Boolean append) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Runtime.Extensions\src\System\IO\FileStreamHelpers.CoreClr.cs:line 10 at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Runtime.Extensions\src\System\IO\StreamWriter.cs:line 140 at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Runtime.Extensions\src\System\IO\StreamWriter.cs:line 125 at System.Security.Cryptography.Xml.Tests.XmlDsigC14NTransformTest.C14NSpecExample1() in D:\j\workspace\outerloop_win---bf7c4efa\src\System.Security.Cryptography.Xml\tests\XmlDsigC14NTransformTest.cs:line 217
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 38 (37 by maintainers)
Commits related to this issue
- Unique names for .dtd and .txt files used in tests (dotnet/corefx#16654). — committed to tintoy/corefx by tintoy 7 years ago
- Merge pull request #16657 from tintoy/issue/16654 Temporary fix for dotnet/corefx#16654 — committed to dotnet/corefx by krwq 7 years ago
- Mark MemoryMarshal.Cast methods for aggressive inlining (#16654) Inlining doesn't streamline the cast logic any, but it facilitates caller struct promotion which can substantially boost perf. See di... — committed to dotnet/corefx by AndyAyersMS 6 years ago
- Mark MemoryMarshal.Cast methods for aggressive inlining (#16654) Inlining doesn't streamline the cast logic any, but it facilitates caller struct promotion which can substantially boost perf. See di... — committed to dotnet/corefx by AndyAyersMS 6 years ago
I’ll let @krwq sign off… thanks for fixing so promptly
@krwq @tintoy I have (hopefully) resolved the concurrency issues with krwq#1. This appears to be causing some consternation, anyway.
… and welcome to my world trying to get these tests working in the first place. People wonder why I want to clean them up. 😃