- 11 Feb, 2020 2 commits
-
-
Ezequiel Garcia authored
Signed-off-by:
Ezequiel Garcia <ezequiel@collabora.com>
-
Ezequiel Garcia authored
Signed-off-by:
Ezequiel Garcia <ezequiel@collabora.com>
-
- 10 Feb, 2020 9 commits
-
-
Ezequiel Garcia authored
Signed-off-by:
Ezequiel Garcia <ezequiel@collabora.com>
-
Ezequiel Garcia authored
Signed-off-by:
Ezequiel Garcia <ezequiel@collabora.com>
-
Ezequiel Garcia authored
Signed-off-by:
Ezequiel Garcia <ezequiel@collabora.com>
-
Leandro Ribeiro authored
Make stream_destroy() use weston_log_subscriber_release(). This avoids code duplication and allow us to destroy weston_log_subscriber_get_only_subscription(), since it's being used only in this case and it's internal. Calls for weson_log_subscriber_release() leads to weston_log_debug_wayland_to_destroy(), which should not send an error event when the stream has already been closed. Also, stream_destroy() shouldn't lead to an event error, as it is a wl_resource destroy handler. So close the stream before calling weston_log_subscriber_release() in stream_destroy() Signed-off-by:
Leandro Ribeiro <leandrohr@riseup.net>
-
Leandro Ribeiro authored
Before commit "weston-log: destroy subscriptions with destruction of subscribers", we had to destroy subscribers before the log context. Currently there's no required order, both are valid. But since we've created log context before the subscribers, we can destroy it after them. This is a style change and also a prove that now this order is valid as well. Signed-off-by:
Leandro Ribeiro <leandrohr@riseup.net>
-
Leandro Ribeiro authored
Both weston_log_scope_destroy() and weston_log_subscriber_release() have calls for destroy_subscription(). We can move this call to weston_log_subscription_destroy() without losing anything and avoiding repetition. Signed-off-by:
Leandro Ribeiro <leandrohr@riseup.net>
-
Leandro Ribeiro authored
The subscription is directly related to both the log scope and the subscriber. It makes no sense to destroy one of them and keep the subscriptions living. We only had code to destroy subscription with the destruction of log scopes. Add code to destroy subscriptions with destruction of subscribers. Signed-off-by:
Leandro Ribeiro <leandrohr@riseup.net>
-
Leandro Ribeiro authored
Log subscriber API is not type-safe. File and flight recorder subscribers are created with functions that return weston_log_subscriber objects. But there's a problem: to destroy these objects you have to call the right function for each type of subscriber, and a user calling the wrong destroy function wouldn't get a warning. Merge functions that destroy different types of subscribers, making the log subscriber API type-safe. Signed-off-by:
Leandro Ribeiro <leandrohr@riseup.net>
-
Leandro Ribeiro authored
weston_log_subscriber has a member named destroy. There are other structs (weston_output, for instance) that have this member, and by convention it is a pointer to a function that destroys the struct. In weston_log_subscriber it is being used to destroy subscriptions of the debug protocol, and not the subscriber, so this name is misleading. Rename it to destroy_subscription. Signed-off-by:
Leandro Ribeiro <leandrohr@riseup.net>
-
- 06 Feb, 2020 1 commit
-
-
Philipp Zabel authored
The cms-static, desktop-shell, hmi-controller, ivi-shell, and screen-share modules use symbols from libexec_weston, e.g.: $ ldd /usr/lib/x86_64-linux-gnu/weston/desktop-shell.so | grep "not found" libexec_weston.so.0 => not found Loading these modules from weston happens to work because the weston executable itself links against libexec_weston, and has an rpath set. Still, these modules depend on a library in a non-standard location. Adding an rpath could help static checkers to make sure all shared objects' dependencies are present. Signed-off-by:
Philipp Zabel <p.zabel@pengutronix.de>
-
- 05 Feb, 2020 6 commits
-
-
Pekka Paalanen authored
This adds the necessary fuzz to image matching to let GL-renderer pass. The difference is due to rounding. weston-test-desktop-shell.c uses weston_surface_set_color(dts->background_surface, 0.16, 0.32, 0.48, 1.); to set the background color. Pixman-renderer will truncate those to uint8, but GL-renderer seems to round instead, which causes the +1 in background color channel values. 0.16 * 255 = 40.8 0.32 * 255 = 81.6 0.48 * 255 = 122.4 Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Because of https://gitlab.freedesktop.org/mesa/mesa/issues/2219 it would crash, so disable GL-renderer. https://gitlab.freedesktop.org/wayland/weston/issues/358 shall revert this. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
This shall be used by CI due to https://gitlab.freedesktop.org/mesa/mesa/issues/2219 It defaults to true, meaning that people by default will be running the GL-renderer tests. It works fine on hardware drivers, just not llvmpipe. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
The fuzzy range will be used with GL-renderer testing, as it may produce slightly different images than Pixman-renderer yet still correct results. Such allowed differences are due to different rounding. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
weston_primary_flight_recorder_ring_buffer needs to be cleared on destruction of the subscriber it was assigned from so that a compositor and be re-executed in-process (static variables do not get re-initialized automatically). This will be used by the test harness when it will execute wet_main() multiple times in the same process. Otherwise it would hit the assert in weston_log_subscriber_create_flight_rec(). Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Sebastian Wick authored
The initial version of os_ro_anonymous_file missed two guards around the seal logic which leads to a compilation error on older systems. Also make the check for a read-only file symmetric in os_ro_anonymous_file_get_fd and os_ro_anonymous_file_put_fd. Signed-off-by:
Sebastian Wick <sebastian@sebastianwick.net>
-
- 04 Feb, 2020 2 commits
-
-
Guillaume Champagne authored
Releases touch devices and seat if they were allocated, clean up the layers and free the weston_test structure. Signed-off-by:
Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
Guillaume Champagne authored
`no_outputs` is declared on the stack and left uninitialized if no weston option changing its value is provided. Signed-off-by:
Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
- 03 Feb, 2020 2 commits
-
-
Daniel Stone authored
If gl-renderer fails its initialisation, we return to compositor teardown, which will try to free the renderer if ec->renderer was set. This is unfortunate when we've already torn it down whilst failing gl-renderer init, so just clear the renderer member so we don't try to tear down twice. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reported-by:
Emil Velikov <emil.velikov@collabora.com>
-
Daniel Stone authored
If we can't compile our shaders, there's no point trying to link them. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
- 02 Feb, 2020 1 commit
-
-
James Hilliard authored
Fixes: ../shared/os-compatibility.c:273:25: error: ‘PROT_READ’ undeclared (first use in this function); did you mean ‘LOCK_READ’? map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, file->fd, 0); ^~~~~~~~~ LOCK_READ Signed-off-by:
James Hilliard <james.hilliard1@gmail.com>
-
- 30 Jan, 2020 17 commits
-
-
Stefan Agner authored
When using weston-launch launcher deactivating the VT is sometimes racy and leads to Weston still being displayed. The launcher-direct.c backend makes sure that the session signal is emitted first, then DRM master is dropped and finally the VT switch is acknowledged via VT_RELDISP. However, in the weston-launch case the session signal is emitted via a socket message to the weston process, which might get handled a bit later. This leads to dropping DRM master and acknowledging the VT switch prematurely. Add a socket message which allows weston to notify weston-launch that the signal has been emitted and deactivating can be proceeded. Signed-off-by:
Stefan Agner <stefan@agner.ch> Reviewed-by:
Emil Velikov <emil.velikov@collabora.com>
-
Stefan Agner authored
Create a separate function handling the send loop. This allows to reuse the same code later on. Signed-off-by:
Stefan Agner <stefan@agner.ch>
-
Stefan Agner authored
On weston-launch exit we see errors such as: failed to restore keyboard mode: Invalid argument failed to set KD_TEXT mode on tty: Invalid argument This has been resolved by making sure the tty file descriptor does not get closed. However, the ioctrl's KDSKBMODE/KDSETMODE and VT_SETMODE still fail with -EIO: failed to restore keyboard mode: Input/output error failed to set KD_TEXT mode on tty: Input/output error It turns out the reason for this lies in some very particular behavior of the kernel, the separation of weston-launch/weston and the fact that we restore the tty only after the weston process quits: When the controlling process for a TTY exits, all open file descriptors for that TTY are put in a hung-up state! For more details see this systemd-logind issue: https://github.com/systemd/systemd/issues/989 We can work around by reopening the particular TTY. This allows to properly restore the TTY settings such that a successive VT switch will show text terminals fine again. Signed-off-by:
Stefan Agner <stefan@agner.ch> Reviewed-by:
Emil Velikov <emil.velikov@collabora.com>
-
Stefan Agner authored
Since weston-launch is a setuid-root program we should be extra careful: Check for a potential string trunction. Move the check in a separate function and return with error in case trunction has happened. Signed-off-by:
Stefan Agner <stefan@agner.ch>
-
Stefan Agner authored
Currently weston-launch does not activate the VT when opening the terminal directly (e.g. using --tty=/dev/tty7). Weston takes full control over the terminal by switching it to graphical mode etc. However, the old VT stays active as can be seen when looking at sysfs: # cat /sys/class/tty/tty0/active tty1 Always switch to the new VT to make sure the correct VT is active. This aligns with how TTY setup is implemented in launcher-direct.c. Signed-off-by:
Stefan Agner <stefan@agner.ch> Reviewed-by:
Emil Velikov <emil.velikov@collabora.com>
-
Stefan Agner authored
Add newline character at the end of the error message to make sure we get a new line after this error has been printed. Fixes: a1450a8a ("make error() portable") Signed-off-by:
Stefan Agner <stefan@agner.ch>
-
Stefan Agner authored
In case an user is given but no tty, the code opens tty0 to allocate a new tty. With that ttynr is known. In case a tty name is given the user must be given too. In this case we later recover the ttynr by using stat on the file tty file descriptor which allows as to find the ttynr by looking at the devices minor number. However, the third case, when no user and no tty name is given, we do not get the ttynr. This hasn't been a problem in practise since ttynr has not been used. However, it makes sense to get the ttynr always for consistency. Also upcomming fixes will start to make use of ttynr. Fixes: 636156d5 ("weston-launch: Don't start new session unless -u is given") Signed-off-by:
Stefan Agner <stefan@agner.ch>
-
Stefan Agner authored
The tty file descriptor is used in signal handling (when switching VT via SIGUSR1/SIGUSR2 for the VT_RELDISP ioctrl) and in quit() when weston-launch exits for the KDSKBMUTE/KDSKBMODE/KDSETMODE/VT_SETMODE ioctrls. This fixes VT switching when using weston-launch from a non-VT shell (e.g. ssh or from within a container). Signed-off-by:
Stefan Agner <stefan@agner.ch>
-
Pekka Paalanen authored
This test category is empty, so it and all the supporting code can go. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Move xwayland test to the new harness. This is the only test that can actually skip. It does it by exit(77) and that is fine, because there is only one test case in the file so far. To get rid of the exit() calls we need to return a value from the TEST() function but that is a big surgery for another time. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Moved to the new test harness. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
This migrates all the client tests that have nothing special in them to the new test harness. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
The devices test was actually using the defaults instead of weston-test-desktop-shell in meson.build, so this patch keeps it that way. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
All plugin tests have been converted to the new harness, so the old definition can be removed. The one remaining test surface-screenshot is a manual test, the plugin only installs a debug key binding. Hence it is open-coded as a normal plugin, not as a test. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
These are normal plugin tests, moved to the new harness. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Moving to the new test harness. Carrying the test ini file still just to keep it the same even though I accidentally noticed the test succeeds also with --no-config. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-