summaryrefslogtreecommitdiff
path: root/xserver/test
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2014-05-02 19:27:52 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2014-05-02 19:27:52 +0000
commitb9676a49e5a29d619bcd8402e4541d7749197922 (patch)
tree67cdb12cda42de5facadc0a36125a32354b3bc29 /xserver/test
parentfbf6414f58c54aab6ef37e4d066bb2699f118269 (diff)
Update to xserver 1.15.1.
Tested by at least ajacoutot@, dcoppa@ & jasper@
Diffstat (limited to 'xserver/test')
-rw-r--r--xserver/test/Makefile.am19
-rw-r--r--xserver/test/Makefile.in48
-rw-r--r--xserver/test/input.c2
-rw-r--r--xserver/test/xi2/Makefile.am2
-rw-r--r--xserver/test/xi2/Makefile.in13
-rw-r--r--xserver/test/xi2/protocol-xipassivegrabdevice.c9
6 files changed, 66 insertions, 27 deletions
diff --git a/xserver/test/Makefile.am b/xserver/test/Makefile.am
index 34f53fc1e..2852bb3e0 100644
--- a/xserver/test/Makefile.am
+++ b/xserver/test/Makefile.am
@@ -1,11 +1,11 @@
if ENABLE_UNIT_TESTS
SUBDIRS= .
-noinst_PROGRAMS = list string touch
+noinst_PROGRAMS = list string
if XORG
# Tests that require at least some DDX functions in order to fully link
# For now, requires xf86 ddx, could be adjusted to use another
SUBDIRS += xi2
-noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging
+noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging touch
endif
check_LTLIBRARIES = libxservertest.la
@@ -13,13 +13,13 @@ TESTS=$(noinst_PROGRAMS)
TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-INCLUDES = $(XORG_INCS) -I$(top_srcdir)/miext/cw
+AM_CPPFLAGS = $(XORG_INCS) -I$(top_srcdir)/miext/cw
if XORG
-INCLUDES += -I$(top_srcdir)/hw/xfree86/parser \
+AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/parser \
-I$(top_srcdir)/hw/xfree86/ddc \
-I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \
-I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \
- -I$(top_srcdir)/hw/xfree86/dri2
+ -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3
endif
TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
@@ -64,6 +64,10 @@ if DRI2
libxservertest_la_LIBADD += $(top_builddir)/hw/xfree86/dri2/libdri2.la
endif
+if DRI3
+libxservertest_la_LIBADD += $(top_builddir)/dri3/libdri3.la
+endif
+
else
nodist_libxservertest_la_SOURCES = \
ddxstubs.c \
@@ -105,6 +109,11 @@ libxservertest_la_LIBADD += \
$(top_builddir)/record/librecord.la
endif
+if DRI3
+libxservertest_la_LIBADD += \
+ $(top_builddir)/dri3/libdri3.la
+endif
+
if XQUARTZ
libxservertest_la_LIBADD += \
$(top_builddir)/miext/rootless/librootless.la
diff --git a/xserver/test/Makefile.in b/xserver/test/Makefile.in
index cd788ba24..4375866eb 100644
--- a/xserver/test/Makefile.in
+++ b/xserver/test/Makefile.in
@@ -51,17 +51,16 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_UNIT_TESTS_TRUE@noinst_PROGRAMS = list$(EXEEXT) \
-@ENABLE_UNIT_TESTS_TRUE@ string$(EXEEXT) touch$(EXEEXT) \
-@ENABLE_UNIT_TESTS_TRUE@ $(am__EXEEXT_1)
+@ENABLE_UNIT_TESTS_TRUE@ string$(EXEEXT) $(am__EXEEXT_1)
# Tests that require at least some DDX functions in order to fully link
# For now, requires xf86 ddx, could be adjusted to use another
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_1 = xi2
-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_2 = xkb input xtest misc fixes xfree86 hashtabletest os signal-logging
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_2 = xkb input xtest misc fixes xfree86 hashtabletest os signal-logging touch
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_3 = -I$(top_srcdir)/hw/xfree86/parser \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/ddc \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \
-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/dri2
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3
@ENABLE_UNIT_TESTS_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@am__append_4 = $(OS_LIB) $(DIX_LIB)
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_5 = \
@@ -79,7 +78,8 @@ host_triplet = @host@
@DRI_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_6 = $(top_builddir)/hw/xfree86/dri/libdri.la
@DRI2_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_7 = $(top_builddir)/hw/xfree86/dri2/libdri2.la
-@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_8 = \
+@DRI3_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_8 = $(top_builddir)/dri3/libdri3.la
+@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_9 = \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/damageext/libdamageext.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/fb/libfb.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/fb/libwfb.la \
@@ -93,23 +93,26 @@ host_triplet = @host@
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/xkb/libxkb.la \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/xkb/libxkbstubs.la
-@COMPOSITE_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_9 = \
+@COMPOSITE_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_10 = \
@COMPOSITE_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/composite/libcomposite.la
-@DBE_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_10 = \
+@DBE_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_11 = \
@DBE_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/dbe/libdbe.la
-@ENABLE_UNIT_TESTS_TRUE@@GLX_TRUE@@XORG_FALSE@am__append_11 = \
+@ENABLE_UNIT_TESTS_TRUE@@GLX_TRUE@@XORG_FALSE@am__append_12 = \
@ENABLE_UNIT_TESTS_TRUE@@GLX_TRUE@@XORG_FALSE@ $(top_builddir)/glx/libglx.la
-@ENABLE_UNIT_TESTS_TRUE@@RECORD_TRUE@@XORG_FALSE@am__append_12 = \
+@ENABLE_UNIT_TESTS_TRUE@@RECORD_TRUE@@XORG_FALSE@am__append_13 = \
@ENABLE_UNIT_TESTS_TRUE@@RECORD_TRUE@@XORG_FALSE@ $(top_builddir)/record/librecord.la
-@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XQUARTZ_TRUE@am__append_13 = \
+@DRI3_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@am__append_14 = \
+@DRI3_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_builddir)/dri3/libdri3.la
+
+@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XQUARTZ_TRUE@am__append_15 = \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XQUARTZ_TRUE@ $(top_builddir)/miext/rootless/librootless.la
-@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XQUARTZ_TRUE@am__append_14 = -lXplugin
-@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XWIN_MULTIWINDOWEXTWM_TRUE@am__append_15 = \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XQUARTZ_TRUE@am__append_16 = -lXplugin
+@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XWIN_MULTIWINDOWEXTWM_TRUE@am__append_17 = \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@@XWIN_MULTIWINDOWEXTWM_TRUE@ $(top_builddir)/miext/rootless/librootless.la
subdir = test
@@ -164,7 +167,8 @@ am__v_lt_1 =
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ xfree86$(EXEEXT) \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ hashtabletest$(EXEEXT) \
@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ os$(EXEEXT) \
-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ signal-logging$(EXEEXT)
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ signal-logging$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ touch$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
fixes_SOURCES = fixes.c
fixes_OBJECTS = fixes.$(OBJEXT)
@@ -356,9 +360,12 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
+DOT = @DOT@
DOXYGEN = @DOXYGEN@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
+DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
@@ -390,6 +397,7 @@ GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
@@ -419,6 +427,8 @@ LIBS = @LIBS@
LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
LIBSHA1_LIBS = @LIBSHA1_LIBS@
LIBTOOL = @LIBTOOL@
+LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
+LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
@@ -462,6 +472,7 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -475,12 +486,12 @@ SET_MAKE = @SET_MAKE@
SHA1_CFLAGS = @SHA1_CFLAGS@
SHA1_LIBS = @SHA1_LIBS@
SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
SYSCONFDIR = @SYSCONFDIR@
+TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UDEV_CFLAGS = @UDEV_CFLAGS@
@@ -546,6 +557,8 @@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
XSERVER_LIBS = @XSERVER_LIBS@
XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
+XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
+XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
XSLTPROC = @XSLTPROC@
XSL_STYLESHEET = @XSL_STYLESHEET@
XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
@@ -629,13 +642,13 @@ 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@INCLUDES = $(XORG_INCS) \
+@ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = $(XORG_INCS) \
@ENABLE_UNIT_TESTS_TRUE@ -I$(top_srcdir)/miext/cw \
@ENABLE_UNIT_TESTS_TRUE@ $(am__append_3)
@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_4) \
-@ENABLE_UNIT_TESTS_TRUE@ $(am__append_14)
+@ENABLE_UNIT_TESTS_TRUE@ $(am__append_16)
@ENABLE_UNIT_TESTS_TRUE@xkb_LDADD = $(TEST_LDADD)
@ENABLE_UNIT_TESTS_TRUE@input_LDADD = $(TEST_LDADD)
@ENABLE_UNIT_TESTS_TRUE@xtest_LDADD = $(TEST_LDADD)
@@ -652,7 +665,8 @@ top_srcdir = @top_srcdir@
@ENABLE_UNIT_TESTS_TRUE@ $(am__append_7) $(am__append_8) \
@ENABLE_UNIT_TESTS_TRUE@ $(am__append_9) $(am__append_10) \
@ENABLE_UNIT_TESTS_TRUE@ $(am__append_11) $(am__append_12) \
-@ENABLE_UNIT_TESTS_TRUE@ $(am__append_13) $(am__append_15)
+@ENABLE_UNIT_TESTS_TRUE@ $(am__append_13) $(am__append_14) \
+@ENABLE_UNIT_TESTS_TRUE@ $(am__append_15) $(am__append_17)
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@nodist_libxservertest_la_SOURCES = \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ ddxstubs.c \
@ENABLE_UNIT_TESTS_TRUE@@XORG_FALSE@ $(top_srcdir)/mi/miinitext.c \
diff --git a/xserver/test/input.c b/xserver/test/input.c
index be988a4a3..df20f8235 100644
--- a/xserver/test/input.c
+++ b/xserver/test/input.c
@@ -1384,7 +1384,7 @@ dix_valuator_alloc(void)
assert(v);
assert(v->numAxes == num_axes);
-#if !defined(__i386__) && !defined(__sh__)
+#if !defined(__i386__) && !defined(__m68k__) && !defined(__sh__)
/* must be double-aligned on 64 bit */
assert(((void *) v->axisVal - (void *) v) % sizeof(double) == 0);
assert(((void *) v->axes - (void *) v) % sizeof(double) == 0);
diff --git a/xserver/test/xi2/Makefile.am b/xserver/test/xi2/Makefile.am
index 9de7abf5d..bfddfef13 100644
--- a/xserver/test/xi2/Makefile.am
+++ b/xserver/test/xi2/Makefile.am
@@ -17,7 +17,7 @@ TESTS=$(noinst_PROGRAMS)
TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-INCLUDES = @XORG_INCS@
+AM_CPPFLAGS = @XORG_INCS@
TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
COMMON_SOURCES=protocol-common.h protocol-common.c
diff --git a/xserver/test/xi2/Makefile.in b/xserver/test/xi2/Makefile.in
index 0708f49bd..f9ccbb1bf 100644
--- a/xserver/test/xi2/Makefile.in
+++ b/xserver/test/xi2/Makefile.in
@@ -333,9 +333,12 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
+DOT = @DOT@
DOXYGEN = @DOXYGEN@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
+DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
@@ -367,6 +370,7 @@ GL_LIBS = @GL_LIBS@
GREP = @GREP@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
+HAVE_DOT = @HAVE_DOT@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
@@ -396,6 +400,8 @@ LIBS = @LIBS@
LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
LIBSHA1_LIBS = @LIBSHA1_LIBS@
LIBTOOL = @LIBTOOL@
+LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
+LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
@@ -439,6 +445,7 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PROJECTROOT = @PROJECTROOT@
+PYTHON3 = @PYTHON3@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -452,12 +459,12 @@ SET_MAKE = @SET_MAKE@
SHA1_CFLAGS = @SHA1_CFLAGS@
SHA1_LIBS = @SHA1_LIBS@
SHELL = @SHELL@
-SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
SYSCONFDIR = @SYSCONFDIR@
+TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UDEV_CFLAGS = @UDEV_CFLAGS@
@@ -523,6 +530,8 @@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@
XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@
XSERVER_LIBS = @XSERVER_LIBS@
XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
+XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@
+XSHMFENCE_LIBS = @XSHMFENCE_LIBS@
XSLTPROC = @XSLTPROC@
XSL_STYLESHEET = @XSL_STYLESHEET@
XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
@@ -606,7 +615,7 @@ top_srcdir = @top_srcdir@
@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@TESTS = $(noinst_PROGRAMS)
@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@INCLUDES = @XORG_INCS@
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@AM_CPPFLAGS = @XORG_INCS@
@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@TEST_LDADD = ../libxservertest.la \
@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(XORG_SYS_LIBS) \
@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(XSERVER_SYS_LIBS) \
diff --git a/xserver/test/xi2/protocol-xipassivegrabdevice.c b/xserver/test/xi2/protocol-xipassivegrabdevice.c
index 84b386bf3..dd51757ff 100644
--- a/xserver/test/xi2/protocol-xipassivegrabdevice.c
+++ b/xserver/test/xi2/protocol-xipassivegrabdevice.c
@@ -137,6 +137,7 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req,
{
int rc;
int modifiers;
+ int mask_len;
rc = ProcXIPassiveGrabDevice(&client_request);
assert(rc == error);
@@ -153,10 +154,11 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req,
swaps(&req->deviceid);
modifiers = req->num_modifiers;
swaps(&req->num_modifiers);
+ mask_len = req->mask_len;
swaps(&req->mask_len);
while (modifiers--) {
- CARD32 *mod = ((CARD32 *) (req + 1)) + modifiers;
+ CARD32 *mod = ((CARD32 *) (req + 1)) + mask_len + modifiers;
swapl(mod);
}
@@ -228,6 +230,11 @@ test_XIPassiveGrabDevice(void)
request->detail = XIAnyButton;
request_XIPassiveGrabDevice(&client_request, request, Success, 0);
+ /* Set a few random masks to make sure we handle modifiers correctly */
+ SetBit(mask, XI_ButtonPress);
+ SetBit(mask, XI_KeyPress);
+ SetBit(mask, XI_Enter);
+
/* some modifiers */
request->num_modifiers = N_MODS;
request->length += N_MODS;