Skip to content

Review types for Serialization test coverage #20084

@danmoseley

Description

@danmoseley

The binary rewriter that currently strips S.P.CoreLib.dll turns out to have been removing some instances of serialization infrastructure on types it retained. That implies that we don't have test coverage for binary serializing these.

Investigate, and add coverage if necessary. If the type is internal to S.P.CoreLib.dll and is not serialized indirectly then possibly it isn't necessary. If the type is missing [Serializable] on it, it's also not necessary.

What I grepped for

[OnDeserialized]
[OnSerializing]
[OnSerialized]
serialization constructor or other function passed SerializationInfo

Types affected were in

  • mscorlib/src/System/Globalization/SortKey.cs
  • mscorlib/src/System/Security/Util/TokenBasedSet.cs
  • mscorlib/src/System/Security/Util/URLString.cs
  • mscorlib/src/System/Security/PermissionSet.cs (PermissionSet)
  • mscorlib/src/System/Text/*Encoding.cs
  • mscorlib/src/System/AppDomainUnloadedException.cs
  • mscorlib/src/System/Collections/Comparer.cs
  • mscorlib/src/System/Collections/Generic/Comparer.cs (several classes)
  • mscorlib/src/System/Collections/Hashtable.cs (the internal hashtable)
  • mscorlib/src/System/IO/DriveNotFoundException.cs
  • mscorlib/src/System/InsufficientMemoryException.cs
  • mscorlib/src/System/OperatingSystem.cs
  • mscorlib/src/System/Reflection/ConstructorInfo.cs
  • mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs
  • mscorlib/src/System/Runtime/Serialization/FormatterServices.cs - SurrogateForCyclicalReference
  • mscorlib/src/System/Runtime/Serialization/ISurrogateSelector.cs
  • mscorlib/src/System/Text/DecoderNLS.cs

@stephentoub fyi.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Metahelp wanted[up-for-grabs] Good issue for external contributorsincrease-code-coverageTracking need to add more test and increase code coverage of a componenttest-enhancementImprovements of test source code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions