wayland/tests
Matt Hoosier 1b6521e695 client: Allow absolute paths in WAYLAND_DISPLAY
In order to support system compositor instances, it is necessary to
allow clients' wl_display_connect() to find the compositor's listening
socket somewhere outside of XDG_RUNTIME_DIR. For a full account, see
the discussion beginning here:

https://lists.freedesktop.org/archives/wayland-devel/2017-November/035664.html

This change adjusts the client-side connection logic so that, if
WAYLAND_DISPLAY is formatted as an absolute pathname, the socket
connection attempt is made to just $WAYLAND_DISPLAY rather than
usual user-private location $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.

This change is based on Davide Bettio's submission of the same concept
at:

https://lists.freedesktop.org/archives/wayland-devel/2015-August/023838.html.

v4 changes:

* Improved internal comments and some boundary-condition
  error checks in test case.
* Refer to compositor as "Wayland server" rather than "Wayland
  display" in wl_display_connect() doxygen comments.
* Remove redundant descriptions of parameter-interpretation
  mechanics from wl_display_connect() manpage. Reworked things
  to make it clear that 'name' and $WAYLAND_DISLAY are each
  capable of encoding absolute server socket paths.
* Remove callout to reference implementation behavior in protocol
  documented. In its place there is now a simple statement that
  implementations can optionally support absolute socket paths.

v3 changes:

* Added test case.
* Clarified documentation to note that 'name' parameter to wl_display_connect()
  can also be an absolute path.

v2 changes:

* Added backward incompatibility note to wl_display_connect() manpage.
* Rephased wl_display_connect() manpage changes to precisely match actual
  changed behavior.
* Added mention of new absolute path behavior in wl_display_connect()
  doxygen comments.
* Mentioned new absolute path interpretation of WAYLAND_DISPLAY in
  protocol documentation.

Signed-off-by: Matt Hoosier <matt.hoosier@gmail.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-12-11 10:03:59 +02:00
..
data protocol: add axis_source.wheel_tilt 2017-01-24 12:00:19 +02:00
array-test.c array-test: Include wayland-util.h and simplify init test 2016-10-18 12:24:53 +03:00
client-test.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
compositor-introspection-test.c Add a resource creation signal 2016-08-12 11:43:02 +03:00
connection-test.c connection-test: fix assert 2017-03-16 14:10:47 +02:00
cpp-compile-test.cpp tests: C++ compilation test 2015-01-27 11:17:42 +00:00
display-test.c tests: Add a test for global filter 2017-01-25 12:19:30 +02:00
event-loop-test.c (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
exec-fd-leak-checker.c tests: Require base 10 for the string specifying the number of open fd's 2016-07-11 13:32:15 -07:00
fixed-benchmark.c fixed-benchmark: remove unused arguments in main 2015-07-10 17:17:46 -07:00
fixed-test.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
headers-protocol-core-test.c tests: Check for client/server-core.h inclusion 2016-05-19 14:31:18 -07:00
headers-protocol-test.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
headers-test.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
interface-test.c tests: Test wl_interface_equal 2016-11-18 16:21:19 +02:00
list-test.c tests: Add test for wl_list_length 2016-09-05 15:10:43 +03:00
map-test.c (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
message-test.c tests: Add nullable check to wl_message_count_arrays 2016-11-18 16:59:23 +02:00
newsignal-test.c server: add a safer signal type and port wl_display to it 2017-01-25 13:46:23 +02:00
os-wrappers-test.c (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
protocol-logger-test.c Add API to install protocol loggers on the server wl_display 2016-08-12 11:59:46 +03:00
queue-test.c (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
resources-test.c (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
sanity-test.c tests: Pass argument to client main 2016-01-16 16:37:37 +08:00
scanner-test.sh tests: add scanner tests 2016-11-23 10:18:44 +02:00
signal-test.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
socket-test.c client: Allow absolute paths in WAYLAND_DISPLAY 2017-12-11 10:03:59 +02:00
test-compositor.c (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
test-compositor.h (multiple): Include stdint.h 2016-07-25 18:39:32 -07:00
test-helpers.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-12 15:31:24 -07:00
test-runner.c tests: Use unique XDG_RUNTIME_DIR 2016-11-10 13:30:28 +02:00
test-runner.h tests: Mark tests used so they don’t get removed at link time 2017-12-01 16:56:02 +00:00