summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2024-10-10dix: unexport non-public functions from dixgrabs.h and document prototypesEnrico Weigelt, metux IT consult1-1/+1
* 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-10drop obsolete HAVE_DIX_CONFIG_HEnrico Weigelt, metux IT consult25-50/+0
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-09-01include: move private definitions out of input.hEnrico Weigelt, metux IT consult4-3/+9
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-08-31test: dix_input_valuator_masks(): use fixed array instead of VLAEnrico Weigelt, metux IT consult1-13/+12
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-07-26treewide: replace xnfstrdup() calls by XNFstrdup()Enrico Weigelt, metux IT consult2-10/+10
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-06-18os: drop SUN-DES-1 authenticationEnrico Weigelt, metux IT consult1-1/+1
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-04-30include: move private definitions out of exevents.hEnrico Weigelt, metux IT consult6-10/+18
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-30include: move private definitions out of extinit.hEnrico Weigelt, metux IT consult2-2/+2
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-30include: split out non-exported prototypes to dix_priv.hEnrico Weigelt, metux IT consult1-0/+1
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-16dix: unexport InitClient()Enrico Weigelt, metux IT consult2-0/+6
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-09test: fix the xi2 protocol swapping tests to actually workPeter Hutterer6-66/+94
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-01test: fix FTBS on missing xlib includes on NetBSDEnrico Weigelt, metux IT consult1-1/+1
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-01test: fix deprecated meson callsEnrico Weigelt, metux IT consult1-2/+2
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-03-22test: xi2: drop unused variableEnrico Weigelt, metux IT consult1-3/+1
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-22test: simple-xinit: add _X_NORETURNEnrico Weigelt, metux IT consult2-1/+4
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-11dix: unexport eventconvert.h functionsEnrico Weigelt, metux IT consult2-2/+5
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-09os: move out Format*() functionsEnrico Weigelt, metux IT consult1-0/+3
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-02-19xkb: drop defining XKBSRV_NEED_FILE_FUNCSEnrico Weigelt, metux IT consult1-1/+0
No need to define XKBSRV_NEED_FILE_FUNCS, for about 15 years now (since XKBsrv.h isn't used anymore), so drop it. Fixes: e5f002eddef1abe324033a3155f01d048536a48d Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-01-30test: use a dbg() macro for the test outputPeter Hutterer13-72/+83
Currently hardcoded to verbose = 0 until we have option parsing but meh.
2024-01-30test: specify non-negative log verbosity for the siglogging testPeter Hutterer1-32/+35
Less noise in the test output
2024-01-30test: switch the remaining wrapped functions to use the macrosPeter Hutterer6-69/+51
dixLookupWindow and dixLookupClient have a test-global default implementation because overriding that in ever test doesn't make sense.
2024-01-30test: make wrapping a function more genericPeter Hutterer10-81/+87
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-30test: switch the unit tests to something resembling a test suitePeter Hutterer26-234/+320
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-09test: drop the unncessary unit_defines from meson.buildPeter Hutterer1-3/+2
Let's set unit_c_args directly instead of having two variables for the same thing.
2024-01-09meson.build: re-enable the protocol unit testsPeter Hutterer1-1/+1
Accidentally disabled when the meson variables shifted around. Fixes d231ce2d9ce9644e77e8dbe8c5a23eeb11e85b55
2024-01-09test: speed up the XISelectEvents testPeter Hutterer1-1/+1
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-09Two whitespace fixesPeter Hutterer1-3/+3
2024-01-09test: fix the touch tests to no longer leakPeter Hutterer1-43/+67
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-09test: fix the xtest device test to show the dependencyPeter Hutterer1-28/+30
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-09test: fix various leaks in the testsPeter Hutterer5-1/+40
2024-01-08build: Switch to meson 0.56Olivier Fourdan1-4/+4
And replace the deprecated meson API accordingly. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-10-20glamor: mark tests fixed by this PRKonstantin1-7/+3
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-09tests: enable CI for both GLES2 and GLES3 variantsKonstantin3-103/+97
Signed-off-by: Konstantin <ria.freelander@gmail.com>
2023-10-09glamor: require GLES 2.0 on GL ES CIKonstantin2-5/+39
This will help us to catch GLES 2.0 only bugs. Signed-off-by: Konstantin <ria.freelander@gmail.com>
2023-10-09test: Skip Xwayland test early if PIGLIT_DIR / XTEST_DIR isn't setMichel Dänzer1-0/+12
No point starting weston and waiting for it to start up in that case.
2023-10-09test: Propagate Xwayland stdout/stderr output and exit statusMichel Dänzer1-1/+5
If waiting for weston to start times out. This should make it easier to diagnose issues.
2023-10-09test: Kill weston whenever shell exitsMichel Dänzer1-7/+6
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-09test: Wait only up to 5 seconds for weston to start upMichel Dänzer1-1/+1
This should be plenty even on CI, no need to wait for a whole minute if something goes wrong.
2023-09-27test: Xwayland doesn't start when another X server is runningJosé Expósito1-1/+1
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-04test: Use Xwayland instead of wayland/weston-infoJosé Expósito1-6/+1
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-03-22test: Use either wayland-info or weston-infoOlivier Fourdan1-1/+6
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-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith2-2/+2
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-01glamor: make use of GL_EXT_texture_format_BGRA8888Konstantin1-1/+0
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-01meson: add glamor gles2 testsKonstantin4-5/+287
Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emma Anholt <emma@anholt.net>
2022-09-02test: Exclude two XTS xsetfontpath testsMichel Dänzer3-0/+6
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-02test: Fix 'xephr' mis-spellingMichel Dänzer1-2/+2
2022-07-08xkb: rename xkb.h to xkb-procs.hPeter Hutterer1-1/+0
This header merely defines the various protocol request handlers, so let's rename it to something less generic and remove its include from all the files that don't actually need it (which is almost all of them). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2022-06-26tests: Fix build failure from missing micmap.cJeremy Huddleston Sequoia1-0/+2
FAILED: test/tests clang -o test/tests test/tests.p/.._mi_miinitext.c.o test/tests.p/fixes.c.o test/tests.p/input.c.o test/tests.p/list.c.o test/tests.p/misc.c.o test/tests.p/signal-logging.c.o test/tests.p/string.c.o test/tests.p/test_xkb.c.o test/tests.p/tests-common.c.o test/tests.p/tests.c.o test/tests.p/touch.c.o test/tests.p/xfree86.c.o test/tests.p/xtest.c.o test/tests.p/hashtabletest.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -fvisibility=hidden -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -Wl,-rpath,/opt/X11/lib mi/liblibxserver_mi.a dix/liblibxserver_dix.a composite/liblibxserver_composite.a damageext/liblibxserver_damageext.a dbe/liblibxserver_dbe.a randr/liblibxserver_randr.a miext/damage/liblibxserver_miext_damage.a render/liblibxserver_render.a present/liblibxserver_present.a Xext/liblibxserver_xext.a miext/sync/liblibxserver_miext_sync.a xfixes/liblibxserver_xfixes.a Xi/liblibxserver_xi.a xkb/liblibxserver_xkb.a record/liblibxserver_record.a os/liblibxserver_os.a os/liblibxlibc.a glx/liblibglxvnd.a hw/xfree86/common/libxorg_common.a hw/xfree86/loader/libxorg_loader.a hw/xfree86/ddc/libxorg_ddc.a hw/xfree86/xkb/libxorg_xkb.a hw/xfree86/i2c/libxorg_i2c.a hw/xfree86/modes/libxorg_modes.a hw/xfree86/os-support/libxorg_os_support.a hw/xfree86/parser/libxorg_parser.a hw/xfree86/ramdac/libxorg_ramdac.a fb/liblibxserver_fb.a Xext/liblibxserver_xext_vidmode.a dix/liblibxserver_main.a config/liblibxserver_config.a /opt/X11/lib/libpixman-1.dylib /opt/X11/lib/libxcvt.dylib /opt/X11/lib/libxkbfile.dylib /opt/X11/lib/libXfont2.dylib /opt/X11/lib/libXdmcp.dylib -lm /opt/X11/lib/libxshmfence.dylib -ldl -lpthread /opt/X11/lib/libXau.dylib /opt/X11/lib/libGL.dylib Undefined symbols for architecture x86_64: "_micmapScrPrivateKeyRec", referenced from: _DGAInstallCmap in libxorg_common.a(xf86DGA.c.o) _xf86HandleColormaps in libxorg_common.a(xf86cmap.c.o) _CMapInstallColormap in libxorg_common.a(xf86cmap.c.o) _CMapEnterVT in libxorg_common.a(xf86cmap.c.o) _CMapSwitchMode in libxorg_common.a(xf86cmap.c.o) _CMapSetDGAMode in libxorg_common.a(xf86cmap.c.o) _CMapChangeGamma in libxorg_common.a(xf86cmap.c.o) ... ld: symbol(s) not found for architecture x86_64 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2021-12-08test: #undef NDEBUG so assert is not compiled awayMatt Turner24-0/+72
2021-10-27Remove autotools supportPovilas Kanapickas2-210/+3
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>