Repository navigation
test: load the harness defaults and the test options in one call - #3249
Open
italopaesano wants to merge 1 commit into
Open
italopaesano wants to merge 1 commit into
italopaesano wants to merge 1 commit into
Conversation
test_config_backend_t::init() called load_configuration_options_from_string() twice: once for the defaults every test needs, once for the options of the individual test. The second call undoes part of the first one, because the function treats each string as the complete configuration -- it is the same path which reloads wayfire.ini -- and therefore ends by resetting every registered option which is absent from the string it was given. So every test which passes options of its own silently lost the defaults. The one that shows is xwayland = false, whose default is true: the resize, touch, keyboard-config, pointer-scroll-speed and native-buffer-size-scaling tests spawned 15 Xwayland servers between them, nine in the resize test alone, none of which they use. While probing for a free display those log "Failed to bind socket @/tmp/.X11-unix/X0: Address already in use" and compete for display numbers with each other and with the session running the suite. core/plugins fell back to the default list of 26 plugins, and autostart_wf_shell to true; those are harmless today only because the tests which do start plugins also set plugins themselves. None of this shows on CI, where wlroots is built without xwayland support, so core/xwayland has no effect and the two tests which use Xwayland are not built at all. Load the defaults and the options of the test in a single call, defaults first so that the test still takes precedence. The options of a test have to open their own section, which every test already does. Those five tests now spawn no Xwayland server, and the two tests which do use Xwayland still spawn exactly one each. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_config_backend_t::init() called load_configuration_options_from_string()
twice: once for the defaults every test needs, once for the options of the
individual test. The second call undoes part of the first one, because the
function treats each string as the complete configuration -- it is the same
path which reloads wayfire.ini -- and therefore ends by resetting every
registered option which is absent from the string it was given.
So every test which passes options of its own silently lost the defaults. The
one that shows is xwayland = false, whose default is true: the resize, touch,
keyboard-config, pointer-scroll-speed and native-buffer-size-scaling tests
spawned 15 Xwayland servers between them, nine in the resize test alone, none
of which they use. While probing for a free display those log "Failed to bind
socket @/tmp/.X11-unix/X0: Address already in use" and compete for display
numbers with each other and with the session running the suite. core/plugins
fell back to the default list of 26 plugins, and autostart_wf_shell to true;
those are harmless today only because the tests which do start plugins also
set plugins themselves. None of this shows on CI, where wlroots is built
without xwayland support, so core/xwayland has no effect and the two tests
which use Xwayland are not built at all.
Load the defaults and the options of the test in a single call, defaults first
so that the test still takes precedence. The options of a test have to open
their own section, which every test already does.
Those five tests now spawn no Xwayland server, and the two tests which do use
Xwayland still spawn exactly one each.
Co-Authored-By: Claude noreply@anthropic.com