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

SetOut.SetOutReadToEnd (System.Console.Tests) failing #57935

Closed
ViktorHofer opened this issue Aug 23, 2021 · 3 comments · Fixed by #62200
Closed

SetOut.SetOutReadToEnd (System.Console.Tests) failing #57935

ViktorHofer opened this issue Aug 23, 2021 · 3 comments · Fixed by #62200
Assignees
Labels
arch-x64 area-System.Console disabled-test The test is disabled in source code against the issue needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration os-linux Linux OS (any supported distro)
Milestone

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Aug 23, 2021

Configuration: net6.0-Linux-Release-x64-CoreCLR_release-Ubuntu.1604.Amd64.Open

  Discovering: System.Console.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Console.Tests (found 103 of 137 test cases)
  Starting:    System.Console.Tests (parallel test collections = on, max threads = 2)
    Color.RedirectedOutput_EnvVarSet_EmitsAnsiCodes [SKIP]
    SetOut.SetOutReadToEnd [FAIL]
      Assert.Equal() Failure
                    ↓ (pos 4)
      Expected: Test
      Actual:   Test      Condition(s) not met: "TermIsSet"\n
                    ↑ (pos 4)
      Stack Trace:
        /_/src/libraries/System.Console/tests/Helpers.cs(30,0): at Helpers.SetAndReadHelper(Action`1 setHelper, Func`1 getHelper, Func`2 readHelper)
        /_/src/libraries/System.Console/tests/SetOut.cs(33,0): at SetOut.SetOutReadToEnd()
0
0
  Finished:    System.Console.Tests
=== TEST EXECUTION SUMMARY ===
   System.Console.Tests  Total: 145, Errors: 0, Failed: 1, Skipped: 1, Time: 25.986s

Console: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-81cebc580e4d469d8c/System.Console.Tests/1/console.d7bb424a.log?sv=2019-07-07&se=2021-09-10T12%3A52%3A27Z&sr=c&sp=rl&sig=ImEkdaCe1Eq5kdIjsjMqsca516L08YmwxWWuOg%2FEwRs%3D

Build: https://dev.azure.com/dnceng/public/_build/results?buildId=1309902&view=ms.vss-test-web.build-test-results-tab&runId=38562426&paneView=debug

Runfo Tracking Issue: setout.setoutreadtoend

Build Definition Kind Run Name Console Core Dump Test Results Run Client
1472741 runtime Rolling net6.0-Linux-Release-x64-Mono_release-(Centos.8.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759 console.log runclient.py

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
0 0 1
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Console untriaged New issue has not been triaged by the area owner labels Aug 23, 2021
@ghost
Copy link

ghost commented Aug 23, 2021

Tagging subscribers to this area: @dotnet/area-system-console
See info in area-owners.md if you want to be subscribed.

Issue Details

Configuration: net6.0-Linux-Release-x64-CoreCLR_release-Ubuntu.1604.Amd64.Open

  Discovering: System.Console.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Console.Tests (found 103 of 137 test cases)
  Starting:    System.Console.Tests (parallel test collections = on, max threads = 2)
    Color.RedirectedOutput_EnvVarSet_EmitsAnsiCodes [SKIP]
    SetOut.SetOutReadToEnd [FAIL]
      Assert.Equal() Failure
                    ↓ (pos 4)
      Expected: Test
      Actual:   Test      Condition(s) not met: "TermIsSet"\n
                    ↑ (pos 4)
      Stack Trace:
        /_/src/libraries/System.Console/tests/Helpers.cs(30,0): at Helpers.SetAndReadHelper(Action`1 setHelper, Func`1 getHelper, Func`2 readHelper)
        /_/src/libraries/System.Console/tests/SetOut.cs(33,0): at SetOut.SetOutReadToEnd()
0
0
  Finished:    System.Console.Tests
=== TEST EXECUTION SUMMARY ===
   System.Console.Tests  Total: 145, Errors: 0, Failed: 1, Skipped: 1, Time: 25.986s

Console: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-81cebc580e4d469d8c/System.Console.Tests/1/console.d7bb424a.log?sv=2019-07-07&se=2021-09-10T12%3A52%3A27Z&sr=c&sp=rl&sig=ImEkdaCe1Eq5kdIjsjMqsca516L08YmwxWWuOg%2FEwRs%3D

Build: https://dev.azure.com/dnceng/public/_build/results?buildId=1309902&view=ms.vss-test-web.build-test-results-tab&runId=38562426&paneView=debug

Author: ViktorHofer
Assignees: -
Labels:

area-System.Console, untriaged

Milestone: -

@adamsitnik adamsitnik added this to the 7.0.0 milestone Aug 26, 2021
@adamsitnik adamsitnik added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed untriaged New issue has not been triaged by the area owner labels Aug 26, 2021
@carlossanlop
Copy link
Member

The TERM env variable cannot be found, or is empty:

public static bool TermIsSet => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TERM"));

@carlossanlop carlossanlop added arch-x64 blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-linux Linux OS (any supported distro) labels Oct 5, 2021
@krwq krwq added disabled-test The test is disabled in source code against the issue and removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Oct 20, 2021
@am11
Copy link
Member

am11 commented Nov 29, 2021

Actual: Test Condition(s) not met: "TermIsSet"\n

When tests run in parallel, reading from Console.Out mangles the ReadToEnd output and therefore, SetOut tests intermittently fail. Condition(s) not met part is the output of previous skipped test. We can disable parallelism by adding [Collection(nameof(DisableParallelization))] on this class once PR #62132 is completed and delete ActiveIssue.

@adamsitnik adamsitnik assigned adamsitnik and unassigned jozkee Nov 30, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 30, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 1, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-System.Console disabled-test The test is disabled in source code against the issue needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration os-linux Linux OS (any supported distro)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants