This tool is similar to xtrace in usage in that it intercepts traffic to
the X server. The motivating feature for writing the tool is its ability
to inject prepared reply messages instead of the server’s reply. In
this particular case, we’ll inject a RRGetMonitors reply to test i3’s
RandR 1.5 code paths.
The added testcase is a noop for now, but with the code that’s lingering
in the randr15 branch, i3 does actually detect monitors as per the
injected reply:
2016-11-20 21:10:05 - randr.c:__randr_query_outputs:618 -
RandR 1.5 available, querying monitors
2016-11-20 21:10:05 - randr.c:__randr_query_outputs:628 -
1 RandR monitors found (timestamp 0)
2016-11-20 21:10:05 - randr.c:__randr_query_outputs:646 -
name DP3, x 0, y 0, width 3840 px, height 2160 px, width 520 mm,
height 290 mm, primary 1, automatic 1
This is preparation work for issue #1799
We add $HOME to the environment variables we define for a test case
in order to redirect it from the user's actual home directory. This
is necessary because xcb-util-xrm will fall back to $HOME/.Xresources
when determining the DPI. If a user has this set to, e.g., 192 on their
machine, this would break tests.
Since tests shouldn't rely on the system they run in, we redirect the
home directory altogether to simulate a clean slate.
relates to #2465
Commit 287a0b4 introduced a segfault when validating the i3 config
as the root_screen will not be set in this case, causing a null
pointer dereference.
fixes#2144
Replace the XDummy script with Xephyr. This is done because of some
changes in the Xorg server that make XDummy difficult to use.
Rename library internal variables and function names to replace "xdummy"
with "xserver" to show this change (except for renaming the package and
lib file for better git history).
Rename the switch `--keep-xdummy-output` to `--keep-xserver-output`.
This switch should now be rarely used because Xephyr requires less set
up.
Replace "xdummy" with "xephyr" in comments and utility help
information. Update docs to show the new dependency.
fixes#1367
Since i3 honors the “Globally Active Input” focus model, we need to
explicitly state that we are not using that in our testcases :).
This requires X11::XCB from git to work (commit
71b25dcaafc509e710b8fd7de20c97ac3549fc39).
The suppression file makes valgrind output more readable by hiding
reports of memory leaks for GObject-related initialization functions in
Pango and Cairo.
Tests may disturb the pointer in their normal operation that may lead to
unexpected results in later tests using that display. Reset the pointer
before a test begins to (0, 0) to save test developers from related
"gotchas" and reduce multi-monitor test boilerplate.
This change has two implications:
1) tree_render() will now be called precisely once for input which consists of
multiple commands (like "focus left; focus right"). Also, the caller of
parse_command() has to call it. This makes us able to fix tickets such as
ticket #608 (where multiple tree_render() calls are noticable).
2) The output of a command is now a JSON array of return values of the
individual subcommands. In the case of "focus left; focus right", this is:
[{"success":true}, {"success":true}]
While this is incompatible with what i3 returned before, the return value of
commands was undocumented and therefore not subject to our API stability.
This behavior can be avoided by passing dont_create_temp_dir => 1 to
launch_with_config (or activate_i3).
This commit fixes t/159-socketpaths.t being flaky on non-systemd computers.