Commit Graph
391 Commits
Author SHA1 Message Date
Hugh Bellamy 7cdcaf5fc5 Convert Assert.Throws<ArgumentException> to AssertExtensions (dotnet/corefx#21491)
Commit migrated from https://github.com/dotnet/corefx/commit/868f123881e520285ab09600380e38abdd457a06
2017-06-27 21:13:26 -07:00
Hugh Bellamy 9058da92aa Correctly handle empty strings in params of RemoteExecutorTestBase (dotnet/corefx#21196)
* Implement argument pasting in RemoteInvoke

* Add tests for RemoteInvoke fixes

* Update RemoteInvoke tests now that quoting is unecessary

* Fix netfx tests

The extra parameter is empty in netfx so was pasted to ""

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/232f48884efed22d228ae4a9450b37fbfa92b861
2017-06-27 19:12:14 -07:00
Viktor Hofer 070a2b2fa3 SQLString adding missing typeforward to correctly serializable blobs between netfx and core (dotnet/corefx#21564)
Commit migrated from https://github.com/dotnet/corefx/commit/a85e94918154e43f3d5747a02db5deb85dae6873
2017-06-26 17:22:00 +02:00
Viktor Hofer da98b64432 [WIP] BinaryFormatter - Reenable sanity check (dotnet/corefx#21507)
* Reenable sanity check

* Avoid different blobs for CookieContainer dependent on machine configuration

* Fixing diffent blobs for CompareInfo as it used machine config depdent values

* Fixing different in DataTable and DataSet

* Fixing CookieCollection missing field in serialization


Commit migrated from https://github.com/dotnet/corefx/commit/3ba241487054331c32ca5c1c13426de37ddd97c3
2017-06-25 09:26:33 +02:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
Dan Moseley 6a6bd7e1cc Fix XmlSchemaSet tests for UAP (dotnet/corefx#21418)
* Fix XmlSchemaSet tests for UAP

* Fix binaryformattertests


Commit migrated from https://github.com/dotnet/corefx/commit/3d933993408db040a8844caf7cdd14582e81af40
2017-06-22 23:54:21 -07:00
Viktor Hofer 83f120531c Fixing SizeF, CookieContainer, CookieCollection serialization between Core <--> Desktop and adding full binary mode tests (dotnet/corefx#21223)
* Adding TypeForward to PathListComparer, CookieCollection member, full-mode tests, SizeF publickeytoken fix

* Making FormatterAssemblyStyle explicit

* Update blobs after CompareInfo culture field added to serialization payload

* Added blob integrity check

* Remove unnecessary operation which has no impact on netfx serialization

* Putting pragma around the unused field...

* Setting m_version value to include it in the serialization payload. Remove static versions for blob comparison

* Update compare logic

* update blobs

* disable checking if blob has changed


Commit migrated from https://github.com/dotnet/corefx/commit/fe3678109c8897854f7c943d2a0e44a127852d54
2017-06-22 17:15:30 -07:00
Dan Moseley dc70f701c4 Disabling binary serialization fuzzying test (dotnet/corefx#21185)
Commit migrated from https://github.com/dotnet/corefx/commit/e6ae9731e6fe6dd2d5242cbbef59494f49dae7b6
2017-06-18 18:47:53 +02:00
Morgan Brown fe8a35f090 Fixes the ifdefs for the mscorlib and System facades to build for aot as well. Also includes a minor rd.xml tweak for BinaryFormatter. Fixes hundreds of BinaryFormatter tests. Progress on dotnet/corefx#19119 (dotnet/corefx#21163)
Commit migrated from https://github.com/dotnet/corefx/commit/c79a3d83c4de6afd96d7ba1b27eb9e2e8c29b558
2017-06-16 21:24:38 -07:00
Krzysztof Wicher c839ffc276 Add more serialization test cases and fix SqlGuid (dotnet/corefx#21137)
* add more test cases for existing types

* fix some test gaps and fix SqlGuid

* comment out UpdateBlobs


Commit migrated from https://github.com/dotnet/corefx/commit/766cc77dd6a468d23974fe3045bec0418c828bfc
2017-06-16 12:37:15 -07:00
Viktor Hofer 7bcc82a237 Enabling CookieContainer serialization by exposing PathList type and adding a type forward (dotnet/corefx#21133)
Commit migrated from https://github.com/dotnet/corefx/commit/621869abb75d3c0d9bf51ff0c2237d697fe144ac
2017-06-16 12:00:00 -07:00
Viktor Hofer da2d9f1298 Reenabling disabled tests (dotnet/corefx#21101)
Commit migrated from https://github.com/dotnet/corefx/commit/cb12db36550bc0a4c1037363bbce887f32ff323c
2017-06-16 02:01:29 +02:00
Viktor Hofer 7d3ba0ab3c Cross Serialization Cleanup (dotnet/corefx#21067)
* Remove serialization from namevalucollection types

* Update blobs


Commit migrated from https://github.com/dotnet/corefx/commit/fdc5256fb8ace294ad7e64b3f8a6d7379df67705
2017-06-14 22:44:45 -04:00
Viktor Hofer f3b55355d6 Cross framework serialization finish up (dotnet/corefx#20870)
* wip: add stubs for custom isEqual

* Updated blobs, small code refactoring, disabled CookieContainer test

* Fixed netfx471 detection

* add custom equals for graph with cycles

* fix few more comparers

* Merge

* fix few more test cases

* fix few more types, fix GetExtensionMethod to work with parameters with same type name but different generic params

* finish tests (2 comparisons are commented out: search for TODO)

* Adding TypeForward for DictionaryNode

* Updating blobs

* Update Cookie hashes, adding TypeForwards, removing unnecessary equality checks for CookieCollection

* Reenabling SortedDictionary test

* Update blobs

* make cookie.Timestamp to roundtrip correctly

* regenerate netfx and corefx blobs to account for Cookie.Timestamp change

* make regex fix the blob for ObjectWithArray

* fix ObjectWithArray netfx test failure

* Replacing Dictionary with Hashtable for desktop serialization support

* Update blobs

* Fixing a lot of TypeForwards, adding another hashtable test, other fixes

* Adding a few more TypeForwardedFrom attributes

* Updating the coreclr version, disabling CookieContainer test

* Update blobs

* Disabling CompareInfo test --> waiting for coreclr

* generate test cases

* update blobs, comment out not working cases

* fix null equality checks for new test cases and reenable them

* PR feedback addressed

* Fixed a typo...

* Updating used coreclr version, enabling compareinfo test again


Commit migrated from https://github.com/dotnet/corefx/commit/cdfb6ecf11cae3f43d35233852ef422cb12ef3d8
2017-06-15 01:18:01 +02:00
Tarek Mahmoud Sayed 8754550d62 Enable UAP Remote Execution for all tests (dotnet/corefx#21014)
This change to enable remote execution of all corefx tests in UAP. Because the remote execution code for UAP is using WinRT APIs and to avoid forcing adding UAP configuration to all test projects, we factor the remote execution code into its own test library (called TestHelper) which is cross compiled.

Commit migrated from https://github.com/dotnet/corefx/commit/eb2f543b189e8f7f9ae4c31e832ac9d3c22bb41a
2017-06-14 13:26:57 -07:00
Viktor Hofer a720c16a52 Using mscorlib shim as default resolving assembly for BinaryFormatter serialization instead of System.Private.Corelib (dotnet/corefx#20879)
* Using mscorlib shim as default resolving assembly instead of System.Private.Corelib

* Increasing serialization perf

* Doing string comparison on both mscorlib and S.P.C


Commit migrated from https://github.com/dotnet/corefx/commit/87f4f3290ec7b2fc9418cf9c8bf9fbfd0cd7c485
2017-06-13 23:15:05 +02:00
Stephen Toub e3d4efc9ef Bring SerializationFieldInfo back to BinaryFormatter in corefx (dotnet/corefx#20938)
We initially left SerializationFieldInfo out of corefx as it wasn't necessary given previous goals around BinaryFormatter; but now it is.  I've ported the code almost as-is from desktop, with some minor style tweaks, and a few necessary changes, e.g. using FieldInfo instead of RuntimeFieldInfo, as the latter isn't accessible.  I've not done anything to minimize allocations / improve perf, etc., as that can be done in the future, and the results of all of this gets cached.

Changing this required regenerating a few of the serialization blobs in the tests.  I also added a test for a case we didn't previously cover, a [Serializable] type derived from a non-serializable type.

Commit migrated from https://github.com/dotnet/corefx/commit/82e327c0e947b4e3537d1189ce44025b8b868da1
2017-06-12 23:48:46 -04:00
Viktor Hofer 8c31646eaf Addressing previous serialization PR feedback from danmosemsft (dotnet/corefx#20807)
Commit migrated from https://github.com/dotnet/corefx/commit/432cbc26d8a657a72d3f08f91970bf865cc2ff30
2017-06-08 07:19:31 -07:00
Morgan Brown c46a97d532 More AOT serialization fixes (dotnet/corefx#20800)
* Fix byreflike test for UAPAOT

* More fixes for UAP AOT BinaryFormatter tests:
* Making Cookie serialize correctly (I'm not sure why this wasn't needed for CoreCLR)
* More rd.xml
* Avoid private reflection in the test Comparer comparison


Commit migrated from https://github.com/dotnet/corefx/commit/c1fe8a8352ba633abfad979ea2be6ade428f505b
2017-06-08 14:34:52 +02:00
Wes Haggard 6223b29eae Manually build mscorlib shim to allow for internal type forwards & Adding TypeForwardFrom to serialiazable types (dotnet/corefx#20697)
* Manually build mscorlib shim to allow for internal type forwards

* prepare tests for netfx->core deserialization changes

* update netfx serialized data

* change hash updater so it doesn't use hard-coded path

* Code cleanup for binary serialization

* Changed ListT to ArrayList in CookieCoolection for cross serialization

* Merge

* Changed observablecollection typeforwards that already had typeforwards on netfx

* Adding ValueTuple blobs for netfx471

* Add internal types which need to be forwarded

* Pull mscorlib shim in along with windows.winmd

To build UAP refs and libs we need an mscorlib shim. So for the build
we pull one in from packages and it will get overwritten when we build
the final one as part of our shim builds

* Removed not needed typeforward and added description

* Remved typeforwards from nested types

* Fixed generic type syntax

* Updated coreclr version, ifdefed imports for netcoreapp

* disable netfx serialization for now

* Merge error fixed

* Update blobs after coreclr changes

* Adding ValueTuple manual typeforwards

* Renamed serialization variables for SortedSet

* Disabling TreeSet<,> serialization support (for now)

* Exception internal data storage typeforward added

* Fix type conflict for mscorlib shim in uapaot configuration

* Split the runtime and ref mscorlib shim

We need to build the ref mscorlib shim only against the reference
assemblies so we still build in shims.proj. However the runtime
mscorlib shim needs to have access to internals so we build it against
the runtime implementation using a manual project.


Commit migrated from https://github.com/dotnet/corefx/commit/ca49bfbfd64351fddba56f2141b90841b8561eb7
2017-06-07 18:14:13 -07:00
Morgan Brown 127e939922 Fixes to unblock BinaryFormatter tests on UAPAOT (dotnet/corefx#20760)
Commit migrated from https://github.com/dotnet/corefx/commit/93c0a34cd24e0915598f79046a0ce9be23030c42
2017-06-06 20:42:27 -07:00
danmosemsft bd181ef7d5 2 new exceptions
Commit migrated from https://github.com/dotnet/corefx/commit/7cddfec35875e2636589fc981cbb0186a2cca572
2017-06-01 20:42:53 -07:00
Viktor Hofer 933b3f2993 Reenable TimeZoneINfo test (dotnet/corefx#20581)
Commit migrated from https://github.com/dotnet/corefx/commit/09cf25af74539d6ee4501d137ed0ff8d4df40c3e
2017-06-01 13:41:35 -07:00
Krzysztof Wicher f1d80803e1 Fix BinaryFormatter to properly deserialize objects with different ve… (dotnet/corefx#20552)
* Fix BinaryFormatter to properly deserialize objects with different version when AssemblyFormat is set to Simple

* Addressing PR feedback

* Use ResolveSimpleAssemblyName instead of inline code


Commit migrated from https://github.com/dotnet/corefx/commit/19e4b907007d9740f84d7a8c8ef084aa2ed04e24
2017-06-01 11:54:18 -07:00
Krzysztof Wicher 035fe44d80 move some data to single line with yield so that regex correctly updates hashes
Commit migrated from https://github.com/dotnet/corefx/commit/6758c2bc9d72b18a022a8306ba50818b2007443c
2017-05-31 16:14:11 -07:00
Krzysztof Wicher 5829305c8a remove default constructor from the Point test class
Commit migrated from https://github.com/dotnet/corefx/commit/722332ae13c28a04f7da339e3d283041ea9a1520
2017-05-31 15:08:49 -07:00
Krzysztof Wicher c07ce215ed Update core serialization data after changing CurrentCulture->InvariantCulture
Commit migrated from https://github.com/dotnet/corefx/commit/65d690c26005023b7776bdd362a6c5bf59b77bc1
2017-05-31 14:54:16 -07:00
Krzysztof Wicher 82e246fcda disable failing TimeZoneInfo test case
Commit migrated from https://github.com/dotnet/corefx/commit/2023ee007ecc5d0cce11775b80cf6fd1ca8b5b48
2017-05-31 12:52:36 -07:00
Krzysztof Wicher 0bbc98e8c5 fix intermittent failures related to StringDictionary
Commit migrated from https://github.com/dotnet/corefx/commit/99bc058f96565698741f576e8698e9731b80ece9
2017-05-31 12:17:09 -07:00
Krzysztof Wicher 846db21f6f IsEqual override for DictionaryEntry, disable some netfx test cases
Commit migrated from https://github.com/dotnet/corefx/commit/ff7df2d0d00db780975bd35f641b3a3f9aa735e6
2017-05-31 12:17:09 -07:00
Krzysztof Wicher 4bf6ba4ec4 do not run code which generates test data
Commit migrated from https://github.com/dotnet/corefx/commit/86a6a534c2b2f656e009ac502dc1a00b82a1468e
2017-05-31 12:17:09 -07:00
Krzysztof Wicher 06c185b8ae fix hashes and equality comparers
Commit migrated from https://github.com/dotnet/corefx/commit/274551b13e6d6cc644d2825e9d0f3830f256fd7e
2017-05-31 12:17:09 -07:00
Stephen Toub 33099849b1 Fix Graph test
The MemberData is enumerated promptly, such that even though we're yielding the graph object, subsequent modifications to that same object are manifested prior to that object being tested, and it doesn't match the serialized version.


Commit migrated from https://github.com/dotnet/corefx/commit/1de4eb9f6b799f5e12215d0f15647987a2a42e3b
2017-05-31 12:17:08 -07:00
Viktor Hofer 33ead2ac3e SortVersion & BindingList
Commit migrated from https://github.com/dotnet/corefx/commit/9715d0ec41f13473865c876d2262311a956d01df
2017-05-31 12:17:08 -07:00
Viktor Hofer cbec9359b1 Update ListDictionary hashes
Commit migrated from https://github.com/dotnet/corefx/commit/a13f9ca0b56ce6d6f378522366bf69a11f2e0f89
2017-05-31 12:17:08 -07:00
Stephen Toub 745761f80d Delete Lazy tests
Lazy was completely rewritten for .NET Core and has an entirely different format than desktop.  Lazy can also wrap an Exception that occurred from trying to instantiate the object, and the only exception types that are serializable as of now in core are the base Exception and AggregateException.  As such, we're cutting it from the list of supported types in 2.0.  An easy workaround is simply to do what the implementation does: serialize lazy.Value instead of lazy.


Commit migrated from https://github.com/dotnet/corefx/commit/981a333c4a3b8af9f2f3f11f7e55c862d4b66528
2017-05-31 12:17:08 -07:00
Stephen Toub a6f8bbcf71 Fix equality comparison of WeakReferences
Serialization of a WeakReference is dubious at best, as when it's deserialized, there won't be any strong references to the deserialized object it wraps, such that it's then immediately available for GC and will likely be gone by the time we go to look at it.


Commit migrated from https://github.com/dotnet/corefx/commit/f2e925df4b2d75caab0aa3160a51e998dcdd577d
2017-05-31 12:17:08 -07:00
Viktor Hofer de0e53b23c Added simple hash update test for internal use
Commit migrated from https://github.com/dotnet/corefx/commit/23be82919cc525f83defab18b87d043898328333
2017-05-31 12:17:08 -07:00
Viktor Hofer 2382baf04f Removed TimeZone
Commit migrated from https://github.com/dotnet/corefx/commit/bf3e1423010b9fbf07ea17af1a791f18a7df16fc
2017-05-31 12:17:08 -07:00
Viktor Hofer b94cc530d2 netfx hashes updated, keyedcollection fixed
Commit migrated from https://github.com/dotnet/corefx/commit/cc9d3e5d88b2202d7ae497cbf1220de5bf3a1fcd
2017-05-31 12:17:08 -07:00
Viktor Hofer 1ed174b34d Partially revert ObservableCollection change dotnet/corefx@9e7cc5c99e
Commit migrated from https://github.com/dotnet/corefx/commit/e3f2775e66e8810016ac22cd131f623b5c0c3115
2017-05-31 12:17:07 -07:00
Viktor Hofer 3d035dced0 Renamed coretype serialized variables to support reflection based serialization
Commit migrated from https://github.com/dotnet/corefx/commit/26163cda9e2c6953609200909cc7bbc61d3910f5
2017-05-31 12:17:07 -07:00
Viktor Hofer 4d361f2537 Removed types which arent coretypes anymore
Commit migrated from https://github.com/dotnet/corefx/commit/3f43962c32f61b4ce3163ac32f0db6c1b50798c5
2017-05-31 12:17:07 -07:00
Viktor Hofer 96a5b28413 Implement dynamic base64 object hash testing. Core Types fully tested.
Commit migrated from https://github.com/dotnet/corefx/commit/61f3620b173194fedbbfeb34a355c83354c11103
2017-05-31 12:17:07 -07:00
Viktor Hofer e327ff303d nit PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/483bdcb24cc982420270b111fb07561a24db01d6
2017-05-31 12:17:07 -07:00
Viktor Hofer ef6aa517ad Initial
Commit migrated from https://github.com/dotnet/corefx/commit/6c459b6a18a77169596cf9f5e41eac09187fcc50
2017-05-31 12:17:07 -07:00
Morgan Brown 7591164e3c Prep tests for CoreCLR/CoreRT [Serializable] cleanup (dotnet/corefx#20035)
Fixes tests that depend on types in System.Private.CoreLib being serializable that won't be serializable soon.

Commit migrated from https://github.com/dotnet/corefx/commit/178a982df2f210b615e21af7b0920f0fe5425142
2017-05-23 11:51:49 -07:00
Gaurav Khanna f167b0de93 Merge pull request dotnet/corefx#19842 from ericstj/incrementVersions
Increment versions post 2.0

Commit migrated from https://github.com/dotnet/corefx/commit/45d30e6bdf44d4a0e55df5a6064e8275cdf14d25
2017-05-17 12:03:29 -07:00
Morgan Brown 975ad3c685 Scale back [Serializable] CoreFX types (dotnet/corefx#19742)
* Remove SerializableAttribute from many CoreFX types that will not be serializable.

* Removes serialization tests for types that are no longer serializable and fixes serializing a couple of types. Includes marking some internal serializable types as public so that they'll be reflectible with .NET Native.

* Remove unneeded pragmas

* Update based on review comments


Commit migrated from https://github.com/dotnet/corefx/commit/6dd451f51451a7d0ceea6104b51bd17005e9a0e6
2017-05-16 18:16:29 -04:00
Eric St. John e02c675179 Increment versions post 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/6c5f87319a4785499008c95b2ff5e7f13a413d22
2017-05-16 14:12:16 -07:00