summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
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>
2014-09-18test: Only build hashtable tests if building X-Resource extensionKeith Packard1-1/+4
The hash table functions are only included in the server when the X-Resource extension is built, so don't try to build and test them unless the X-Resource extension is being built. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-09-11Make list tests actually test listsAlan Coopersmith1-12/+12
Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. 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-06-04mi: don't process events from disabled devices (#77884)Peter Hutterer1-1/+13
Once a device is disabled, it doesn't have a sprite pointer anymore. If an event is still in the queue and processed after DisableDevice finished, a dereference causes a crash. Example backtrace (crash forced by injecting an event at the right time): (EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f] (EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240] (EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389] (EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720] (EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58] (EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457] (EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7] (EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb] (EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6] (EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748] (EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9] (EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28] (EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65] (EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69] (EE) 15: ? (?+0x29) [0x29] xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and DisableDevice() calls mieqProcessInputEvents() again when flushing touches and button events. Between that and disabling the device (which causes new events to be refused) there is a window where events may be triggered and enqueued. On the next call to PIE that event is processed on a now defunct device, causing the crash. The simplest fix to this is to discard events from disabled devices. We flush the queue often enough before disabling that when we get here, we really don't care about the events from this device. X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21.gitignore: Add new autotools file 'test-driver'Kristian Høgsberg1-0/+2
Automake 1.12 introduces a new parallel test framework that uses a shell script helper and generates *.log and *.trs files. Add to .gitignore. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-18test: [v2] Validate server log reading more carefully in signal-logging testKeith Packard1-3/+8
Check return value from fgets and strchr instead of assuming they worked. [v2] Don't do any necessary work inside the assert call. Also make sure the return value was long enough. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-04-18test: create a link to the generated hw/xfree86/sdksyms.c at build timeGaetan Nadon2-1/+8
Automake 1.14 gives us warning about source code specified in _SOURCES that comes from directories other than the current one. It suggests to enable the subdir-objects feature which only supports code in sub directories. The test directory needs source from hw/xfree86 which is neither under test nor under a sub directory of test. In 1.14 we get a warning, in 2.0 it will break as it will overwrite the object code in xfree86. The solution in this case is to create a link to hw/xfree86/sdksyms.c at build time. It's just like any other built source file. There are no links created in git. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-27Build Xi/stubs.c once as a convenience library, rather than once for each ↵Jon TURNEY1-2/+2
DDX which wants to use it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27Build dpmsstubs.c once as a convenience library, rather than once for each ↵Jon TURNEY1-1/+1
DDX which wants to use it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>