Commit Graph

392 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult dd37cc4855 os: log: replace LogMessageVerbSigSafe() by LogMessageVerb()
Since LogMessageVerb() is now signal safe, we can use this one instead.
Leaving LogMessageVerbSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1691>
2025-02-06 23:35:27 +00:00
Enrico Weigelt, metux IT consult f8fc46cbbf include: drop now empty xkbfile.h
This (public) file isn't used by anybody outside Xserver tree
and doesn't contain anything useful anymore, so lets drop it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1729>
2025-02-06 22:45:25 +00:00
Enrico Weigelt, metux IT consult 4d053f22f3 Xi: drop swapping request length fields
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>
2025-02-06 22:28:51 +00:00
Enrico Weigelt, metux IT consult 5ac361cce9 mi: unexport mieqInit()
Not used by any drivers/modules so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1727>
2025-02-06 16:45:20 +02:00
Enrico Weigelt, metux IT consult 84be5b4e9c dix: unexport non-public functions from dixgrabs.h and document prototypes
* unexport functions from dixgrab.h, that aren't used by any driver/module.
* add paremeter names to prototypes
* add doxygen-style documentation for all the prototypes

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-10-10 13:50:57 +00:00
Enrico Weigelt, metux IT consult a917f6a8a8 drop obsolete HAVE_DIX_CONFIG_H
The symbol controls whether to include dix-config.h, and it's always set,
thus we don't need it (and dozens of ifdef's) anymore.

This commit only removes them from our own source files, where we can
guarantee that dix-config.h is present - leaving the (potentially exported)
headers untouched.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-10-10 13:38:31 +00:00
Enrico Weigelt, metux IT consult 2cec3cfbf1 include: move private definitions out of input.h
It's not good having the public server api headers clobbered with private
definitions, so cleaning them up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1354>
2024-09-01 17:59:23 +00:00
Enrico Weigelt, metux IT consult 1bea5ddfce test: dix_input_valuator_masks(): use fixed array instead of VLA
The array size is determined on compile time, so no need to use a vla
which always has the same size anyways.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1663>
2024-08-31 22:42:36 +00:00
Enrico Weigelt, metux IT consult dec57e5796 treewide: replace xnfstrdup() calls by XNFstrdup()
This has been nothing but an alias for two decades now (somewhere in R6.6),
so there doesn't seem to be any practical need for this indirection.

The macro still needs to remain, as long as (external) drivers still using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1529>
2024-07-26 23:41:34 +00:00
Enrico Weigelt, metux IT consult 71b207a2eb os: drop SUN-DES-1 authentication
DES isn't considered secure anymore for long time now, more and more platforms
dropping DES from their RPC implementations, and even the one where it came
from (Solaris) disabled it for a decade now. We have much better alternatives
(eg. passing creds via Unix socket for local connections, ssh tunneling,
MIT-MAGIC-COOKIE-1, ...), so it's unlikely anybody still really relying on it.

Therefore, sweep it out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1453>
2024-06-18 00:52:11 +00:00
Enrico Weigelt, metux IT consult eff7ccc11c include: move private definitions out of exevents.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to private header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult 33350ef8ff include: move private definitions out of extinit.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to extinit_priv.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult f17bc7e24d include: split out non-exported prototypes to dix_priv.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to dix-intern.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult dfdde27990 dix: unexport InitClient()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1379>
2024-04-16 00:53:28 +00:00
Peter Hutterer 11c92ffcf5 test: fix the xi2 protocol swapping tests to actually work
This tests override WriteToClient() with their own custom function to
check for validity. Unfortunately they also papered over bugs - to
compare values we had to swap back thus modifying the original reply.

This doesn't really have an effect on most reply handling but for those
with extra data it may affect how they are processed. Fix this by
copying the reply so any of the fields within that we swap is left
as-is and put some basic sanity checks in for the length we pass in.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1469>
2024-04-09 06:44:36 +00:00
Enrico Weigelt, metux IT consult e3d391b9c6 test: fix FTBS on missing xlib includes on NetBSD
When X11 isn't installed directly at /usr hierarchy (eg. NetBSD uses
/usr/X11R7/), build breaks:

../test/list.c:31:10: fatal error: X11/Xlib.h: No such file or directory
   31 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~

Needs explicitly dependency on libX11, so the include path is added.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1442>
2024-04-01 23:41:22 +00:00
Enrico Weigelt, metux IT consult c187c54086 test: fix deprecated meson calls
Fix meson warning:

> WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1448>
2024-04-01 23:22:31 +00:00
Enrico Weigelt, metux IT consult 4e53612347 test: xi2: drop unused variable
fix warning:

> ../test/xi2/protocol-eventconvert.c:276:9: warning: variable 'buttons' set but not used [-Wunused-but-set-variable]
>     int buttons, valuators;
>         ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1429>
2024-03-22 00:33:29 +00:00
Enrico Weigelt, metux IT consult f7a97a7ab0 test: simple-xinit: add _X_NORETURN
fix warning:

> ../test/simple-xinit.c:58:1: warning: function 'usage' could be declared with attribute 'noreturn' [-Wmissing-noreturn]

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1429>
2024-03-22 00:33:29 +00:00
Enrico Weigelt, metux IT consult 738edd3501 dix: unexport eventconvert.h functions
This header isn't installed, so no external modules could use the
functions declared there. Thus we can unexport it all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1358>
2024-03-11 12:26:44 +01:00
Enrico Weigelt, metux IT consult 02ba47f09d os: move out Format*() functions
Move out the Format*() functions to separate source and header.

These aren't exported, thus no module API change.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1312>
2024-03-09 17:34:51 +00:00
Enrico Weigelt, metux IT consult 374ee7acd7 xkb: drop defining XKBSRV_NEED_FILE_FUNCS
No need to define XKBSRV_NEED_FILE_FUNCS, for about 15 years now
(since XKBsrv.h isn't used anymore), so drop it.

Fixes: e5f002edde
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 00:44:15 +00:00
Peter Hutterer 9c7c470b12 test: use a dbg() macro for the test output
Currently hardcoded to verbose = 0 until we have option parsing but meh.
2024-01-30 00:15:10 +00:00
Peter Hutterer d178978ce2 test: specify non-negative log verbosity for the siglogging test
Less noise in the test output
2024-01-30 00:15:10 +00:00
Peter Hutterer 3c5eaedaf9 test: switch the remaining wrapped functions to use the macros
dixLookupWindow and dixLookupClient have a test-global default
implementation because overriding that in ever test doesn't make sense.
2024-01-30 00:15:10 +00:00
Peter Hutterer 7e9d167c9c test: make wrapping a function more generic
This cleans up some of the mess this code was in. Functions we need to
wrap can now have a standard implementation using WRAP_FUNCTION - that
macro declares the __real and __wrap functions and a wrapped_$func
global variable.

Tests can set that variable to their desired functions and it will be
then be called on demand.
2024-01-30 00:15:10 +00:00
Peter Hutterer 46b579e8d5 test: switch the unit tests to something resembling a test suite
The tests have inadvertent dependencies on each other so let's avoid
those by changing to a system that returns a null-terminated list of
test functions and our test runner iterates over those and forks off one
process per function.
2024-01-30 00:15:10 +00:00
Peter Hutterer 37ef3adaed test: drop the unncessary unit_defines from meson.build
Let's set unit_c_args directly instead of having two variables for the
same thing.
2024-01-09 09:49:54 +10:00
Peter Hutterer 79e3d44558 meson.build: re-enable the protocol unit tests
Accidentally disabled when the meson variables shifted around.

Fixes d231ce2d9c
2024-01-09 09:49:54 +10:00
Peter Hutterer 9f3b64f3e6 test: speed up the XISelectEvents test
It's fine to test up to 1000 masks but we don't need to test every
single value. Let's increase by a "random" increment to make this test
pass faster.
2024-01-09 09:49:54 +10:00
Peter Hutterer d0b0137a95 Two whitespace fixes 2024-01-09 09:49:54 +10:00
Peter Hutterer e44e9262df test: fix the touch tests to no longer leak
Instead of hardcoded TouchRec/ValuatorRec init the devices with the
matching functions and go from there. This allows us to clean them
up later, removing the various leaks that stop asan from being happy.
2024-01-09 09:49:54 +10:00
Peter Hutterer b6931f2f5f test: fix the xtest device test to show the dependency
These two tests were dependent on each other, the second test relied on
the xtest devices created in the first test. Let's move the bits that
are shared out into the main function instead to illustrate this better.

This lets us add a call to CloseDownDevices() that will remove the leaks
in this set of tests.
2024-01-09 09:49:54 +10:00
Peter Hutterer 2cee5fb36c test: fix various leaks in the tests 2024-01-09 09:49:54 +10:00
Olivier Fourdan 7fdef970c4 build: Switch to meson 0.56
And replace the deprecated meson API accordingly.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2024-01-08 10:38:05 +00:00
Konstantin d63d23bde8 glamor: mark tests fixed by this PR
This tests will pass after previous commit will be merged,
so, mark this tests now as PASS.

Signed-off-by: Konstantin <ria.freelander@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
2023-10-20 14:10:21 +03:00
Konstantin 6fa9da0431 tests: enable CI for both GLES2 and GLES3 variants
Signed-off-by: Konstantin <ria.freelander@gmail.com>
2023-10-09 17:25:28 +00:00
Konstantin 8adff2891f glamor: require GLES 2.0 on GL ES CI
This will help us to catch GLES 2.0 only bugs.

Signed-off-by: Konstantin <ria.freelander@gmail.com>
2023-10-09 17:25:28 +00:00
Michel Dänzer d5ef57f1ef test: Skip Xwayland test early if PIGLIT_DIR / XTEST_DIR isn't set
No point starting weston and waiting for it to start up in that case.
2023-10-09 14:22:19 +00:00
Michel Dänzer 129ec1cb84 test: Propagate Xwayland stdout/stderr output and exit status
If waiting for weston to start times out. This should make it easier
to diagnose issues.
2023-10-09 14:22:19 +00:00
Michel Dänzer e58203c1e2 test: Kill weston whenever shell exits
This script runs with -e, so if the timeout command returns a non-0
exit status (meaning the while loop timed out), the script exits
immediately as well.

This would leave weston running in the background, which resulted in
meson waiting for weston to terminate until hitting meson's own timeout.

Instead, explicitly kill weston whenever the shell exits. This results
in meson recording the test as failed immediately.

As a bonus, we can drop the special handling around run-piglit.sh.

v2:
* Use trap (José Expósito)
v3:
* Explicitly use bash, and document a bashism we rely on
  (Olivier Fourdan)
2023-10-09 14:22:19 +00:00
Michel Dänzer 3e938ed042 test: Wait only up to 5 seconds for weston to start up
This should be plenty even on CI, no need to wait for a whole minute if something
goes wrong.
2023-10-09 14:22:19 +00:00
José Expósito 722e464bff test: Xwayland doesn't start when another X server is running
When running the xserver:xwayland / XTS test in an environment where
an X server is running for :0, Xwayland fails to start with error:

    (EE)
    Fatal server error:
    (EE) Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.
    (EE)

And the `timeout` command fails instead of waiting for Weston to
initialize.

Add the `-displayfd` parameter to Xwayland to avoid this issue.

The `-displayfd` parameter lets Xwayland pick an unused display number,
avoiding the start up error when an X server is already active for :0,
the default display number.

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
2023-09-27 11:59:53 +02:00
José Expósito 8cce7f5d64 test: Use Xwayland instead of wayland/weston-info
When neither `wayland-info` nor `weston-info` are installed, the
`xwayland-piglit.sh` script will wait indefinitely for the compositor
to start.

Use `Xwayland -pogo` instead to wait until weston is initialized.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1536
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
2023-09-04 15:18:19 +00:00
Olivier Fourdan fc625fe172 test: Use either wayland-info or weston-info
weston-info has been deprecated for quite some time, whereas wayland-info
may not be available yet.

So we use either, depending on what's actually available.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-03-22 14:31:39 +01:00
Alan Coopersmith d6b20f5e36 Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25 09:40:41 -08:00
Konstantin 24cd5f34f8 glamor: make use of GL_EXT_texture_format_BGRA8888
For 24 and 32 bit depth pictures xserver uses PICT_x8r8g8b8 and PICT_a8r8g8b8 formats,
which must be backed with GL_BGRA format. It is present in OpenGL ES 2.0 only with
GL_EXT_texture_format_BGRA8888 extension. We require such extension in glamor_init,
so, why not to make use of it?
Fixes #1208
Fixes #1354

Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com>

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
2022-12-01 08:41:57 +00:00
Konstantin ddcd4846d1 meson: add glamor gles2 tests
Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com>

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
2022-12-01 08:41:57 +00:00
Michel Dänzer 861f7e9d92 test: Exclude two XTS xsetfontpath tests
They start failing after rebuilding the docker image. It's not clear
why, but looks like it's triggered by changes in Debian bullseye.
2022-09-02 14:49:08 +02:00
Michel Dänzer f9d57d6bcd test: Fix 'xephr' mis-spelling 2022-09-02 14:49:08 +02:00