This reverts commit 55bf6b5046.
This accidentally removed things that should have stayed - libseat
can still use the logind API, even if weston doesn't directly use
it.
Note that the logind-launcher does not actually build anymore
because breaking changes landed before this revert.
Since we're removing it again right away, I've not taken care to
fix that.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This has been deprecated and non-default for a full release cycle, so
we're going to remove it now.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Now that we've concluded the Xwayland/fontconfig stuff, we don't
actually need a per-test wrapper; we can just set the options globally.
It turns out that we don't need to set the options at all anyway, since
the previous commit adds the LSan suppressions to all test runs, and
LSan is enabled by default, so we can just bin it.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Debian bookworm needs a newer version of Mesa to build against LLVM 15.
Upgrade Mesa and the kernel whilst we're at it, just to make sure that
things keep working.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Newer versions of Debian make you pass --break-system-packages to pip in
order for it to install packages. Since we do want to keep using pip for
controlled versions rather than the distribution packages, add this
flag.
Signed-off-by: Daniel Stone <daniels@collabora.com>
In preparation of turning mem leak detection on in CI, this patch adds
LSAN_OPTIONS to be able to pass the suppression file.
This *does not* turn the mem leak detection on yet, as we still
need some additional mem leak fixes.
This removes fast unwind set to zero as well, as that will add a massive
runtime penalty to some of our tests, and we'll no longer need it as
we've included the entire libfontconfig as a mem leak source in the
suppression file.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
As we can't really use `cleanup_after_cairo()` in our headless backend,
add more leak suppression entry, found while running the entire
test suite.
FcConfigSubstituteWithPat was already added (which seems to be main
source) but found a couple of more while running the entire suite.
The issue is that we need to set fast unwind to zero in order track
those leaks but that would result into some massive runtime penalty and
we get into the issue of timing out some of the tests.
So rather than doing that, just add the entire libconfig library and be
done with it. With it, this removes any pango/cairo former symbols as
that seems to catch all other leaks as well.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
We want to install all dependencies ourselves to know exactly what we
get.
I accidentally got some wraps built when I did not expect so.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This patch introduces a small library wrapper around XCB to be used in
Xwayland tests.
It's being designed such that we do not advance without accounting for
all X11 events when changing the window state. It adds a fence that
waits for all events to be processed, and only after all the events have
been accounted for, to proceed further, resuming execution of the
tests.
This works by keeping a tentative_state list for the client and a
window state that gets applied when the event we waited for has been
received.
This is useful in test clients, which could verify at the end after
receiving all events that the correct state has been applied. Acts as a
way to verify that the we never get or have a different state than the
one we expect.
With it, this converts test-xwayland to using libxcb (together with
xcb-cursor-dev) rather than using Xlib, and with it it removes any Xlib
dependency we might have in the tests.
This only adds support for map/unmap/create/destroy/property notify.
A follow-up would be to expand this library to track window movement
and resizing.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
It turns out we no longer have stdout/stderr in CI for the
tests. As 1.0.0 is the latest stable version for meson use that
to bring back our test messages.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Prepare for bumping the Meson requirement in meson.build to 0.63.0,
adding support for per-subproject compiler options to allow building
aml and neatvnc as subprojects.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Since aml and neatvnc are not packaged yet, build them from source and
install them into the container image, to prepare for building the VNC
backend.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
This protocol allows clients to create single-pixel RGBA buffers. Now
that we have proper support for these buffers internally within Weston,
we can expose them to clients.
This bumps the build container version, as we now depend on
wayland-protocols v1.26.
Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is truly horrible.
We want to run ASan with leak checking enabled in CI so we can catch
memory leaks before they're introduced. This works well with Pixman, and
with NIR-only drivers like iris or Panfrost.
But when we run under llvmpipe - which we do under CI - we start failing
because:
- Mesa pulls in llvmpipe via dlopen
- llvmpipe pulls in LLVM itself via DT_NEEDED
- initialising LLVM's global type/etc systems performs thread-local
allocations
- llvmpipe can't free those allocations since the application might
also be using LLVM
- Weston stops using GL and destroys all GL objects, leading to Mesa
unloading llvmpipe like it should
- with everything disappearing from the process's vmap, ASan can no
longer keep track of still-reachable pointers
- tests fail because LLVM is 'leaking'
Usually, an alternative is to LD_PRELOAD a shim which overrides
dlclose() to be a no-op. This is not usable here, because when
$LD_PRELOAD is not empty and ASan is not first in it, ASan immediately
errors out. Prepending ASan doesn't work, because we run our tests
through Meson (which also invokes Ninja), leading to LSan exploding
over CPython and Ninja, which is not what we're interested in.
It would be possible to inject _both_ ASan and a dlclose-does-nothing
shim DSO into the LD_PRELOAD environment for every test, but that seems
even worse, especially as Meson strongly discourages globbing for random
files in the root.
So, here we are, doing what we can: finding where swrast_dri.so (aka
llvmpipe) lives, stashing that in an environment variable, and
deliberately leaking a dlopen handle which we never close to ensure that
neither llvmpipe nor LLVM leave our process's address space before we
exit.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Unfortunately just adding suppressions isn't enough; the build of Expat
we have in our CI system does not have frame pointers, so ASan's fast
unwinder can't see through it. This means that the suppressions we've
added won't be taken into account.
For now, disable the fast unwinder for the Xwayland test only. Disabling
it globally is not practical as it massively increases the per-test
runtime, so here (to avoid polluting the build system), we use a
per-test wrapper to selectively choose the unwinder.
Signed-off-by: Daniel Stone <daniels@collabora.com>
For some reason, the Debian CI setup leaks fontconfig allocations in a
way which it does not for me on Fedora. On the assumption that this has
been fixed between our older CI Debian and Fedora 36, suppress the leak
warning, because we do already call FcFini() which should free it.
Signed-off-by: Daniel Stone <daniels@collabora.com>
CLASS_DIAGRAM has been obsolete in newer version of doxygen, and
it's enabled if HAVE_DOT and CLASS_GRAPH are set.
This increase DOT_GRAPH_MAX_NODES to avoid dot complaning,
and include dot/graphviz for doxygen.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Pango, Cairo, and fontconfig, all want to leave thread-global data
hanging around in order to maintain a cache. Try to clean up as much of
it as we possibly can on exit, apart from the Pango language string
which appears to be unfreeable, so has been added to LSan suppressions.
Signed-off-by: Daniel Stone <daniels@collabora.com>
libdrm with version 2.4.108 provides new functionality for parsing
IN_FORMATS blobs. Weston can make use of it and avoid implementing
its own logic. At present CI uses Debian 11 (bullseye) which comes
with an older version (2.4.104), so we build it from source.
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Moving forward we're going to be supporting libseat and logind as our
only launchers. We're doing this to reduce our maintenance burden,
and security impact.
Libseat supports all our existing use cases, and seatd can replace
weston-launch so we no longer have to carry a setuid-root program.
This patch removes weston-launch, and launcher-direct, leaving only
libseat and logind.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Add VGEM to the Linux image that runs in the CI. There are tests that we
plan to add in the future that need this.
This brings a complication, as we already have VKMS in the image. The
order in which DRM devices are loaded is not always the same, so the
node they receive is non-deterministic. Until now we were sure that VKMS
(the virtual device we use to run the DRM-backend tests in the CI) would
be in "/dev/dri/card0", but now we can't be sure. To deal with this
problem we find the node of each device using a one-liner shell script.
This commit also updates the documentation section that describes
specificities of DRM-backend tests in our test suite.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
These formats are useful because they are often easier to produce
on CPU than half-float formats, and abgr16161616 has both >= 10bpc
color channels and adequate alpha, unlike abgr2101010.
The 16-bpc textures created from buffers with these formats require
the GL_EXT_texture_norm16 extension.
As WL_SHM_FORMAT_ABGR16161616 was introduced in libwayland 1.20,
update Weston's build requirements and CI.
The formats also needed to be registered in the pixel format table,
and defined in a fallback path if recent libdrm is not available.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
This was previously introduced with commit '.gitlab.ci: Enable debug for
libsteat and for the DRM backend' in order to figure out another CI
issue we were seeing.
Unfortunatelly, not keeping the return value after the tests ran it
would silently make the entire CI succeed when it should actually fail.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
As the drm-smoke test randomly reports having the connector disabled,
and with it libseat reports setMaster errors, this enables DRM backend
debug messages for the kernel, and for libseat in an attempt to
track down the issue, whenever it might happen again.
These are pretty harmless, in terms of data being generated as we only
have a single DRM test using VKMS, and the libseat debug message aren't
that verbose, so we're safe keeping them for the time being.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Bump the wayland-protocol dependency version in order to include dma-buf
feedback, whose support in Weston is added in the next commits.
Also, as we need the newer EGL extension EGL_EXT_device_drm_render_node
to add the support for dma-buf feedback, bump the Mesa dependency
version as well.
It also includes some minor changes in order to keep build-deps.sh more
consistent.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Now Debian 11 (Bullseye) has been released, shift our CI builds to using
that instead of the older Buster.
Due to dependency-chain changes, we have to install a lot more packages
explicitly and retain more at runtime. This is exacerbated by pkg-config
now requiring the entire chain to be installed, not just the immediate
dependencies.
Our documentation toolchain also gets bumped to a higher version to deal
with Doxygen changes.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Older kernels cannot be built and booted with GCC 10+, as included in
Debian bullseye, due to unfortunate stack-canary issues:
https://lore.kernel.org/lkml/20200314164451.346497-1-slyfox@gentoo.org/T/
Upgrade to the last-released kernel, 5.14, to fix this.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Instead of manually waiting for the seatd socket to come up, use
seatd-launch.
Add /usr/local/bin to PATH to avoid having to specify the whole
path to seatd-launch.
Signed-off-by: Simon Ser <contact@emersion.fr>
This upgrades seatd to the latest version.
Examples are disabled by default. Man pages are already disabled
by auto_features=disabled. Other build options have been renamed.
Signed-off-by: Simon Ser <contact@emersion.fr>
Remove the following warning:
WARNING: 'make kvmconfig' will be removed after Linux 5.10
Please use 'make kvm_guest.config' instead.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Build a kernel for AArch64 and run it under virtme just like we do for
x86-64.
This requires adding support for the AArch64 defconfig variant, and
accommodating for the fact that it builds DRM as a module by default
rather than built in. The virtme branch we are using has also been
rebased on top of newer virtme upstream which unbreaks AArch64.
Signed-off-by: Daniel Stone <daniels@collabora.com>
This only runs a single build job, to build without GL and not run any
tests, as KVM support is not yet included.
Signed-off-by: Daniel Stone <daniels@collabora.com>
0.57.0 has a bug where the whole test harness crashes when using TAP and
failing tests, cf. https://github.com/mesonbuild/meson/pull/8385
Signed-off-by: Daniel Stone <daniels@collabora.com>
When we build our base-OS container, we run debian-install.sh to install
packages and compile our build dependencies. Since the latter is mostly
OS-independent, split debian-install.sh into two scripts: one to install
and cleanup packages, and another just to compile stuff.
Signed-off-by: Daniel Stone <daniels@collabora.com>