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

detailed-0.9 test suites (always?) freeze #1881

Closed
ttuegel opened this issue May 20, 2014 · 6 comments
Closed

detailed-0.9 test suites (always?) freeze #1881

ttuegel opened this issue May 20, 2014 · 6 comments

Comments

@ttuegel
Copy link
Member

ttuegel commented May 20, 2014

As reported by @coreyoconnor on issue #1810, the test runner for detailed-0.9 tests always freezes. This is probably related to the issue with exitcode-stdio-1.0 tests freezing sometimes due to over-buffering of the test output. I'm opening a new issue because the problems are separate and I'm about to close the other issue.

To reproduce: run cabal test in any package containing detailed test suites.

@coreyoconnor
Copy link

A small project that reproduces the issue is: https://github.com/coreyoconnor/cabal-issue-1810

(thanks!)

@snoyberg
Copy link
Collaborator

I've noticed that the active package's set suite always freezes as well, including with cabal-install-1.20.0.2. Is this the same issue being reported here, or should I open a separate bug report?

@coreyoconnor
Copy link

active also uses QuickCheck. active uses exit-code-stdio-1.0 and not detailed-0.9.
Both vty and active use quickCheckWithResult which uses the default reporting of QuickCheck: withStdioTerminal.
withStdioTerminal doesn't look particularly odd. On setup the buffering is set to line buffering. Each message is hPutStr followed by hFlush.

I'll try using withNullTerminal in vty and test if this changes the behavior.

@ttuegel
Copy link
Member Author

ttuegel commented May 29, 2014

@snoyberg active uses exitcode-stdio-1.0 tests, so that's a different issue.

@ttuegel
Copy link
Member Author

ttuegel commented May 29, 2014

@coreyoconnor Ah, your test runner has QuickCheck printing to stdout. detailed-0.9 type tests are not allowed to use stdout, it is reserved for Cabal's exclusive use. All of your output must be done by returning intermediate Progress results.

@coreyoconnor
Copy link

@ttuegel That I did not know. Is this in the docs somewhere? I haven't seen this mentioned in either:

Easy enough to test: Modified the test project at

To have QuickCheck not use stdout. These tests no longer freezes and pass as expected. Cool! This change also worked for the few vty tests tried. Looks like that is the issue then. Feel free to close.
Thanks!

@ttuegel ttuegel closed this as completed Sep 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants