A change was made to DNX to no longer restore project.jsons
that are in nested folders. This caused my batch update to miss
a number of tests and reference assembly projects.
This fixes the stale lock files, but restore is still broken.
[tfs-changeset: 1540448]
Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
We need a new DNX to understand the latest packages.
We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.
The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.
[tfs-changeset: 1540388]
Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
- Made the existing perf tests for Linq follow the new syntax and use the new runner
- Removed all references to v5.0 libraries being required as they no longer are
- Added new tests using usage data from aspnet/benchmarks
- Modified some existing tests to be more easily comparable using analysis tools that look at inlinedata/memberdata (e.g. System.IO.Compression)
- Updated the lock files to use the latest xunit-performance package
- Modified test structure and innerIteration loops to produce more consistently repeatable results
- Updated docs with change to csproj requirements
Commit migrated from https://github.com/dotnet/corefx/commit/2ad9a6ffa7f6bcd31382372609849af5caa6a1bd
Fixesdotnet/corefx#3780.
FindFirstFile with a normal path will happily collapse multiple
backslashes into a single logical path separator, but when presented
with a `\\?\` path, that doesn't happen. As a result, unconditionally
concatenating a path-separator was fine until RemoveDirectoryHelper was
always called with EnsureExtendedPrefix (which is needed for extended
path support, introduced in 0721434). With that, Win32 FindFirstFile
returns an error if there's a double backslash in the path beyond the
prefix.
Commit migrated from https://github.com/dotnet/corefx/commit/cb3724deb88743495f8b73f56509267db9796300
Our common tests folder has gotten a bit unwieldy in its organization. This change simply moves files around to better map to how src\Common\src is organized. Files are now stored in a path based on functionality/namespace.
I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains. Such cleanup can be done separately on each individual area.
Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.
Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
This change attempts to limit the number of allocations made when evaluating
full paths. This is particularly important when Windows paths can be way over
the historical max of 260 characters. (The new max is over 32K)
We no longer kick paths in Windows that are valid, outside of paths with colons
that are not directory separators. (This has the effect of blocking alternate
data stream access- which is a legacy behavior.)
When creating directories, we still drop the trailing separator, which causes
trailing whitespace to be trimmed. This makes it particularly difficult to create
paths with trailing spaces in .NET, which is still desirable as most code has
a tough time dealing with this scenario. We'll open them fine now, which hits
the above point of not kicking valid legacy paths (paths that don't require
extended syntax).
Several simplifications to the logic were made, including moving relative segment
evaluation to shared code and calling it directly when getting directory names
rather than relying on the not-so-obvious prior behavior of GetFullPath without
"full checks".
Commit migrated from https://github.com/dotnet/corefx/commit/11b457d1186c364bdf3e7d978006eb2417e8d060
- Updated getting started perf docs
- Removed caching of collections for tests; my results found the caching of negligible benefit
- Changed from MemberData to InlineData where possible to simplify matching method signatures for the perf analysis tools.
- Fixed the namespace for FileSystem tests to be the same as the other FS tests
Commit migrated from https://github.com/dotnet/corefx/commit/f551cdfe7bd815b8d99ac5577fbbc7d88b5ae472
- PerfUtils is no longer static and is instantiated on a test-by-test basis
- Greatly increased the size of the testable area for a number of the tests
- Tweaked the collection and innerIteration sizes for a number of tests
- Fixed some namespace bugs
Commit migrated from https://github.com/dotnet/corefx/commit/82a82c16418f094e82117825940368c8c5da2ef4
`build.cmd /p:LockDependencies=true` was the start of this change, but some errors with xunit build numbers led to all xunit upgrades being reset back to what they had in master.
project.json changes:
* System.Net.Security\src Switch off of explicit beta versioning, use the same baseline as everyone else. The S.S.C.Algorithms explicit upgrade is no longer required.
* System.Net.Requests\tests didn't build. Looking at the project.lock.json change, it appeared that a System.Net.Http reference was lost, restored it.
* System.Net.Http\tests didn't build. Looking at the project.lock.json change, it appeared that a System.IO.FileSystem reference was lost, restored it.
* System.Net.WebSockets.Client\src didn't build. Looking at the project.lock.json change, it appeared that a System.Collections (4.0.10) reference was lost, restored it.
* System.Diagnostics.TextWriterTraceListener\tests needed the runtime reference to load the correct System.Diagnostics.TraceSource binary.
Commit migrated from https://github.com/dotnet/corefx/commit/cec3a0f2db542bfa9d9c56bf988d966eacc35ad9
- Added "Performance" folders containing perf xunit tests to a number of highly-used libraries (determined by Usage data)
- Two sets of usage data from store apps; I added a test for every function used in more than 5% of the covered assemblies in both data sets.
- This is a first-round pass of the most highly used libraries and does not include: abstract classes, interfaces, or Attributes
- Created a static utility class for commonly used functions across perf tests, stored in src\Common\tests\Performance.
- These tests will run using ```msbuild /t:BuildAndTest /p:performance=true``` from the projects test directory
- Added conditional properties that check if v5.0 is installed on the user's computer when running perf tests. If it isn't, a detailed error is thrown with a link to a performance-test github page that I've also added.
Commit migrated from https://github.com/dotnet/corefx/commit/11ea534258ced35948e53a4ece8fb1284698bf8a
Patterns mostly were of the form:
```
if (someBooleanCondition)
{
Assert.True(false, ....);
// Or sometimes Assert.False(true, ....);
}
```
or
```
try
{
SomeErrorThrowingOperation
Assert.True(false, ....);
// Or sometimes Assert.False(true, ....);
}
catch (ExpectedExceptionType e)
{
}
```
This replaces most instances with calls to the proper Xunit.Assert#### .
Some additional minor work was performed as noted with the affected package.
Add common ShouldNotBeInvokedException
System.Collections
- Partially unwind edges of internal test framework.
System.Collections.Concurrent
- Switch some tests to use InlineData instead of delegated method calls.
System.Collections.Immutable
- Use ShouldNotBeInvokedException to state some lambdas should not be called.
System.Collections.NonGeneric
System.Composition
- Partially unwind internal test famework.
- Switch to using xunit asserts where possible.
System.Diagnostics.Contracts
- Use ShouldNotBeInvokedException to state some lambdas should not be called.
- Update project file to use upper case letter in hash.
System.Diagnostics.FileVersionInfo
- Switch to direct equals comparison.
System.Diagnostics.Process
- Use ShouldNotBeInvokedException to state a task should exit.
System.Diagnostics.Tracing.Telemetry
- Use ShouldNotBeInvokedException to state an overridden method should not be called.
System.Globalization
- Switch to direct equals comparisons in some cases.
System.Globalization.Extensions
- Switch to direct equals comparison in some cases.
System.IO.Compression.ZipFile
System.IO.FileSystem
- Partially unwind internal test framework.
System.IO.Packaging
- Correct test T006 to check that adding absolute Uri part in internal mode is invalid.
System.ObjectModel
- Use ShouldNotBeInvokedException to state some observables should execute.
System.Reflection
- Update readonly-set test to verify that the field is set (previous test implied it was not).
System.Reflection.Extensions
System.Reflection.Metadata
- Partially remove internal test framework.
- Switch to xunit asserts where possible.
System.Reflection.TypeExtensions
System.Runtime
System.Runtime.Extensions
- Switch to xunit bounded equals for doubles.
- Switch to verifying non-varags Path.Combine override.
System.Runtime.Numerics
- Switch to xunit Assert.Throws from internal version.
System.ServiceProcess.ServiceController
System.Text.Encoding
System.Text.Encodings.Web
System.Threading
System.Threading.Tasks.Dataflow
System.Threading.Tasks.Parallel
System.Xml.ReaderWriter
- Switch to form verifying exception is thrown.
System.Xml.XmlDocument
- Use ShouldNotBeInvokedException to state some handlers should not be called.
Commit migrated from https://github.com/dotnet/corefx/commit/ab1743b45213e88295a38e2bf9d80ded09058b18
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.
After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.
Fixesdotnet/corefx#3173
Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
Three tests were consuming the vast majority of the time:
- DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsPathTooLongException. It was taking 70 seconds on my machine. I moved it to outer loop.
- ManyConcurrentWriteAsyncs. It uses a MemberData that results in it executing ~40 times, for a combined time of around 7 seconds on my machine. I made one combination run in inner loop and moved the rest to outer.
- CopyToAsyncBetweenFileStreams. Same MemberData, same solution.
Commit migrated from https://github.com/dotnet/corefx/commit/03205295cc6834b1fdcd8b7ba364515f4ec7164a
- Mainly, I added several tests (with lots of theory-based parameterized inputs) to stress WriteAsync: many concurrent writes, long chains of writes, etc., for various size inputs and buffers, async vs not, etc.
- There were multiple variations on Flush tests based on whether to use Flush(), Flush(false), or False(true). I combined these all into single theories.
- I then added some more Flush tests for some missing cases highlighted by code coverage, e.g. flushing reads.
- I then duplicated these tests for FlushAsync, and added some additional tests specific to FlushAsync, e.g. cancellation.
- I added a few tests for pipes.
Commit migrated from https://github.com/dotnet/corefx/commit/bb34d5a458613faa39d3808a8a352e62e3bcf52f
1) Internal buffer overflows, but write can fit in next buffer - Fill the existing buffer, copy the remaining data into a new buffer, and flush the original to disk
2) Internal buffer is non-empty, overflows, and the remaining data won't fit in a second buffer - Chain the flush operation to a second write operation which writes the entire incoming block directly to disk.
Additionally, adds a new unit test to ensure the different buffering cases are being covered.
Commit migrated from https://github.com/dotnet/corefx/commit/b69caa929d3cb3b87574ee31a651d799f61e3a75
One of the Extended Path FileSystem tests was leaving temporary test directories in the root folder of the running directory. This small change modified the tests to instead treat the user's temp directory as the root.
Commit migrated from https://github.com/dotnet/corefx/commit/bd2d87d7abcf092840e0929c6df1116665f90460
When I rewrote the MemoryMappedFiles tests, I cribbed from the
System.IO.FileSystem test's base class and created a Common base class
that could be used by test projects that had temporary files to be cleaned up.
At the time, however, FileSystem's tests were undergoing heavy changes and
so I didn't update FileSystem's tests to use the common base. Now that
things have quieted down, I've made that change.
In doing so, I made a few tweaks to the FileSystem tests, where tests were
assuming that the test directory was always in the current directory, and
the consolidated base class puts temporary files in the user's temporary
directory instead.
Commit migrated from https://github.com/dotnet/corefx/commit/d7a19e92824e8a038553de20abf2497db0424ddb
UnixFileSystem's override of MaxDirectoryName was assuming the property meant the maximum size of the file name of a directory, i.e. the component length, not the full path length of everything from the beginning of the root. As a result, checks against MaxDirectoryName, such as in CreateDirectory, were failing incorrectly with longer path lengths.
The fix is just to return MaxPath from MaxDirectoryName; there's no difference on Unix. I also added a test to cover this case, included a previously excluded test, and deleted a faulty test.
Commit migrated from https://github.com/dotnet/corefx/commit/5de40bfa898dc2a03fd5efb3f21ea2f69d16a94a
This change modifies the build to consume the stable version where available.
This disables building the dowlevel packages since we shipped them once as stable and we're done.
From here on out, we'll only build the latest version (except for a servicing event, which would
be handled by syncing to a hash).
I can't rev the package versions in the normal way yet (by modifying the assembly version of the contents)
because that turned out to be too big of a problem to tackle in this change. Instead I added a
parameter to the task that calculates package versions to do the rev for anything that was
stable, but only when building the package itself, not when calculating the dependencies.
This has the downside of not permitting a dependency on a incremented pre-release version if we've
shipped a stable version, but that is a small point in time problem until I can rev the assembly
versions.
[tfs-changeset: 1508664]
Commit migrated from https://github.com/dotnet/corefx/commit/ee1ec2891c7c65b46fa9dfb078636be503bb2a60
- References dotnet/corefx#2460. File.Move and FileInfo.MoveTo no longer always overwrite the destination file; added a non-concurrent validity check to MoveFile in the Unix implementation to serve as a temporary solution.
- Resolvesdotnet/corefx#2459. Reenabled Directory_CreateDirectory.DriveLetter_Unix as it's previous failures were not the fault of the method but of the system.
- Added test checks to work around the issue in dotnet/corefx#2537 until a final decision is reached for the desktop.
- Added Interop.Link to the Interop files for the (possible) implementation of File.Move
- Consolidated all of the related files that did nothing but inherit from other classes (e.g. File_GetFiles_str and File_GetFiles_str_str were consolidated into File_GetFiles)
- Removed the "partial" keyword from some test classes
- Finished overhauling all test cases that don't directly require solutions to Build System issues before being re-added (e.g. those that require networked drives or altering the current directory)
- Added some tests to increase code coverage slightly in some cases.
- All classes and files have been renamed to match the standard set by FileStream: only include parameters in the test/class name if there are overloads
- Modified the Unix behavior for distinguishing between a FileNotFoundException and a DirectoryNotFoundException to match that of Windows.
- Removed some redundant error checks that never catch
- DirectoryInfo.MoveTo(destPath) did not have checks for destinations with paths that are over MAXPATH. I added them to better match the behavior and error timing of Directory.Move(source, dest).
Commit migrated from https://github.com/dotnet/corefx/commit/481d5c645763da79145af50d123db3f4041aa05e