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

regression in SimpleConstructors test inside System.Xml.Linq.TreeManipulation.Tests #44489

Closed
wfurt opened this issue Nov 10, 2020 · 6 comments · Fixed by #44868
Closed

regression in SimpleConstructors test inside System.Xml.Linq.TreeManipulation.Tests #44489

wfurt opened this issue Nov 10, 2020 · 6 comments · Fixed by #44868
Assignees
Labels
area-System.Xml blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' test-bug Problem in test source code (most likely) test-run-core Test failures in .NET Core test runs untriaged New issue has not been triaged by the area owner
Milestone

Comments

@wfurt
Copy link
Member

wfurt commented Nov 10, 2020

I can reproduce it locally - the caveat is that this is outer loop test so I guess it got missed by CI.
I was suspecting #44414 but I can reproduce it even when syncing prior to that.

I started to fail 11/10 .e.g. today.
Binary search points to #44300

cc: @krwq and @stephentoub who touch the area recently.

There is not much aside from:

   Discovering: System.Xml.Linq.TreeManipulation.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.Xml.Linq.TreeManipulation.Tests (found 74 test cases)
    Starting:    System.Xml.Linq.TreeManipulation.Tests (parallel test collections = on, max threads = 16)
  TestCase:XNode.ReplaceWith -
  Pass:10, Fail:0, Skip:0
  TestCase:XNode.ReplaceWith with Events -
  Pass:1, Fail:0, Skip:0
  TestCase:Constructors with params - XElement - node + array -
  Pass:13, Fail:0, Skip:0
  TestCase:Simple constructors -
  	DTD - all nulls
  Expected:  ()
  Actual  :  (System.String)

  Microsoft.Test.ModuleCore.TestFailedException: dtd.InternalSubset, data[3]
     at Microsoft.Test.ModuleCore.TestLog.Compare(Object actual, Object expected, String message) in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testlog.cs:line 207
     at XLinqTests.SimpleObjectsCreation.DTDConstruct() in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/SimpleObjectsCreation.cs:line 936
     at Microsoft.Test.ModuleCore.TestVariation.Execute() in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testvariation.cs:line 64
     at Microsoft.Test.ModuleCore.TestCase.Execute() in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testcase.cs:line 84
  	 FAILED
  Pass:73, Fail:1, Skip:0
  TestCase:XNode.Remove with Events -
      XLinqTests.TreeManipulationTests.SimpleConstructors [FAIL]
        Assert.Equal() Failure
        Expected: 0
        Actual:   1
        Stack Trace:
          /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs(432,0): at XLinqTests.TreeManipulationTests.RunTestCase(TestItem testCase)
          /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs(92,0): at XLinqTests.TreeManipulationTests.SimpleConstructors()
  Pass:10, Fail:0, Skip:0
@wfurt wfurt added the test-run-core Test failures in .NET Core test runs label Nov 10, 2020
@stephentoub stephentoub added this to the 6.0.0 milestone Nov 11, 2020
@stephentoub stephentoub added test-bug Problem in test source code (most likely) area-System.Xml labels Nov 11, 2020
@ghost
Copy link

ghost commented Nov 11, 2020

Tagging subscribers to this area: @buyaa-n, @krwq, @jeffhandley
See info in area-owners.md if you want to be subscribed.


Issue meta data
Issue content: I can reproduce it locally - the caveat is that this is outer loop test so I guess it got missed by CI. I was suspecting #44414 but I can reproduce it even when syncing prior to that.

I started to fail 11/10 .e.g. today.
Binary search points to #44300

cc: @krwq and @stephentoub who touch the area recently.

There is not much aside from:

   Discovering: System.Xml.Linq.TreeManipulation.Tests (method display = ClassAndMethod, method display options = None)
    Discovered:  System.Xml.Linq.TreeManipulation.Tests (found 74 test cases)
    Starting:    System.Xml.Linq.TreeManipulation.Tests (parallel test collections = on, max threads = 16)
  TestCase:XNode.ReplaceWith -
  Pass:10, Fail:0, Skip:0
  TestCase:XNode.ReplaceWith with Events -
  Pass:1, Fail:0, Skip:0
  TestCase:Constructors with params - XElement - node + array -
  Pass:13, Fail:0, Skip:0
  TestCase:Simple constructors -
  	DTD - all nulls
  Expected:  ()
  Actual  :  (System.String)

  Microsoft.Test.ModuleCore.TestFailedException: dtd.InternalSubset, data[3]
     at Microsoft.Test.ModuleCore.TestLog.Compare(Object actual, Object expected, String message) in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testlog.cs:line 207
     at XLinqTests.SimpleObjectsCreation.DTDConstruct() in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/SimpleObjectsCreation.cs:line 936
     at Microsoft.Test.ModuleCore.TestVariation.Execute() in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testvariation.cs:line 64
     at Microsoft.Test.ModuleCore.TestCase.Execute() in /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testcase.cs:line 84
  	 FAILED
  Pass:73, Fail:1, Skip:0
  TestCase:XNode.Remove with Events -
      XLinqTests.TreeManipulationTests.SimpleConstructors [FAIL]
        Assert.Equal() Failure
        Expected: 0
        Actual:   1
        Stack Trace:
          /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs(432,0): at XLinqTests.TreeManipulationTests.RunTestCase(TestItem testCase)
          /Users/furt/github/wfurt-ssl/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs(92,0): at XLinqTests.TreeManipulationTests.SimpleConstructors()
  Pass:10, Fail:0, Skip:0
Issue author: wfurt
Assignees: krwq
Milestone: [object Object]

@stephentoub
Copy link
Member

This was introduced here:
https://github.com/dotnet/runtime/pull/44300/files#diff-6dcf882a73b2db05168fe9308ac11aca79bad7100caaabdefdbbedec9f3e25f0R23
causing this test to now be out-of-date:

//[Variation(Priority = 1, Desc = "DTD - all nulls", Params = new object[] { new string[] { "root", null, null, null }, "<!DOCTYPE root >" })]
public void DTDConstruct()

@stephentoub stephentoub added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Nov 11, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Nov 11, 2020
@v-haren
Copy link

v-haren commented Nov 18, 2020

failed again in job: runtime-libraries-coreclr outerloop 20201117.1

failed test: XLinqTests.TreeManipulationTests.SimpleConstructors

net6.0-Linux-Release-arm64-CoreCLR_release-(Alpine.312.Arm64.Open)ubuntu.1804.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.12-helix-arm64v8-20200602002604-25f8a3e

Error message

Assert.Equal() Failure
Expected: 0
Actual:   1


Stack trace
   at XLinqTests.TreeManipulationTests.RunTestCase(TestItem testCase) in /_/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs:line 432
   at XLinqTests.TreeManipulationTests.SimpleConstructors() in /_/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs:line 92

@krwq
Copy link
Member

krwq commented Nov 18, 2020

There is actually a bit regression as serialized output differs a bit (prints extra [] in the doc type where previously it didn't - it has no semantic meaning though). I have explained it more in: #44866 - I'll revert the behavior change I introduced before and we can re-think what the correct behavior should be in the other issue. The XmlDocumentType actually behaves differently than it's documented but consistent with XDocumentType (before my change) but nullability of XmlDocumentType is correct in the doc (it's nullable)

@wfurt
Copy link
Member Author

wfurt commented Nov 18, 2020

BTW the test seems pretty fast and stable. Is there reason to keep it as Outerloop?

@krwq
Copy link
Member

krwq commented Nov 19, 2020

@wfurt IIRC I initially measured the tests before marking them outerloop and I put some threshold of some number of milliseconds after which we started being too slow overall for XML, initially the guidelines for inner loop were much stricter I believe so we can reconsider that now. Let's split this investigation from the fix though

@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Xml blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' test-bug Problem in test source code (most likely) test-run-core Test failures in .NET Core test runs untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants