Commit Graph

75 Commits

Author SHA1 Message Date
Adam Jackson
67c303fff3 miinitext: Load GLX on the mi path
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:48 -05:00
Eric Anholt
f211015771 test: Remove unused ddxstubs.c
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-08-14 12:32:33 -07:00
Jon TURNEY
fbdd73fac6 Move statically linked xorgxkb files from dixmods to a separate directory
[ajax: Fixed test/Makefile.am as well]

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-06-27 12:42:06 -04:00
Adam Jackson
646bc74cde test: Fix distcheck failures
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-14 12:28:24 -04:00
Mihail Konev
fde5cd7848 tests: Fix guards for ld -wrap
Fixes XQuartz build.

Regressed-in: 23f6dbc96e
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-02-23 13:16:07 -05:00
Martin Peres
b1a6986395 tests: shuffle around the linking order to please GNU ld
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-25 14:47:10 -05:00
Mihail Konev
6f531b0cdf tests: Fix typo
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-16 15:42:42 -05:00
Giuseppe Bilotta
3f8c2f9448 tests: Fix without-dtrace build
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-16 15:01:33 -05:00
Adam Jackson
b44bef513b Revert "tests: fix --disable-xorg build"
Pushed the wrong thing.

This reverts commit 730fd8c05f.
2017-01-16 14:59:40 -05:00
Mihail Konev
730fd8c05f tests: fix --disable-xorg build 2017-01-16 14:40:37 -05:00
Mihail Konev
704a867f8f tests: Remove obsolete libxservertest.la
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12 15:01:41 -05:00
Mihail Konev
23f6dbc96e tests: Move test/{xi1,xi2}/tests to test/
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12 15:01:38 -05:00
Mihail Konev
ead5064581 tests: Convert test/ to single binary
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-12 15:01:36 -05:00
Mihail Konev
45546219e1 tests: Avoid libtool message
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>
2017-01-12 13:25:52 -05:00
Pekka Paalanen
b365c5d168 test: fix distributing scripts
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-12-07 12:47:04 -05:00
Rhys Kidd
cf8860786c test: Fix stray Makefile reference to removed os test
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 6a5a4e6037
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-11-19 16:27:35 +10:00
Eric Anholt
c49e820f79 test: Run xts against Xephyr -glamor when present
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-28 12:44:51 -04:00
Eric Anholt
7fe5b9c02c test: Make the piglit-running script callable with an arbitrary server
v2: Check that SERVER_COMMAND is set.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28 12:44:30 -04:00
Eric Anholt
7ac130a066 test: Add a little xinit-like program for starting servers for testing
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-28 12:44:20 -04:00
Eric Anholt
8d5e0c07b9 test: Handle srcdir != builddir in Xvfb testing
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-09-28 12:44:04 -04:00
Eric Anholt
deae9c7e84 test: Run some XTS5 integration tests against Xvfb if possible.
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-09-02 16:24:32 -04:00
Keith Packard
6a5a4e6037 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>
2016-05-26 16:07:54 -07:00
Olivier Fourdan
f175cf45ae vidmode: move to a separate library of its own
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>
2016-02-29 16:29:01 -05:00
Adam Jackson
bb78c464f0 build: Remove stale miext/cw include paths
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-27 13:46:13 -04:00
Egbert Eich
fca98ce5e7 libxf86config: libxf86config_internal -> libxf86config
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-23 14:29:21 -04:00
Alan Coopersmith
d153a85f74 Add request length checking test cases for some Xinput 1.x requests
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08 18:09:49 -08:00
Keith Packard
9e07f3a3d2 test: Only build hashtable tests if building X-Resource extension
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-18 15:29:15 -07:00
Gaetan Nadon
3119aae807 test: create a link to the generated hw/xfree86/sdksyms.c at build time
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-04-18 11:52:16 -07:00
Jon TURNEY
f23dd02b96 Build Xi/stubs.c once as a convenience library, rather than once for each 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-27 14:09:43 +00:00
Jon TURNEY
45b223e1c2 Build dpmsstubs.c once as a convenience library, rather than once for each 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-27 14:09:33 +00:00
Kristian Høgsberg
797781c7bf test: Don't add TEST_LDADD to list test
The list test case is always enabled, even if Xorg is disabled.
TEST_LDADD pulls in Xorg files which breaks linking when Xorg is disabled.
The list test doesn't need any libraries, so just remove list_LDADD.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-20 07:45:26 +10:00
Gaetan Nadon
ec6a446125 test: remove source file from hashtabletest LDADD
LDADD is for libraries and not for source code.

Introduced in commit: 	ccb3e78124

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-20 11:38:56 +10:00
Dan Horák
d7ee27e5e4 test: build the touch test only when building Xorg
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-14 16:35:15 +09:00
Keith Packard
5631382988 dri3: Add DRI3 extension
Adds DRM compatible fences using futexes.
Uses FD passing to get pixmaps from DRM applications.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 16:58:30 -07:00
Peter Hutterer
bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Peter Hutterer
02d91ccb09 test: always add DIX_LIB and OS_LIB on XORG builds
With --disable-xorg, We also disabled a bunch of tests because of their
perceived reliance on a DDX. The cause was libtool missing some object files
that never ended up in libxservertest.la. Only the xfree86 test has a true
dependency on XORG.

DIX_LIB was pointing to dix.O (instead of libdix.la) when
DTRACE_SPECIAL_OBJECTS was defined. libdix.la should be part of XSERVER_LIBS
but dix.O is not a recognised libtool object, so it got skipped for
libxservertest.a. Only in the XORG case would we add DIX_LIB and OS_LIB
manually, thus forcing linkage with the dtrace-generated objects.

Fixing this by packaging up the dtrace-generated files as part of
libdix.la/libos.la doesn't work for Solaris (and possible others), so simply
always force linkage against the DIX_LIB/OS_LIB in the case of dtrace objects.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-08-05 08:24:54 +10:00
Daniel Stone
9a953e0e9d Move DRI2 from external module to built-in
Instead of keeping a tiny amount of code in an external module, just man
up and build it into the core server.

v2: Fix test/Makefile.am to only link libdri2.la if DRI2 is set

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:31:01 -07:00
Daniel Stone
459c6da0f9 Move DRI1 from external module to built-in
Rather than building the tiny amount of code required for XFree86-DRI as
an external module, build it in if it's enabled at configure time.

v2: Fix test/Makefile.am to only link libdri.la if DRI is set

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>

fixup for DRI1 move

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:30:40 -07:00
Peter Hutterer
d84f0f823e Merge branch 'sigio-vt-switch-issues' into for-keith
Conflicts:
	test/Makefile.am

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-07-04 21:23:48 +10:00
Peter Hutterer
6bf356ef28 os: add OsBlockSIGIO and OsReleaseSIGIO
Let the dix be in charge of changing the sigprocmask so we only have one
entity that changes it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-03 15:56:33 +10:00
Keith Packard
24525d96a3 Merge branch 'sigsafe-logging-varargs'
This merge includes a minor fixup for '%p' arguments; must cast to
uintptr_t instead of uint64_t as we use -Werror=pointer-to-int-cast
which complains when doing a cast (even explicitly) from a pointer
to an integer of different size.
2012-07-02 22:35:39 -07:00
Peter Hutterer
7100118c8d AC_SUBST the GLX_SYS_LIBS
libxservertest needs -lpthread from glxapi.c's pthread_once() call. Usually
this would be pulled in by the XORG_LIBS but not when building without Xorg.

This commit has no visible effect on the current tree, preparation for test
cleanups.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-06-22 10:49:06 +10:00
Chase Douglas
704b847abf Add FormatUInt64{,Hex}() for formatting numbers in a signal safe manner
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-06-21 15:45:22 +10:00
Michal Suchanek
1d82ec9594 xserver: Fix out-of-tree build
Fixes regression caused by ccb3e78124

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01 11:36:30 +10:00
Jeremy Huddleston
d1ef0d4964 test: Fix make dist
It seems like make dist should be doing te right thing without this commit,
but it's not in some cases.  Don't ask me to explain why.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:41 -07:00
Erkki Seppälä
ccb3e78124 Xext: add a generic hashtable implementation
The generic hashtable implementation adds a key-value container, that
keeps the key and value inside the hashtable structure and manages
their memory by itself. This data structure is best suited for
fixed-length keys and values.

One creates a new hash table with ht_create and disposes it with
ht_destroy. ht_create accepts the key and value sizes (in bytes) in
addition to the hashing and comparison functions to use. When adding
keys with ht_add, they will be copied into the hash and a pointer to
the value will be returned: data may be put into this structure (or if
the hash table is to be used as a set, one can just not put anything
in).

The hash table comes also with one generic hashing function plus a
comparison function to facilitate ease of use. It also has a custom
hashing and comparison functions for hashing resource IDs with
HashXID.

Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2012-04-18 12:49:06 +03:00
Jeremy Huddleston
df327f98f6 test: Fix 'make dist' for configurations that build the Xorg DDX
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-23 19:46:22 -07:00
Jeremy Huddleston
cd89482088 test: Fix linking issues when building unit tests without the Xorg DDX
This allows unit tests to build and run successfully on darwin when
only the Xvfb or XQuartz DDX is built.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-15 02:28:07 -08:00
Peter Hutterer
758bc57ba5 dix: add helper functions to create DDX touch recs
DDX touch points are the ones that keep records of the driver-submitted
touchpoints. They're unaffected by the grab state and terminate on a
TouchEnd submitted by the driver.

The client ID assigned is server-global.

Since drivers usually submit in the SIGIO handler, we cannot allocate in the
these functions.

Co-authored-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-19 09:08:36 +10:00
Alan Coopersmith
84207def93 Disable building of tests requiring DDX functions when Xorg is not built
Some test cases require linking with some sort of DDX - ideally we'd
have a stub ddx for testing, but for now, since we link with the Xorg
ddx, disable those tests when configured with --disable-xorg

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43320

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-02 16:02:56 -08:00