Includes the following from System.IO:
* FileSystemInfo
* FileInfo
* DirectoryInfo
* Directory
* FileSystem
* Path `Join()` Span API
and all of System.IO.Enumeration namespace.
Adds about 1600 System.IO tests
Behavior changes:
* `File.Replace` now replaces files even if they are read-only (using the `rename` syscall on Unix)
* Directory enumeration is no longer stable in the way that many Mono tests expect
* Some changes in when/whether some representations of directories contain a trailing separator character
* Changes in which exceptions are thrown (sometimes these are platform-dependent on CoreFX)
Issues:
* https://github.com/dotnet/corefx/issues/33486
* https://github.com/dotnet/corefx/issues/33490
Part of #7246
* [bcl] Remove AssertExtensions helper classes
Since we're on nunitlite now we can use the proper `Assert.Throws<>()`
instead and remove the helper class (which we actually duplicated!)
It failed twice on Jenkins over the weekend:
```
Test Case Failures:
1) MonoTests.System.Runtime.Caching.MemoryCacheTest.TestExpiredGetValues : #EGV4
Expected: 0
But was: 9
at MonoTests.System.Runtime.Caching.MemoryCacheTest.TestExpiredGetValues () [0x0012b] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs:1304
```
We're sleeping just as long as the expiry time of the cache items (1s) which might not be enough.
Bumping the sleep time should fix this.
Failed on Jenkins on ARM today:
```
Tests run: 38, Failures: 1, Not run: 0, Time: 32.132 seconds
Test Case Failures:
1) MonoTests.System.Runtime.Caching.MemoryCacheTest.TimedExpiration : #A4-4
Expected: not null
But was: null
at MonoTests.System.Runtime.Caching.MemoryCacheTest.TimedExpiration () [0x002b6] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs:902
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
```
100ms could be too short, bumping the timeout should make it more reliable on the slower ARM machines.
After MemoryCache was imported from referencesources, some tests started
failing occasionally. Cross-testing on MS.NET showed that you need to
access the cached item to make MemoryCache.GetCount() reliably return the
correct number after an item was expired from the cache.
Also removed __MonoTimerPeriod and __MonoEmulateOneCPU configuration variables,
they were used in Mono code before and don't make sense with the new code.
When config PhysicalMemoryLimitPercentage is not set or set to zero MemoryCache.PhysicalMemoryLimit value will depend on the total physical memory available.
Apparently on slow systems the items with 1sec expiration time are already removed from the cache by the time the #CS3 Assert() is hit, which caused the test to fail.
Increasing the expiration time by +2sec should hopefully fix this.
Commit licensed under MIT/X11.
- when MemoryCacheEntryPriorityQueue grows the timed items after a shrink
the value of the member variable heapSize is wrong allowing an out-of-
bounds exception which would normally be prevented by bounds tests
- A test case was added for the out-of-bounds exception
* MemoryCacheTest.cs, ObjectCacheTest.cs: added
* HostFileChangeMonitorTest.cs: added more tests.
2010-04-24 Marek Habersack <[email protected]>
* AppDomainTools.cs, AssertExtensions.cs, PokerChangeMonitor.cs,
PokerMemoryCache.cs, PokerObjectCache.cs,
TestNotificationSystem.cs: added
2010-04-24 Marek Habersack <[email protected]>
* ObjectCache.cs: implemented all the non-abstract methods.
* MemoryCacheContainer.cs, MemoryCacheEntry.cs,
MemoryCacheEntryChangeMonitor.cs,
MemoryCacheEntryPriorityQueue.cs,
MemoryCachePerformanceCounters.cs: added
* MemoryCache.cs: implemented physical memory size detection, item
expiration timer, indexer, reading of configuration values from
config files, cache memory limit calculation, the
AddOrGetExisting, Set, Get, Contains,
CreateCacheEntryChangeMonitor, Dispose, GetCacheItem, GetCount,
GetEnumerator, GetValues, Remove and Trim methods.
Implemented support for per-cpu item containers.
Modified parameters of several methods to match .NET 4.0 release.
* HostFileChangeMonitor.cs: implemented according to tests.
* Helpers.cs: added new properties, StringComparer and Is64bit
* FileChangeNotificationSystemEntry.cs: added
* FileChangeNotificationSystem.cs: implemented
* ChangeMonitor.cs: NotifyOnChanged now properly throws an
exception if it was called more than once.
* CacheEntryRemovedReason.cs: renamed from
CacheEntryRemoveReason.cs
* CacheEntryChangeMonitor.cs: renamed from CacheEntryMonitor.cs
2010-04-24 Marek Habersack <[email protected]>
* MemoryCacheSettingsCollection.cs: added and implemented methods
which appeared in .NET 4.0 final.
svn path=/trunk/mcs/; revision=156032