summaryrefslogtreecommitdiff
path: root/xserver/test
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2016-05-29 12:02:41 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2016-05-29 12:02:41 +0000
commit4a991716ac65d28a68f9943d54c4b74ad0b58f65 (patch)
treec037c3fe64bb15ea67dbf03a96783a8b04085371 /xserver/test
parent549cb8bcb6bdd3a7d44f3b9fdc003df777b2b0d2 (diff)
Update to xserver 1.18.3. Tested by shadchin@ and naddy@.
Note that indirect GLX is now disbled by default.
Diffstat (limited to 'xserver/test')
-rw-r--r--xserver/test/Makefile.am6
-rw-r--r--xserver/test/Makefile.in19
-rw-r--r--xserver/test/README17
-rw-r--r--xserver/test/input.c63
-rw-r--r--xserver/test/xi1/Makefile.in6
-rw-r--r--xserver/test/xi2/Makefile.in6
6 files changed, 80 insertions, 37 deletions
diff --git a/xserver/test/Makefile.am b/xserver/test/Makefile.am
index 82578d977..9f13e269d 100644
--- a/xserver/test/Makefile.am
+++ b/xserver/test/Makefile.am
@@ -16,7 +16,7 @@ TESTS=$(noinst_PROGRAMS)
TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-AM_CPPFLAGS = $(XORG_INCS) -I$(top_srcdir)/miext/cw
+AM_CPPFLAGS = $(XORG_INCS)
if XORG
AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/parser \
-I$(top_srcdir)/hw/xfree86/ddc \
@@ -49,13 +49,14 @@ libxservertest_la_LIBADD += \
$(top_builddir)/hw/xfree86/loader/libloader.la \
$(top_builddir)/hw/xfree86/os-support/libxorgos.la \
$(top_builddir)/hw/xfree86/common/libcommon.la \
- $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \
+ $(top_builddir)/hw/xfree86/parser/libxf86config.la \
$(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
$(top_builddir)/hw/xfree86/modes/libxf86modes.la \
$(top_builddir)/hw/xfree86/ramdac/libramdac.la \
$(top_builddir)/hw/xfree86/ddc/libddc.la \
$(top_builddir)/hw/xfree86/i2c/libi2c.la \
$(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
+ $(top_builddir)/Xext/libXvidmode.la \
@XORG_LIBS@
BUILT_SOURCES = sdksyms.c
@@ -91,6 +92,7 @@ libxservertest_la_LIBADD += \
$(top_builddir)/render/librender.la \
$(top_builddir)/Xext/libXext.la \
$(top_builddir)/Xext/libXextdpmsstubs.la \
+ $(top_builddir)/Xext/libXvidmode.la \
$(top_builddir)/Xi/libXi.la \
$(top_builddir)/Xi/libXistubs.la \
$(top_builddir)/xfixes/libxfixes.la \
diff --git a/xserver/test/Makefile.in b/xserver/test/Makefile.in
index 859725c8a..ab1f7becd 100644
--- a/xserver/test/Makefile.in
+++ b/xserver/test/Makefile.in
@@ -69,13 +69,14 @@ host_triplet = @host@
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \
-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/Xext/libXvidmode.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ @XORG_LIBS@
@DRI_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_7 = $(top_builddir)/hw/xfree86/dri/libdri.la
@@ -91,6 +92,7 @@ host_triplet = @host@
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/render/librender.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/Xext/libXext.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/Xext/libXextdpmsstubs.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/Xext/libXvidmode.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/Xi/libXi.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/Xi/libXistubs.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/xfixes/libxfixes.la \
@@ -126,8 +128,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -145,13 +146,14 @@ am__DEPENDENCIES_1 =
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/hw/xfree86/loader/libloader.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \
-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \
-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/Xext/libXvidmode.la
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@nodist_libxservertest_la_OBJECTS = \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ ddxstubs.lo miinitext.lo
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@nodist_libxservertest_la_OBJECTS = \
@@ -399,7 +401,6 @@ GLAMOR_LIBS = @GLAMOR_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GLX_TLS = @GLX_TLS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
@@ -529,8 +530,6 @@ XEPHYR_INCS = @XEPHYR_INCS@
XEPHYR_LIBS = @XEPHYR_LIBS@
XF86CONFIGDIR = @XF86CONFIGDIR@
XF86CONFIGFILE = @XF86CONFIGFILE@
-XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
-XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
@@ -659,9 +658,7 @@ top_srcdir = @top_srcdir@
@ENABLE_UNIT_TESTS_TRUE@TESTS = $(noinst_PROGRAMS)
@ENABLE_UNIT_TESTS_TRUE@TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
@ENABLE_UNIT_TESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-@ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = $(XORG_INCS) \
-@ENABLE_UNIT_TESTS_TRUE@ -I$(top_srcdir)/miext/cw \
-@ENABLE_UNIT_TESTS_TRUE@ $(am__append_4)
+@ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = $(XORG_INCS) $(am__append_4)
@ENABLE_UNIT_TESTS_TRUE@TEST_LDADD = libxservertest.la \
@ENABLE_UNIT_TESTS_TRUE@ $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) \
@ENABLE_UNIT_TESTS_TRUE@ $(GLX_SYS_LIBS) $(am__append_5) \
diff --git a/xserver/test/README b/xserver/test/README
index 5759a72fd..618130ce0 100644
--- a/xserver/test/README
+++ b/xserver/test/README
@@ -1,8 +1,7 @@
X server test suite
This suite contains a set of tests to verify the behaviour of functions used
-internally to the server. This test suite is based on glib's testing
-framework [1].
+internally to the server.
= How it works =
Through some automake abuse, we link the test programs with the same static
@@ -15,7 +14,7 @@ of the X server. Unless the test suite replicates the expected state, which
may be difficult.
= How to run the tests =
-Run "make check" the test directory. This will compile the tests and execute
+Run "make check" in the test directory. This will compile the tests and execute
them in the order specified in the TESTS variable in test/Makefile.am.
Each set of tests related to a subsystem are available as a binary that can be
@@ -23,14 +22,4 @@ executed directly. For example, run "xkb" to perform some xkb-related tests.
== Adding a new test ==
When adding a new test, ensure that you add a short description of what the
-test does and what the expected outcome is. If the test reproduces a
-particular bug, using g_test_bug().
-
-== Misc ==
-
-The programs "gtester" and "gtester-report" may be used to generate XML/HTML
-log files of tests succeeded and failed.
-
----------
-
-[1] http://library.gnome.org/devel/glib/stable/glib-Testing.html
+test does and what the expected outcome is.
diff --git a/xserver/test/input.c b/xserver/test/input.c
index a4615c9c9..91ee43c46 100644
--- a/xserver/test/input.c
+++ b/xserver/test/input.c
@@ -1358,6 +1358,68 @@ dix_valuator_mode(void)
}
static void
+dix_input_valuator_masks_unaccel(void)
+{
+ ValuatorMask *mask = NULL;
+ double x, ux;
+
+ /* set mask normally */
+ mask = valuator_mask_new(MAX_VALUATORS);
+ assert(!valuator_mask_has_unaccelerated(mask));
+ valuator_mask_set_double(mask, 0, 1.0);
+ assert(!valuator_mask_has_unaccelerated(mask));
+ valuator_mask_unset(mask, 0);
+ assert(!valuator_mask_has_unaccelerated(mask));
+
+ /* all unset, now set accel mask */
+ valuator_mask_set_unaccelerated(mask, 0, 1.0, 2.0);
+ assert(valuator_mask_has_unaccelerated(mask));
+ assert(valuator_mask_isset(mask, 0));
+ assert(!valuator_mask_isset(mask, 1));
+ assert(valuator_mask_get_accelerated(mask, 0) == 1.0);
+ assert(valuator_mask_get_unaccelerated(mask, 0) == 2.0);
+ assert(valuator_mask_fetch_unaccelerated(mask, 0, &x, &ux));
+ assert(x == 1.0);
+ assert(ux == 2.0);
+ x = 0xff;
+ ux = 0xfe;
+ assert(!valuator_mask_fetch_unaccelerated(mask, 1, &x, &ux));
+ assert(x == 0xff);
+ assert(ux == 0xfe);
+
+ /* all unset, now set normally again */
+ valuator_mask_unset(mask, 0);
+ assert(!valuator_mask_has_unaccelerated(mask));
+ assert(!valuator_mask_isset(mask, 0));
+ valuator_mask_set_double(mask, 0, 1.0);
+ assert(!valuator_mask_has_unaccelerated(mask));
+ valuator_mask_unset(mask, 0);
+ assert(!valuator_mask_has_unaccelerated(mask));
+
+ valuator_mask_zero(mask);
+ assert(!valuator_mask_has_unaccelerated(mask));
+
+ valuator_mask_set_unaccelerated(mask, 0, 1.0, 2.0);
+ valuator_mask_set_unaccelerated(mask, 1, 3.0, 4.5);
+ assert(valuator_mask_isset(mask, 0));
+ assert(valuator_mask_isset(mask, 1));
+ assert(!valuator_mask_isset(mask, 2));
+ assert(valuator_mask_has_unaccelerated(mask));
+ assert(valuator_mask_get_accelerated(mask, 0) == 1.0);
+ assert(valuator_mask_get_accelerated(mask, 1) == 3.0);
+ assert(valuator_mask_get_unaccelerated(mask, 0) == 2.0);
+ assert(valuator_mask_get_unaccelerated(mask, 1) == 4.5);
+ assert(valuator_mask_fetch_unaccelerated(mask, 0, &x, &ux));
+ assert(x == 1.0);
+ assert(ux == 2.0);
+ assert(valuator_mask_fetch_unaccelerated(mask, 1, &x, &ux));
+ assert(x == 3.0);
+ assert(ux == 4.5);
+
+ valuator_mask_free(&mask);
+}
+
+static void
include_bit_test_macros(void)
{
uint8_t mask[9] = { 0 };
@@ -1847,6 +1909,7 @@ main(int argc, char **argv)
dix_enqueue_events();
dix_double_fp_conversion();
dix_input_valuator_masks();
+ dix_input_valuator_masks_unaccel();
dix_input_attributes();
dix_init_valuators();
dix_event_to_core_conversion();
diff --git a/xserver/test/xi1/Makefile.in b/xserver/test/xi1/Makefile.in
index ed7633458..3e657ecb1 100644
--- a/xserver/test/xi1/Makefile.in
+++ b/xserver/test/xi1/Makefile.in
@@ -59,8 +59,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -240,7 +239,6 @@ GLAMOR_LIBS = @GLAMOR_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GLX_TLS = @GLX_TLS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
@@ -370,8 +368,6 @@ XEPHYR_INCS = @XEPHYR_INCS@
XEPHYR_LIBS = @XEPHYR_LIBS@
XF86CONFIGDIR = @XF86CONFIGDIR@
XF86CONFIGFILE = @XF86CONFIGFILE@
-XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
-XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
diff --git a/xserver/test/xi2/Makefile.in b/xserver/test/xi2/Makefile.in
index ff9478fdc..0850d63fd 100644
--- a/xserver/test/xi2/Makefile.in
+++ b/xserver/test/xi2/Makefile.in
@@ -69,8 +69,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -370,7 +369,6 @@ GLAMOR_LIBS = @GLAMOR_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GLX_SYS_LIBS = @GLX_SYS_LIBS@
-GLX_TLS = @GLX_TLS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
@@ -500,8 +498,6 @@ XEPHYR_INCS = @XEPHYR_INCS@
XEPHYR_LIBS = @XEPHYR_LIBS@
XF86CONFIGDIR = @XF86CONFIGDIR@
XF86CONFIGFILE = @XF86CONFIGFILE@
-XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
-XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@