dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.96k stars 4.65k forks source link

Test failure: XmlSerializerTests.Xml_DerivedIXmlSerializable #106940

Open v-wenyuxu opened 3 weeks ago

v-wenyuxu commented 3 weeks ago

Failed in: runtime-coreclr libraries-pgo 20240823.1

Failed tests:

net9.0-linux-Release-arm-fullpgo-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-syntheticpgo_blend-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-fullpgo_random_gdv_edge-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-fullpgo_methodprofiling-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-jitrlcse-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-fullpgo_random_gdv_methodprofiling_only-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-jitosr_stress_random-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-defaultpgo-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable
net9.0-linux-Release-arm-jitoldlayout-(Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - XmlSerializerTests.Xml_DerivedIXmlSerializable

Error message:

 XML comparison is also failing
Test failed for input: XmlSerializableDerivedClass
Expected: <?xml version="1.0" encoding="utf-8"?>
<BaseIXmlSerializable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="DerivedIXmlSerializable" AttributeString="derivedIXmlSerTest" DateTimeValue="12/31/1999 12:00:00 AM" BoolValue="True" xmlns="http://example.com/serializer-test-namespace" />
Actual: <?xml version="1.0" encoding="utf-8"?>
<BaseIXmlSerializable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="DerivedIXmlSerializable" AttributeString="derivedIXmlSerTest" DateTimeValue="12/31/1999 12:00:00 AM" BoolValue="True" xmlns="http://example.com/serializer-test-namespace" />

Stack trace:

   at XmlSerializerTests.SerializeAndDeserialize[T](T value, String baseline, Func`1 serializerFactory, Boolean skipStringCompare, XmlSerializerNamespaces xns) in /_/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs:line 2336
   at XmlSerializerTests.Xml_DerivedIXmlSerializable() in /_/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.Internal.cs:line 42
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57
jkotas commented 2 weeks ago

Related to https://github.com/dotnet/runtime/issues/102220

There is space mismatch between the expected and actual DateTimeValue="12/31/1999 12:00:00 AM"