Skip to content

Fix test_bitcoin-qt when DISPLAY is unset#10113

Closed
ryanofsky wants to merge 1 commit intobitcoin:masterfrom
ryanofsky:pr/nodisp
Closed

Fix test_bitcoin-qt when DISPLAY is unset#10113
ryanofsky wants to merge 1 commit intobitcoin:masterfrom
ryanofsky:pr/nodisp

Conversation

@ryanofsky
Copy link
Copy Markdown
Contributor

Issue reported by @TheBlueMatt in #10110

Issue reported by Matt Corallo <git@bluematt.me> in
bitcoin#10110

Fixes bitcoin#10110
Comment thread src/qt/test/test_main.cpp
#endif

static bool UsesXcb() {
for (QObject* plugin: QPluginLoader::staticInstances()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this react if xcb is available but not default? For ex, if egl or wayland would otherwise be used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this react if xcb is available but not default? For ex, if egl or wayland would otherwise be used?

This is a good point, I suspect the check is broken in this case.

@fanquake fanquake added the Tests label Mar 29, 2017
@laanwj
Copy link
Copy Markdown
Member

laanwj commented Mar 29, 2017

I think the make check tests should never try to use the DISPLAY (or the computer's GUI otherwise, e.g. through egl/wayland/win32/quartz/...).
There's a place for tests that require rendering (usually combined with a "monkey" to mimic user interaction) but these should IMO be separate when we have them.

Copy link
Copy Markdown
Contributor Author

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the make check tests should never try to use the DISPLAY (or the computer's GUI otherwise, e.g. through egl/wayland/win32/quartz/...).
There's a place for tests that require rendering (usually combined with a "monkey" to mimic user interaction) but these should IMO be separate when we have them.

The test doesn't actually require any rendering, it's just failing to initialize QApplication (which must be calling some libxcb functions) and crashing on startup.

I'm closing this in favor of an alternative fix in #10117 though, which modifies "make check" to run the test under xvfb if it's available.

Comment thread src/qt/test/test_main.cpp
#endif

static bool UsesXcb() {
for (QObject* plugin: QPluginLoader::staticInstances()) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this react if xcb is available but not default? For ex, if egl or wayland would otherwise be used?

This is a good point, I suspect the check is broken in this case.

@ryanofsky ryanofsky closed this Mar 29, 2017
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants