Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[trimming] Test failures only when trimming #73961

Open
radical opened this issue Aug 15, 2022 · 3 comments
Open

[trimming] Test failures only when trimming #73961

radical opened this issue Aug 15, 2022 · 3 comments
Labels
arch-wasm WebAssembly architecture area-Serialization disabled-test The test is disabled in source code against the issue os-ios Apple iOS trimming-for-aot `EnableAggressiveTrimming=true` used for running tests with AOT
Milestone

Comments

@radical
Copy link
Member

radical commented Aug 15, 2022

All failures

Seen on main, and #73894 :
Rolling builds failing due to trimming errors like:

[22:39:56] fail: [FAIL] DataContractJsonSerializerTests.DCJS_VerifyDateTimeForFormatStringDCJsonSerSettings
[22:39:56] info: System.Runtime.Serialization.SerializationException : No set method for property 'System.DateTime UtcDateTime' in type 'System.Runtime.Serialization.DateTimeOffsetAdapter'.
[22:39:56] info:    at System.Runtime.Serialization.Json.JsonFormatReaderGenerator.CriticalHelper.GenerateClassReader(ClassDataContract )
[22:39:56] info:    at System.Runtime.Serialization.Json.JsonClassDataContract.get_JsonFormatReaderDelegate()
[22:39:56] info:    at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator , Boolean , DataContractResolver )
[22:39:56] info:    at DataContractJsonSerializerTests.SerializeAndDeserialize[DateTimeOffset](DateTimeOffset value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare)
[22:39:56] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
[22:39:56] fail: [FAIL] DataContractJsonSerializerTests.DCJS_ClassWithDatetimeOffsetTypeProperty
[22:39:56] info: System.Runtime.Serialization.SerializationException : No set method for property 'System.DateTime UtcDateTime' in type 'System.Runtime.Serialization.DateTimeOffsetAdapter'.
[22:39:56] info:    at System.Runtime.Serialization.Json.JsonFormatReaderGenerator.CriticalHelper.GenerateClassReader(ClassDataContract )
[22:39:56] info:    at System.Runtime.Serialization.Json.JsonClassDataContract.get_JsonFormatReaderDelegate()
[22:39:56] info:    at System.Object.ReadTypeWithDateTimeOffsetTypePropertyFromJson(XmlReaderDelegator , XmlObjectSerializerReadContextComplexJson , XmlDictionaryString , XmlDictionaryString[] )
[22:39:56] info:    at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator , Boolean , DataContractResolver )
[22:39:56] info:    at DataContractJsonSerializerTests.SerializeAndDeserialize[TypeWithDateTimeOffsetTypeProperty](TypeWithDateTimeOffsetTypeProperty value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare)
[22:39:56] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
[22:39:56] info: Finished:    System.Runtime.Serialization.Json.Tests.dll


TestName ConsoleUri
normal-System.Runtime.Serialization.Json.ReflectionOnly.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Runtime.Serialization.Json.ReflectionOnly.Tests/1/console.22326ac1.log?helixlogtype=result
normal-System.Runtime.Serialization.Json.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Runtime.Serialization.Json.Tests/1/console.ae864d7d.log?helixlogtype=result
normal-System.Runtime.Serialization.Schema.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Runtime.Serialization.Schema.Tests/1/console.53a021b1.log?helixlogtype=result
normal-System.Runtime.Serialization.Xml.ReflectionOnly.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Runtime.Serialization.Xml.ReflectionOnly.Tests/1/console.943b0a42.log?helixlogtype=result
normal-System.Runtime.Serialization.Xml.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Runtime.Serialization.Xml.Tests/1/console.76324c76.log?helixlogtype=result
normal-System.Xml.XmlSerializer.ReflectionOnly.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Xml.XmlSerializer.ReflectionOnly.Tests/1/console.7177f9b5.log?helixlogtype=result
normal-System.Xml.XmlSerializer.Tests https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-1ee9e77bee6d490fac/normal-System.Xml.XmlSerializer.Tests/1/console.a2208202.log?helixlogtype=result

The trimming related build errors were fixed in 7d986fa . These are actual test failures now. I have pushed fixes for some of these to #73894 .

cc @eerhardt @stephentoub

Failures for which the tests have been disabled

System.Runtime.Serialization.Schema.Tests log:

[11:27:00] fail: [FAIL] System.Runtime.Serialization.Schema.Tests.RoundTripTest.RountTripTest
[11:27:00] info: System.Runtime.Serialization.InvalidDataContractException : Type 'System.ComponentModel.MarshalByValueComponent' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.ThrowInvalidDataContractException(String , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper..ctor(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.ClassDataContract..ctor(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.GetDataContract(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.GetMemberTypeDataContract(DataMember )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.AddClassDataContract(ClassDataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.InternalAdd(XmlQualifiedName , DataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.Add(XmlQualifiedName , DataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.Add(DataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.Add(Type )
[11:27:00] info:    at System.Runtime.Serialization.XsdDataContractExporter.AddType(Type )
[11:27:00] info:    at System.Runtime.Serialization.XsdDataContractExporter.Export(Type )
[11:27:00] info:    at System.Runtime.Serialization.Schema.Tests.RoundTripTest.RountTripTest()
[11:27:00] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )

System.Runtime.Serialization.Xml.ReflectionOnly.Tests log:

[11:26:59] info: Starting:    System.Runtime.Serialization.Xml.ReflectionOnly.Tests.dll
[11:27:03] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Deserialize_CompatibleWithFullFramework
[11:27:03] info: System.NullReferenceException : Object reference not set to an instance of an object.
[11:27:03] info:    at System.Runtime.Serialization.MemoryStreamAdapter.GetMemoryStream(MemoryStreamAdapter value)
[11:27:03] info:    at System.Runtime.Serialization.ReflectionReader.ResolveAdapterObject(Object , ClassDataContract )
[11:27:03] info:    at System.Runtime.Serialization.ReflectionReader.ReflectionReadClass(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] , ClassDataContract )
[11:27:03] info:    at System.Runtime.Serialization.ReflectionXmlClassReader.ReflectionReadClass(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
[11:27:03] info:    at System.Runtime.Serialization.DataContracts.ClassDataContract.ReadXmlValue(XmlReaderDelegator , XmlObjectSerializerReadContext )
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract , XmlReaderDelegator )
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
[11:27:03] info:    at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
[11:27:03] info:    at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlReader )
[11:27:03] info:    at DataContractSerializerTests.<DCS_MemoryStream_Deserialize_CompatibleWithFullFramework>g__DeserializeObjectAndValidate|241_0(String input, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable, Boolean expectedWritable)
[11:27:03] info:    at DataContractSerializerTests.DCS_MemoryStream_Deserialize_CompatibleWithFullFramework()
[11:27:03] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
[11:27:03] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter
[11:27:03] info: XML comparison is also failing
[11:27:03] info: Test failed for input: System.IO.MemoryStream
[11:27:03] info: Expected: <MemoryStream xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/System.IO"><__identity i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/System" /><_buffer></_buffer><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:03] info: Actual: <MemoryStream xmlns="http://schemas.datacontract.org/2004/07/System.IO" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><_buffer/><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:03] info: Expected: True
[11:27:03] info: Actual:   False
[11:27:03] info:    at System.Runtime.Serialization.Tests.DataContractSerializerHelper.SerializeAndDeserialize[MemoryStream](MemoryStream value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare)
[11:27:03] info:    at DataContractSerializerTests.<DCS_MemoryStream_Serialize_UsesBuiltInAdapter>g__ValidateObject|240_0(MemoryStream original, String expectedXml, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable)
[11:27:03] info:    at DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter()
[11:27:03] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )

System.Runtime.Serialization.Xml.Tests log:

[11:27:07] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter
[11:27:07] info: XML comparison is also failing
[11:27:07] info: Test failed for input: System.IO.MemoryStream
[11:27:07] info: Expected: <MemoryStream xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/System.IO"><__identity i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/System" /><_buffer></_buffer><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:07] info: Actual: <MemoryStream xmlns="http://schemas.datacontract.org/2004/07/System.IO" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><_buffer/><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:07] info: Expected: True
[11:27:07] info: Actual:   False
[11:27:07] info:    at System.Runtime.Serialization.Tests.DataContractSerializerHelper.SerializeAndDeserialize[MemoryStream](MemoryStream value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare)
[11:27:07] info:    at DataContractSerializerTests.<DCS_MemoryStream_Serialize_UsesBuiltInAdapter>g__ValidateObject|238_0(MemoryStream original, String expectedXml, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable)
[11:27:07] info:    at DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter()
[11:27:07] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
[11:27:08] fail: [FAIL] System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.Export(testname: "Exp2", export: Action`1 { Method = Void <Export_MemberData>b__7_2(System.Runtime.Serialization.XsdDataContractExporter), Target = <>c { } }, schemaCheck: Action`2 { Method = Void <Export_MemberData>b__3(System.String, System.Xml.Schema.XmlSchemaSet), Target = <>c__DisplayClass7_0 { autoImportKVP = False } })
[11:27:08] info: Assert.Equal() Failure
[11:27:08] info: Expected: 20
[11:27:08] info: Actual:   4
[11:27:08] info:    at System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.<>c__DisplayClass7_0.<Export_MemberData>b__3(String s, XmlSchemaSet ss)
[11:27:08] info:    at System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.Export(String testname, Action`1 export, Action`2 schemaCheck)
[11:27:08] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
{
  "ErrorMessage": "",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Report

Build Definition Test Pull Request
257329 dotnet/runtime XmlSerializerTests.Xml_DefaultValueAttributeSetToNegativeInfinityTest #85565

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 1
@radical radical added arch-wasm WebAssembly architecture disabled-test The test is disabled in source code against the issue trimming-for-aot `EnableAggressiveTrimming=true` used for running tests with AOT labels Aug 15, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 15, 2022
@ghost
Copy link

ghost commented Aug 15, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Seen on main, and #73894 :

[System.Runtime.Serialization.Schema.Tests log][https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-73894-merge-81b30ad20ea9433393/normal-System.Runtime.Serialization.Schema.Tests/1/console.2e21e33a.log?helixlogtype=result]:

[11:27:00] fail: [FAIL] System.Runtime.Serialization.Schema.Tests.RoundTripTest.RountTripTest
[11:27:00] info: System.Runtime.Serialization.InvalidDataContractException : Type 'System.ComponentModel.MarshalByValueComponent' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.ThrowInvalidDataContractException(String , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper..ctor(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.ClassDataContract..ctor(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type)
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.GetDataContract(Type )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.GetMemberTypeDataContract(DataMember )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.AddClassDataContract(ClassDataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.InternalAdd(XmlQualifiedName , DataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.Add(XmlQualifiedName , DataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.Add(DataContract )
[11:27:00] info:    at System.Runtime.Serialization.DataContracts.DataContractSet.Add(Type )
[11:27:00] info:    at System.Runtime.Serialization.XsdDataContractExporter.AddType(Type )
[11:27:00] info:    at System.Runtime.Serialization.XsdDataContractExporter.Export(Type )
[11:27:00] info:    at System.Runtime.Serialization.Schema.Tests.RoundTripTest.RountTripTest()
[11:27:00] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )

System.Runtime.Serialization.Xml.ReflectionOnly.Tests log:

[11:26:59] info: Starting:    System.Runtime.Serialization.Xml.ReflectionOnly.Tests.dll
[11:27:03] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Deserialize_CompatibleWithFullFramework
[11:27:03] info: System.NullReferenceException : Object reference not set to an instance of an object.
[11:27:03] info:    at System.Runtime.Serialization.MemoryStreamAdapter.GetMemoryStream(MemoryStreamAdapter value)
[11:27:03] info:    at System.Runtime.Serialization.ReflectionReader.ResolveAdapterObject(Object , ClassDataContract )
[11:27:03] info:    at System.Runtime.Serialization.ReflectionReader.ReflectionReadClass(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] , ClassDataContract )
[11:27:03] info:    at System.Runtime.Serialization.ReflectionXmlClassReader.ReflectionReadClass(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
[11:27:03] info:    at System.Runtime.Serialization.DataContracts.ClassDataContract.ReadXmlValue(XmlReaderDelegator , XmlObjectSerializerReadContext )
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract , XmlReaderDelegator )
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
[11:27:03] info:    at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
[11:27:03] info:    at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName)
[11:27:03] info:    at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlReader )
[11:27:03] info:    at DataContractSerializerTests.<DCS_MemoryStream_Deserialize_CompatibleWithFullFramework>g__DeserializeObjectAndValidate|241_0(String input, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable, Boolean expectedWritable)
[11:27:03] info:    at DataContractSerializerTests.DCS_MemoryStream_Deserialize_CompatibleWithFullFramework()
[11:27:03] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
[11:27:03] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter
[11:27:03] info: XML comparison is also failing
[11:27:03] info: Test failed for input: System.IO.MemoryStream
[11:27:03] info: Expected: <MemoryStream xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/System.IO"><__identity i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/System" /><_buffer></_buffer><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:03] info: Actual: <MemoryStream xmlns="http://schemas.datacontract.org/2004/07/System.IO" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><_buffer/><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:03] info: Expected: True
[11:27:03] info: Actual:   False
[11:27:03] info:    at System.Runtime.Serialization.Tests.DataContractSerializerHelper.SerializeAndDeserialize[MemoryStream](MemoryStream value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare)
[11:27:03] info:    at DataContractSerializerTests.<DCS_MemoryStream_Serialize_UsesBuiltInAdapter>g__ValidateObject|240_0(MemoryStream original, String expectedXml, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable)
[11:27:03] info:    at DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter()
[11:27:03] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )

System.Runtime.Serialization.Xml.Tests log:

[11:27:07] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter
[11:27:07] info: XML comparison is also failing
[11:27:07] info: Test failed for input: System.IO.MemoryStream
[11:27:07] info: Expected: <MemoryStream xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/System.IO"><__identity i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/System" /><_buffer></_buffer><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:07] info: Actual: <MemoryStream xmlns="http://schemas.datacontract.org/2004/07/System.IO" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><_buffer/><_capacity>0</_capacity><_expandable>false</_expandable><_exposable>true</_exposable><_isOpen>true</_isOpen><_length>0</_length><_origin>0</_origin><_position>0</_position><_writable>true</_writable></MemoryStream>
[11:27:07] info: Expected: True
[11:27:07] info: Actual:   False
[11:27:07] info:    at System.Runtime.Serialization.Tests.DataContractSerializerHelper.SerializeAndDeserialize[MemoryStream](MemoryStream value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare)
[11:27:07] info:    at DataContractSerializerTests.<DCS_MemoryStream_Serialize_UsesBuiltInAdapter>g__ValidateObject|238_0(MemoryStream original, String expectedXml, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable)
[11:27:07] info:    at DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter()
[11:27:07] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
[11:27:08] fail: [FAIL] System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.Export(testname: "Exp2", export: Action`1 { Method = Void <Export_MemberData>b__7_2(System.Runtime.Serialization.XsdDataContractExporter), Target = <>c { } }, schemaCheck: Action`2 { Method = Void <Export_MemberData>b__3(System.String, System.Xml.Schema.XmlSchemaSet), Target = <>c__DisplayClass7_0 { autoImportKVP = False } })
[11:27:08] info: Assert.Equal() Failure
[11:27:08] info: Expected: 20
[11:27:08] info: Actual:   4
[11:27:08] info:    at System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.<>c__DisplayClass7_0.<Export_MemberData>b__3(String s, XmlSchemaSet ss)
[11:27:08] info:    at System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.Export(String testname, Action`1 export, Action`2 schemaCheck)
[11:27:08] info:    at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
Author: radical
Assignees: -
Labels:

arch-wasm, disabled-test, trimming-for-aot

Milestone: -

@radical radical removed the untriaged New issue has not been triaged by the area owner label Aug 15, 2022
@sbomer
Copy link
Member

sbomer commented Aug 15, 2022

Likely the result of dotnet/linker#2929, which turned off the serialization heuristics by default.

@radical radical added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Aug 15, 2022
@radical radical removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Aug 15, 2022
@radical radical added this to the 8.0.0 milestone Aug 16, 2022
@StephenMolloy
Copy link
Member

@sbomer, @lewing, and @radical - What is the expected path forward here? The serializer assemblies are not field-level trimmable. This isn't really an 'area-Serialization' issue as nothing changed with the serializers to cause this. Who should be responsible for ensuring that the serialization exceptions are enabled when running serialization tests?

@carlossanlop carlossanlop added Known Build Error Use this to report build issues in the .NET Helix tab and removed Known Build Error Use this to report build issues in the .NET Helix tab labels Apr 5, 2023
@radical radical removed the Known Build Error Use this to report build issues in the .NET Helix tab label May 2, 2023
radical added a commit to radical/runtime that referenced this issue May 2, 2023
System.Runtime.Serialization.Xml.ReflectionOnly.Tests:DataContractSerializerTests.DCS_MemoryStream_Deserialize_CompatibleWithFullFramework

Issue: dotnet#73961
radical added a commit that referenced this issue May 3, 2023
* [wasi] Disable failing tests in System.Runtime.Serialization.Xml.Tests

Issue: #82967, and #73961

* [wasi] Disable failing test

System.Runtime.Serialization.Xml.ReflectionOnly.Tests:DataContractSerializerTests.DCS_MemoryStream_Deserialize_CompatibleWithFullFramework

Issue: #73961

* [wasi] Disable tests failing depending on tmp fs

System.Runtime.Serialization.Xml.ReflectionOnly.Tests, and System.Runtime.Serialization.Xml.Tests
Test: DataContractSerializerTests.DCS_FileStreamSurrogate

Issue: #85690
@lewing lewing modified the milestones: 8.0.0, 9.0.0 Jul 24, 2023
@kotlarmilos kotlarmilos changed the title [wasm] Test failures only when trimming [trimming] Test failures only when trimming Mar 12, 2024
@kotlarmilos kotlarmilos added the os-ios Apple iOS label Mar 12, 2024
@pavelsavara pavelsavara modified the milestones: 9.0.0, Future Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Serialization disabled-test The test is disabled in source code against the issue os-ios Apple iOS trimming-for-aot `EnableAggressiveTrimming=true` used for running tests with AOT
Projects
None yet
Development

No branches or pull requests

7 participants