summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2017-08-11travis: Set prefix to /usr, so we find xkbcomp.Eric Anholt1-1/+1
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-06-27Move statically linked xorgxkb files from dixmods to a separate directoryJon TURNEY1-1/+1
[ajax: Fixed test/Makefile.am as well] Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-06-13travis: Add a build script for Travis CI.Eric Anholt1-0/+12
This currently does a meson build using a docker image I've prepared. The Dockerfile source is at: https://github.com/anholt/xserver-travis Docker proved to be necessary to cut the build time per Travis push. If some day we end up using meson in more of the X stack, we may be able to move more dependencies out of the docker image and into the CI build (putting the I in CI). Until then, we'll have to do docker image rebuilds when dependencies are added/updated. To enable Travis CI on your github repository, see the first two steps of the docs at: https://docs.travis-ci.com/user/getting-started/ Once you do that, pushing branches to your github repo will trigger builds, which will send you email if they fail. Current build status can be veiewed your account on travis-ci.org: https://travis-ci.org/anholt/xserver
2017-04-25Remove support for unaligned swaps.Eric Anholt1-19/+6
The previous misc.h code went out of its way to allow swapping of unaligned pointers to values. However, the members of an X request/response are always naturally aligned within the struct, and the buffers containing a request/response will also be aligned to at least 8 bytes, so we can just drop it. text data bss dec hex filename before: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg after: 2214919 51552 132016 2398487 249917 hw/xfree86/Xorg Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-25Add unit tests for the byte swapping macros.Eric Anholt1-0/+43
Peter noted a weirdness in my new bswap code, which could use some tests to justify it. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24Mark test_data static in Xinput protocol tests to avoid clashesAlan Coopersmith3-3/+3
Fixes warning from Solaris linker: ld: warning: symbol 'test_data' has differing sizes: (file tests-protocol-xigetselectedevents.o value=0x418; file tests-protocol-xigetclientpointer.o value=0x18); tests-protocol-xigetselectedevents.o definition taken Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-14test: Fix distcheck failuresAdam Jackson1-2/+5
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-09test: Use correct signature for XISetEventMask wrapperJon Turney2-7/+7
This looks like it's always been wrong, but didn't matter before the single test binary changes as the wrapper was only in place for tests which didn't care about it's effects, so didn't forward to the real implementation. (see the changes to protocol-xiselectevents.c in 773fc07e) This fixes the protocol_xigetselectedevents_test for me. I'm a bit surprised that passes for anyone at the moment. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-23tests: Fix guards for ld -wrapMihail Konev2-98/+46
Fixes XQuartz build. Regressed-in: 23f6dbc96e47be6cbeed78cc9ef303987c3e29a9 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-25tests: shuffle around the linking order to please GNU ldMartin Peres1-1/+5
Classic GNU ld resolves symbol dependencies only forward, while GOLD seems to work regardless of the specified library order. Suggested-by: Eero Tamminen <eero.t.tamminen@intel.com> Reviewed-by: Mihail Konev <k.mvc@ya.ru> Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
2017-01-16tests: Fix typoMihail Konev1-1/+0
Remove redundrant/incorrect automake assignment. Buglink: https://lists.x.org/archives/xorg-devel/2017-January/052320.html Reported-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Mihail Konev <k.mvc@ya.ru> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-01-16tests: Fix without-dtrace buildGiuseppe Bilotta1-0/+4
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Mihail Konev <k.mvc@ya.ru> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-16Revert "tests: fix --disable-xorg build"Adam Jackson2-31/+85
Pushed the wrong thing. This reverts commit 730fd8c05f56da21894691bbd2e7ff37f67b45f4.
2017-01-16tests: fix --disable-xorg buildMihail Konev2-85/+31
2017-01-12tests: Remove obsolete libxservertest.laMihail Konev1-25/+28
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12tests: Move test/{xi1,xi2}/tests to test/Mihail Konev8-137/+78
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12tests: Convert test/ to single binaryMihail Konev16-49/+100
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12tests: Convert test/xi2/ to single binaryMihail Konev16-73/+105
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12tests: Convert test/xi1/ to single binaryMihail Konev9-17/+89
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12tests: Refactor wraps into protocol-common.cMihail Konev15-136/+70
Part of refactoring the tests into a single binary, to make partial rebuild slightly faster and less verbose. Prepares for joining test/xi2/protocol-* into a single binary. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12tests: Avoid libtool messageMihail Konev2-4/+2
The "copying selected object files" message appears as some source files have the same name, and some objects are included twice. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2016-12-07test: fix distributing scriptsPekka Paalanen1-1/+2
Fix the following error on 'make distcheck': make[6]: *** No rule to make target 'scripts/xvfb-piglit.sh', needed by 'scripts/xvfb-piglit.sh.log'. Stop. make[6]: Leaving directory '/home/pq/git/xserver/xorg-server-1.19.99.1/_build/sub/test' Makefile:1367: recipe for target 'check-TESTS' failed The setup to trigger this is: $ ./configure --prefix=/home/pq/local --disable-docs --disable-devel-docs --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest --disable-xquartz --disable-xwin --enable-debug SCRIPT_TESTS is populated conditionally, but we should distribute the scripts in any case. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-11-19test: Fix stray Makefile reference to removed os testRhys Kidd1-1/+0
Fixes the following warning: test/Makefile.am:69: warning: variable 'os_LDADD' is defined but no program or test/Makefile.am:69: library has 'os' as canonical name (possible typo) Introduced upon the removal of test/os in: commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 8 14:39:46 2015 -0800 Remove SIGIO support for input [v5] This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-10-05test: Use $XSERVER_BUILDDIR for Xvfb executable pathMichel Dänzer1-1/+1
Fixes make check with out-of-tree builds. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Re-enable a couple of GetImage testsAdam Jackson1-3/+0
Fixed in 6c6f09aac. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Run xts against Xephyr -glamor when presentEric Anholt2-0/+22
v2: Drop x8r8g8b8 skip, now that it's fixed. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Switch our testing X server to being spawned with simple-xinitEric Anholt1-1/+1
Once I introduced a second X server being tested, I found that startx hit races in choosing a display. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Update piglit HTML even when tests all passEric Anholt1-3/+3
I was confused by the behavior I'd written before. keithp and mattst88 responded with shock that I would have made it so surprising, as well. v2: Point to index.html instead of problems.html, which won't exist if we had no problems. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Fix parsing of piglit resultsEric Anholt1-3/+3
The "dmesg-fail" line was matching our "fail" regex, so if you didn't have those we would ignore fails. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Make the piglit-running script callable with an arbitrary serverEric Anholt4-69/+86
v2: Check that SERVER_COMMAND is set. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Add a little xinit-like program for starting servers for testingEric Anholt3-4/+239
The normal xinit is racy because it doesn't use -displayfd. This implements the bare minimum for testing purposes, using -displayfd to sequence starting the client, and avoids adding yet another dependency to the server. v2: Fix asprintf error checks. v3: Add error checking for fork(), clarify calloc() arg. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28test: Handle srcdir != builddir in Xvfb testingEric Anholt2-2/+9
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-22XQuartz: Adopt input_lock() and input_unlock()Jeremy Huddleston Sequoia1-16/+0
This allows us to remove darwinEvents_lock() and darwinEvents_unlock() and remove the serverRunning hack from dix Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-02test: Run some XTS5 integration tests against Xvfb if possible.Eric Anholt3-3/+135
By default the tests will be skipped. However, if you set XTEST_DIR to the repo of a built X Test Suite and PIGLIT_DIR to a piglit repo (no build necessary), make check will run piglit's xts-render tests against Xvfb. We could run more of XTS5, but I haven't spent the time identifying what additional subset would be worth running, since much of it is only really testing the client libraries. We want to make sure that we keep the runtime down, and this subset of the test suite took 92 seconds according to piglit. Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-08-17test: Remember to swap the window argument to XIQueryPointerAdam Jackson1-0/+1
Before 5c69cb60 this wouldn't matter, because ProcXIQueryPointer manually emitted its own error before (bogusly) returning Success to the main loop. Since these tests only look at the return value of the dispatch function we'd think things succeeded even when we'd generated an error. With that fixed, the test code's failure to swap the window id would make dixLookupWindow (rightly) throw BadWindow. Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-29test: Actually verify that two equivalent touch points are the sameKeith Packard1-1/+1
I typo'd when fixing this at Peter's request and left off the '2' from the second variable name. Signed-off-by: Keith Packard <keithp@keithp.com>
2016-05-29test: Make touch test reflect new ability to realloc touch array [v2]Keith Packard1-15/+16
Threaded input allows the input code to call malloc while processing events. In this case, that's in the middle of processing touch events and needing to resize the touch buffer. This test was expecting the old behaviour where touch points would get dropped if the buffer was full. The fix is to check for the new behaviour instead. [v2] * make sure two finding two equivalent touches return the same touch object * check to make sure the queue resizes by the expected amount Changes provided by Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26Remove SIGIO support for input [v5]Keith Packard2-167/+1
This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-29vidmode: move to a separate library of its ownOlivier Fourdan1-0/+2
XVidMode extension might be useful to non hardware servers as well (e.g. Xwayand) so that applications that rely on it (e.g. lot of older games) can at least have read access to XVidMode. But the implementation is very XFree86 centric, so the idea is to add a bunch of vfunc that other non-XFree86 servers can hook up into to provide a similar functionality. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2015-10-27build: Remove stale miext/cw include pathsAdam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-23libxf86config: libxf86config_internal -> libxf86configEgbert Eich1-1/+1
Now since the installable libxf86config is gone, rename libxf86config_internal to libxf86config. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-23test: Fix typo and drop documentation references to glib.Bryce Harrington1-14/+3
The X server doesn't use glib for the tests any more. Signed-off-by: Bryce Harrington <bryce@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2015-09-21test/xi1: Update .gitignoreJasper St. Pierre1-0/+1
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-05-20test: add tests for new valuator mask featuresPeter Hutterer1-0/+63
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-12-08Add REQUEST_FIXED_SIZE testcases to test/misc.cAlan Coopersmith1-0/+37
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08Add request length checking test cases for some Xinput 2.x requestsAlan Coopersmith4-0/+20
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08Add request length checking test cases for some Xinput 1.x requestsAlan Coopersmith3-1/+157
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-09Use unique display name for each xi2 test program [v3]Alan Coopersmith1-0/+12
make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. v2: Fix Linux bits: Add #include <errno.h> to get a declaration of program_invocation_name on Linux. Use only the last portion of the pathname so that the resulting display name doesn't contain any slashes. v3: use program_invocation_short_name on Linux This is the same as program_invocation_name, except is has stripped off any path prefix. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-02Abort xi2 tests if ActivateDevice() failsAlan Coopersmith1-4/+10
I was getting segfaults in xi2 tests from trying to copy XKB keyboard state to NULL pointers with a stack of: key=key@entry=0) at xkbActions.c:1189 sendevent=sendevent@entry=0 '\000') at devices.c:420 at protocol-xiquerydevice.c:338 which turned out to be due to xkbcomp failure, which was logged in the test logs as: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. but which was overlooked because the ActivateDevice() return code wasn't checked and the tests went forward assuming the structures were all correctly initialized. This catches the failure closer to the point of failure, to save debugging time. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18xserver: Move 'pragma GCC diagnostic' outside functionsJon TURNEY1-3/+4
$ gcc --version gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 /jhbuild/checkout/xorg/xserver/os/log.c: In function ‘LogInit’: /jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked /jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked etc. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>