Skip to content

Flakey tests in Gentoo Linux #3224

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

Closed
hololeap opened this issue Sep 24, 2022 · 3 comments
Closed

Flakey tests in Gentoo Linux #3224

hololeap opened this issue Sep 24, 2022 · 3 comments
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@hololeap
Copy link
Contributor

I am getting very mixed results from the tests for hls-rename-plugin-1.0.1.0. In three different runs, I got three different results.

Run 1

  1. FAIL (6.61s)
        WorkspaceEdit contains neither documentChanges nor changes!
        CallStack (from HasCallStack):
          error, called at src/Language/LSP/Test/Session.hs:368:9 in lsp-test-0.14.1.0-KE6O6LMWm63H2RWAlrww2P:Language.LSP.Test.Session
        Use -p '/Import hiding/' to rerun this test only.
    
  2. FAIL (6.51s)
        Received an expected error in a response for id SomeLspId (IdInt 2):
        ResponseError {_code = InternalError, _message = "No AST for file: NormalizedFilePath \"/var/tmp/portage/dev-haskell/hls-rename-plugin-1.0.1.0/work/hls-rename-plugin-1.0.1.0/test/testdata/LetExpression.hs\"", _xdata = Nothing}
        Use -p '/Let expression/' to rerun this test only.
    
  3. FAIL (6.35s)
        Received an expected error in a response for id SomeLspId (IdInt 2):
        ResponseError {_code = InternalError, _message = "No AST for file: NormalizedFilePath \"/var/tmp/portage/dev-haskell/hls-rename-plugin-1.0.1.0/work/hls-rename-plugin-1.0.1.0/test/testdata/QualifiedAs.hs\"", _xdata = Nothing}
        Use -p '/Qualified as/' to rerun this test only.
    
  4. FAIL (6.97s)
    2022-09-24T18:20:48.758605Z | Info | Logging heap statistics every 60.00s
        Received an expected error in a response for id SomeLspId (IdInt 2):
        ResponseError {_code = InternalError, _message = "No AST for file: NormalizedFilePath \"/var/tmp/portage/dev-haskell/hls-rename-plugin-1.0.1.0/work/hls-rename-plugin-1.0.1.0/test/testdata/QualifiedShadowing.hs\"", _xdata = Nothing}
        Use -p '/Qualified shadowing/' to rerun this test only.
    
  5. FAIL (7.16s)
        Received an expected error in a response for id SomeLspId (IdInt 2):
        ResponseError {_code = InternalError, _message = "No AST for file: NormalizedFilePath \"/var/tmp/portage/dev-haskell/hls-rename-plugin-1.0.1.0/work/hls-rename-plugin-1.0.1.0/test/testdata/QualifiedFunction.hs\"", _xdata = Nothing}
        Use -p '/Qualified function/' to rerun this test only.
    
5 out of 20 tests failed (27.80s)

Run 2

All 20 tests passed (26.18s)

Run 3

  1. FAIL (6.22s)
        Test output was different from 'test/testdata/QualifiedFunction.expected.hs'. Output of ["git","-c","core.fileMode=false","diff","--no-index","--text","--exit-code","test/testdata/QualifiedFunction.expected.hs","/var/tmp/portage/dev-haskell/hls-rename-plugin-1.0.1.0/temp/QualifiedFunction.expected65-81.actual"]:
        
        Use -p '/Qualified function/' to rerun this test only.
    
1 out of 20 tests failed (26.31s)

Full build logs: #1 #2 #3


Your environment

GHC 9.0.2 on Gentoo Linux. All packages are installed through the system package manager.


Other gentoo-haskell-related test issues:

@hololeap hololeap added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Sep 24, 2022
@hololeap
Copy link
Contributor Author

Something similar with hls-splice-plugin-1.0.2.0:

I was only able to reproduce this twice in ten runs, but it seems like it is probably related.


Run 1

  1. FAIL (6.46s)
          Test output was different from 'test/testdata/TQQPat.expected.hs'. Output of ["git","-c","core.fileMode=false","diff","--no-index","--text","--exit-code","test/testdata/TQQPat.expected.hs","/var/tmp/portage/dev-haskell/hls-splice-plugin-1.0.2.0/temp/TQQPat.expected65-121.actual"]:
          
          Use -p '$0=="splice.Pattern Splices.TQQPat (golden)"' to rerun this test only.
    
1 out of 31 tests failed (51.22s)

Run 10

  1. FAIL (7.49s)
          Test output was different from 'test/testdata/TQQPatError.expected.hs'. Output of ["git","-c","core.fileMode=false","diff","--no-index","--text","--exit-code","test/testdata/TQQPatError.expected.hs","/var/tmp/portage/dev-haskell/hls-splice-plugin-1.0.2.0/temp/TQQPatError.expected65-127.actual"]:
          
          Use -p '$0=="splice.Pattern Splices.TQQPatError (golden)"' to rerun this test only.
    
1 out of 31 tests failed (54.41s)

Full build logs:

@hololeap hololeap changed the title hls-rename-plugin: Flakey tests in Gentoo Linux Flakey tests in Gentoo Linux Sep 24, 2022
@pepeiborra
Copy link
Collaborator

The problem is that Tasty runs test in parallel by default, and most HLS test suites do not handle this well. Set TASTY_NUM_THREADS to 1

@hololeap
Copy link
Contributor Author

@pepeiborra

Thanks, changing the number of tasty threads to 1 seems to have fixed this batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants