Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis "D.C." Dietrich <dennisdietrich@users.noreply.github.com>2017-02-08 00:53:42 +0300
committerDennis "D.C." Dietrich <dennisdietrich@users.noreply.github.com>2017-02-08 00:53:42 +0300
commit614b3bd9559a6ca1cea4dea0d345fe4c181f731a (patch)
tree87efbe6ec2916914782b54be565ce06262109921
parenta46b7ab5a1c3f47705e3d267c8b4402cfaef452e (diff)
Fixed cross-process tests
Several tests that use a secondary process fail when the path contains spaces. Fix #15891
-rw-r--r--src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs2
-rw-r--r--src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs2
-rw-r--r--src/System.Runtime.Extensions/tests/System/UnloadingAndProcessExitTests.netcoreapp.cs2
-rw-r--r--src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs2
-rw-r--r--src/System.Threading/tests/MutexTests.cs2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs
index ba8194cd7e..4866cfaa88 100644
--- a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs
+++ b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs
@@ -268,7 +268,7 @@ namespace System.IO.Tests
Assert.NotEmpty(Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*", SearchOption.TopDirectoryOnly));
return SuccessExitCode;
- }, testDir).Dispose();
+ }, $"\"{testDir}\"").Dispose();
}
}
}
diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs
index db8e827b2d..887b072aff 100644
--- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs
+++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CrossProcess.cs
@@ -27,7 +27,7 @@ namespace System.IO.MemoryMappedFiles.Tests
acc.Flush();
// Spawn and then wait for the other process, which will verify the data and write its own known pattern
- RemoteInvoke(DataShared_OtherProcess, file.Path).Dispose();
+ RemoteInvoke(DataShared_OtherProcess, $"\"{file.Path}\"").Dispose();
// Now verify we're seeing the data from the other process
for (int i = 0; i < capacity; i++)
diff --git a/src/System.Runtime.Extensions/tests/System/UnloadingAndProcessExitTests.netcoreapp.cs b/src/System.Runtime.Extensions/tests/System/UnloadingAndProcessExitTests.netcoreapp.cs
index 49b10b0fe3..86e9a59ceb 100644
--- a/src/System.Runtime.Extensions/tests/System/UnloadingAndProcessExitTests.netcoreapp.cs
+++ b/src/System.Runtime.Extensions/tests/System/UnloadingAndProcessExitTests.netcoreapp.cs
@@ -27,7 +27,7 @@ namespace System.Tests
return SuccessExitCode;
};
- using (var remote = RemoteInvoke(otherProcess, fileName))
+ using (var remote = RemoteInvoke(otherProcess, $"\"{fileName}\""))
{
}
diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs
index 9ca918c139..e2316b36cc 100644
--- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs
+++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs
@@ -737,7 +737,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
b.Serialize(output, b.Deserialize(input));
return SuccessExitCode;
}
- }, outputPath, inputPath).Dispose();
+ }, $"\"{outputPath}\"", $"\"{inputPath}\"").Dispose();
// Deserialize what the other process serialized and compare it to the original
using (FileStream fs = File.OpenRead(inputPath))
diff --git a/src/System.Threading/tests/MutexTests.cs b/src/System.Threading/tests/MutexTests.cs
index 77cdc42c50..cbd4a5c7dd 100644
--- a/src/System.Threading/tests/MutexTests.cs
+++ b/src/System.Threading/tests/MutexTests.cs
@@ -190,7 +190,7 @@ namespace System.Threading.Tests
};
using (var mutex = new Mutex(false, mutexName))
- using (var remote = RemoteInvoke(otherProcess, mutexName, fileName))
+ using (var remote = RemoteInvoke(otherProcess, mutexName, $"\"{fileName}\""))
{
SpinWait.SpinUntil(() => File.Exists(fileName));