summaryrefslogtreecommitdiff
path: root/xserver/test
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/test')
-rw-r--r--xserver/test/Makefile.am28
-rw-r--r--xserver/test/Makefile.in242
-rw-r--r--xserver/test/fixes.c327
-rw-r--r--xserver/test/input.c717
-rw-r--r--xserver/test/list.c173
-rw-r--r--xserver/test/misc.c62
-rw-r--r--xserver/test/xi2/Makefile.am16
-rw-r--r--xserver/test/xi2/Makefile.in268
-rw-r--r--xserver/test/xi2/protocol-common.c7
-rw-r--r--xserver/test/xi2/protocol-common.h12
-rw-r--r--xserver/test/xi2/protocol-eventconvert.c204
-rw-r--r--xserver/test/xi2/protocol-xigetclientpointer.c31
-rw-r--r--xserver/test/xi2/protocol-xigetselectedevents.c28
-rw-r--r--xserver/test/xi2/protocol-xipassivegrabdevice.c234
-rw-r--r--xserver/test/xi2/protocol-xiquerydevice.c98
-rw-r--r--xserver/test/xi2/protocol-xiquerypointer.c40
-rw-r--r--xserver/test/xi2/protocol-xiqueryversion.c28
-rw-r--r--xserver/test/xi2/protocol-xiselectevents.c42
-rw-r--r--xserver/test/xi2/protocol-xisetclientpointer.c32
-rw-r--r--xserver/test/xi2/protocol-xiwarppointer.c26
-rw-r--r--xserver/test/xkb.c76
-rw-r--r--xserver/test/xtest.c39
22 files changed, 1931 insertions, 799 deletions
diff --git a/xserver/test/Makefile.am b/xserver/test/Makefile.am
index 456221e46..7ef408c93 100644
--- a/xserver/test/Makefile.am
+++ b/xserver/test/Makefile.am
@@ -1,13 +1,17 @@
-if UNITTESTS
+if ENABLE_UNIT_TESTS
+if HAVE_LD_WRAP
SUBDIRS= . xi2
-check_PROGRAMS = xkb input xtest
+noinst_PROGRAMS = xkb input xtest list misc fixes
check_LTLIBRARIES = libxservertest.la
-TESTS=$(check_PROGRAMS)
+TESTS=$(noinst_PROGRAMS)
-AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
-INCLUDES = @XORG_INCS@
-TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
+AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
+INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser \
+ -I$(top_srcdir)/miext/cw -I$(top_srcdir)/hw/xfree86/ddc \
+ -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \
+ -I$(top_srcdir)/hw/xfree86/ramdac
+TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
if SPECIAL_DTRACE_OBJECTS
TEST_LDADD += $(OS_LIB) $(DIX_LIB)
@@ -16,7 +20,11 @@ endif
xkb_LDADD=$(TEST_LDADD)
input_LDADD=$(TEST_LDADD)
xtest_LDADD=$(TEST_LDADD)
+list_LDADD=$(TEST_LDADD)
+misc_LDADD=$(TEST_LDADD)
+fixes_LDADD=$(TEST_LDADD)
+nodist_libxservertest_la_SOURCES = $(top_builddir)/hw/xfree86/sdksyms.c
libxservertest_la_LIBADD = \
$(XSERVER_LIBS) \
$(top_builddir)/hw/xfree86/loader/libloader.la \
@@ -29,13 +37,9 @@ libxservertest_la_LIBADD = \
$(top_builddir)/hw/xfree86/ddc/libddc.la \
$(top_builddir)/hw/xfree86/i2c/libi2c.la \
$(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
- $(top_builddir)/hw/xfree86/libxorg.la \
$(top_builddir)/mi/libmi.la \
$(top_builddir)/os/libos.la \
@XORG_LIBS@
+libxservertest_la_DEPENDENCIES = $(libxservertest_la_LIBADD)
+endif
endif
-
-CLEANFILES=libxservertest.c
-
-libxservertest.c:
- touch $@
diff --git a/xserver/test/Makefile.in b/xserver/test/Makefile.in
index 3455ff6d0..f3bbdc228 100644
--- a/xserver/test/Makefile.in
+++ b/xserver/test/Makefile.in
@@ -13,6 +13,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -35,14 +36,22 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@UNITTESTS_TRUE@check_PROGRAMS = xkb$(EXEEXT) input$(EXEEXT) \
-@UNITTESTS_TRUE@ xtest$(EXEEXT)
-@SPECIAL_DTRACE_OBJECTS_TRUE@@UNITTESTS_TRUE@am__append_1 = $(OS_LIB) $(DIX_LIB)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@noinst_PROGRAMS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ xkb$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ input$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ xtest$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ list$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ misc$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ fixes$(EXEEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@am__append_1 = $(OS_LIB) $(DIX_LIB)
subdir = test
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
- $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/configure.ac
+ $(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
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(install_sh) -d
@@ -56,48 +65,50 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
am__DEPENDENCIES_1 =
-@UNITTESTS_TRUE@libxservertest_la_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/libxorg.la \
-@UNITTESTS_TRUE@ $(top_builddir)/mi/libmi.la \
-@UNITTESTS_TRUE@ $(top_builddir)/os/libos.la
-libxservertest_la_SOURCES = libxservertest.c
-libxservertest_la_OBJECTS = libxservertest.lo
-@UNITTESTS_TRUE@am_libxservertest_la_rpath =
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@nodist_libxservertest_la_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ sdksyms.lo
+libxservertest_la_OBJECTS = $(nodist_libxservertest_la_OBJECTS)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_libxservertest_la_rpath =
+PROGRAMS = $(noinst_PROGRAMS)
+fixes_SOURCES = fixes.c
+fixes_OBJECTS = fixes.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@ $(am__DEPENDENCIES_1)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am__DEPENDENCIES_3 = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ libxservertest.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__DEPENDENCIES_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__DEPENDENCIES_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__DEPENDENCIES_2)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@fixes_DEPENDENCIES = $(am__DEPENDENCIES_3)
input_SOURCES = input.c
input_OBJECTS = input.$(OBJEXT)
-@SPECIAL_DTRACE_OBJECTS_TRUE@@UNITTESTS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
-@SPECIAL_DTRACE_OBJECTS_TRUE@@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1)
-@UNITTESTS_TRUE@am__DEPENDENCIES_3 = libxservertest.la \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-@UNITTESTS_TRUE@input_DEPENDENCIES = $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@input_DEPENDENCIES = $(am__DEPENDENCIES_3)
+list_SOURCES = list.c
+list_OBJECTS = list.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@list_DEPENDENCIES = $(am__DEPENDENCIES_3)
+misc_SOURCES = misc.c
+misc_OBJECTS = misc.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@misc_DEPENDENCIES = $(am__DEPENDENCIES_3)
xkb_SOURCES = xkb.c
xkb_OBJECTS = xkb.$(OBJEXT)
-@UNITTESTS_TRUE@xkb_DEPENDENCIES = $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@xkb_DEPENDENCIES = $(am__DEPENDENCIES_3)
xtest_SOURCES = xtest.c
xtest_OBJECTS = xtest.$(OBJEXT)
-@UNITTESTS_TRUE@xtest_DEPENDENCIES = $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@xtest_DEPENDENCIES = $(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = libxservertest.c input.c xkb.c xtest.c
-DIST_SOURCES = libxservertest.c input.c xkb.c xtest.c
+SOURCES = $(nodist_libxservertest_la_SOURCES) fixes.c input.c list.c \
+ misc.c xkb.c xtest.c
+DIST_SOURCES = fixes.c input.c list.c misc.c xkb.c xtest.c
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
@@ -113,8 +124,8 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AGP_FALSE = @AGP_FALSE@
AGP_TRUE = @AGP_TRUE@
-AIGLX_FALSE = @AIGLX_FALSE@
-AIGLX_TRUE = @AIGLX_TRUE@
+AIGLX_DRI_LOADER_FALSE = @AIGLX_DRI_LOADER_FALSE@
+AIGLX_DRI_LOADER_TRUE = @AIGLX_DRI_LOADER_TRUE@
ALLOCA = @ALLOCA@
ALPHA_VIDEO_FALSE = @ALPHA_VIDEO_FALSE@
ALPHA_VIDEO_TRUE = @ALPHA_VIDEO_TRUE@
@@ -127,7 +138,6 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
-ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@
ARM_VIDEO_FALSE = @ARM_VIDEO_FALSE@
ARM_VIDEO_TRUE = @ARM_VIDEO_TRUE@
AS = @AS@
@@ -140,18 +150,19 @@ BSD_APM_FALSE = @BSD_APM_FALSE@
BSD_APM_TRUE = @BSD_APM_TRUE@
BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@
BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@
-BUILDDOCS_FALSE = @BUILDDOCS_FALSE@
-BUILDDOCS_TRUE = @BUILDDOCS_TRUE@
BUILD_DATE = @BUILD_DATE@
BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@
BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@
BUILD_TIME = @BUILD_TIME@
+BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
+CLIENTIDS_FALSE = @CLIENTIDS_FALSE@
+CLIENTIDS_TRUE = @CLIENTIDS_TRUE@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
COMPOSITE_FALSE = @COMPOSITE_FALSE@
COMPOSITE_TRUE = @COMPOSITE_TRUE@
@@ -168,12 +179,7 @@ CONFIG_WSCONS_TRUE = @CONFIG_WSCONS_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
-DARWIN_LIBS = @DARWIN_LIBS@
DBE_FALSE = @DBE_FALSE@
DBE_TRUE = @DBE_TRUE@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -208,7 +214,6 @@ DMX_BUILD_USB_FALSE = @DMX_BUILD_USB_FALSE@
DMX_BUILD_USB_TRUE = @DMX_BUILD_USB_TRUE@
DMX_FALSE = @DMX_FALSE@
DMX_TRUE = @DMX_TRUE@
-DOLT_BASH = @DOLT_BASH@
DOXYGEN = @DOXYGEN@
DPMSExtension_FALSE = @DPMSExtension_FALSE@
DPMSExtension_TRUE = @DPMSExtension_TRUE@
@@ -229,7 +234,7 @@ DRI_LIBS = @DRI_LIBS@
DRI_TRUE = @DRI_TRUE@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -238,11 +243,12 @@ ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@
ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@
ENABLE_DOCS_FALSE = @ENABLE_DOCS_FALSE@
ENABLE_DOCS_TRUE = @ENABLE_DOCS_TRUE@
+ENABLE_UNIT_TESTS_FALSE = @ENABLE_UNIT_TESTS_FALSE@
+ENABLE_UNIT_TESTS_TRUE = @ENABLE_UNIT_TESTS_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
FBDEVHW_FALSE = @FBDEVHW_FALSE@
FBDEVHW_TRUE = @FBDEVHW_TRUE@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
FONT100DPIDIR = @FONT100DPIDIR@
@@ -255,11 +261,10 @@ FONTTYPE1DIR = @FONTTYPE1DIR@
FOP = @FOP@
FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@
FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GLX_FALSE = @GLX_FALSE@
+GLX_TLS = @GLX_TLS@
GLX_TRUE = @GLX_TRUE@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
@@ -272,12 +277,16 @@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
HAVE_FOP_FALSE = @HAVE_FOP_FALSE@
HAVE_FOP_TRUE = @HAVE_FOP_TRUE@
+HAVE_LD_WRAP_FALSE = @HAVE_LD_WRAP_FALSE@
+HAVE_LD_WRAP_TRUE = @HAVE_LD_WRAP_TRUE@
HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@
HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@
HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@
HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@
HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@
HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@
+HAVE_XSLTPROC_FALSE = @HAVE_XSLTPROC_FALSE@
+HAVE_XSLTPROC_TRUE = @HAVE_XSLTPROC_TRUE@
HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@
HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@
HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@
@@ -323,7 +332,10 @@ KDRIVE_MOUSE_TRUE = @KDRIVE_MOUSE_TRUE@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
KDRIVE_TRUE = @KDRIVE_TRUE@
-LAUNCHD_ID_PREFIX = @LAUNCHD_ID_PREFIX@
+KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
+KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
+KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
LEX = @LEX@
@@ -342,19 +354,19 @@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@
LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@
LINUX_IA64_FALSE = @LINUX_IA64_FALSE@
LINUX_IA64_TRUE = @LINUX_IA64_TRUE@
+LIPO = @LIPO@
LNXACPI_FALSE = @LNXACPI_FALSE@
LNXACPI_TRUE = @LNXACPI_TRUE@
LNXAPM_FALSE = @LNXAPM_FALSE@
LNXAPM_TRUE = @LNXAPM_TRUE@
LN_S = @LN_S@
-LTCOMPILE = @LTCOMPILE@
-LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAIN_LIB = @MAIN_LIB@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
@@ -364,6 +376,7 @@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@
NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@
NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@
NEED_VSNPRINTF_TRUE = @NEED_VSNPRINTF_TRUE@
+NM = @NM@
NMEDIT = @NMEDIT@
OBJC = @OBJC@
OBJCCLD = @OBJCCLD@
@@ -375,6 +388,8 @@ OBJEXT = @OBJEXT@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
OPENSSL_LIBS = @OPENSSL_LIBS@
OS_LIB = @OS_LIB@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -385,7 +400,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PERL = @PERL@
PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
PIXMAN_LIBS = @PIXMAN_LIBS@
PKG_CONFIG = @PKG_CONFIG@
@@ -427,6 +441,7 @@ SPECIAL_DTRACE_OBJECTS_FALSE = @SPECIAL_DTRACE_OBJECTS_FALSE@
SPECIAL_DTRACE_OBJECTS_TRUE = @SPECIAL_DTRACE_OBJECTS_TRUE@
STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@
STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
SYSCONFDIR = @SYSCONFDIR@
@@ -436,8 +451,6 @@ TSLIB_LIBS = @TSLIB_LIBS@
TSLIB_TRUE = @TSLIB_TRUE@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
-UNITTESTS_FALSE = @UNITTESTS_FALSE@
-UNITTESTS_TRUE = @UNITTESTS_TRUE@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
VBE_FALSE = @VBE_FALSE@
VBE_TRUE = @VBE_TRUE@
@@ -454,8 +467,6 @@ XAA_FALSE = @XAA_FALSE@
XAA_TRUE = @XAA_TRUE@
XACE_FALSE = @XACE_FALSE@
XACE_TRUE = @XACE_TRUE@
-XCALIBRATE_FALSE = @XCALIBRATE_FALSE@
-XCALIBRATE_TRUE = @XCALIBRATE_TRUE@
XCSECURITY_FALSE = @XCSECURITY_FALSE@
XCSECURITY_TRUE = @XCSECURITY_TRUE@
XDMAUTH_FALSE = @XDMAUTH_FALSE@
@@ -491,6 +502,11 @@ XINERAMA_TRUE = @XINERAMA_TRUE@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
+XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
+XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
+XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
+XKB_DFLT_RULES = @XKB_DFLT_RULES@
+XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
XLIB_CFLAGS = @XLIB_CFLAGS@
XLIB_LIBS = @XLIB_LIBS@
@@ -522,6 +538,7 @@ XORG_TRUE = @XORG_TRUE@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
XQUARTZ_FALSE = @XQUARTZ_FALSE@
+XQUARTZ_LIBS = @XQUARTZ_LIBS@
XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XQUARTZ_SPARKLE_FALSE = @XQUARTZ_SPARKLE_FALSE@
XQUARTZ_SPARKLE_TRUE = @XQUARTZ_SPARKLE_TRUE@
@@ -540,6 +557,7 @@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@
XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@
XSERVER_LIBS = @XSERVER_LIBS@
XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
+XSLTPROC = @XSLTPROC@
XSL_STYLESHEET = @XSL_STYLESHEET@
XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
@@ -584,13 +602,11 @@ abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@
am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@
am__include = @am__include@
@@ -640,35 +656,44 @@ symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
sysconfigdir = @sysconfigdir@
target_alias = @target_alias@
-@UNITTESTS_TRUE@SUBDIRS = . xi2
-@UNITTESTS_TRUE@check_LTLIBRARIES = libxservertest.la
-@UNITTESTS_TRUE@TESTS = $(check_PROGRAMS)
-@UNITTESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
-@UNITTESTS_TRUE@INCLUDES = @XORG_INCS@
-@UNITTESTS_TRUE@TEST_LDADD = libxservertest.la $(XORG_SYS_LIBS) \
-@UNITTESTS_TRUE@ $(XSERVER_SYS_LIBS) $(GLIB_LIBS) \
-@UNITTESTS_TRUE@ $(am__append_1)
-@UNITTESTS_TRUE@xkb_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@input_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@xtest_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@libxservertest_la_LIBADD = \
-@UNITTESTS_TRUE@ $(XSERVER_LIBS) \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
-@UNITTESTS_TRUE@ $(top_builddir)/hw/xfree86/libxorg.la \
-@UNITTESTS_TRUE@ $(top_builddir)/mi/libmi.la \
-@UNITTESTS_TRUE@ $(top_builddir)/os/libos.la \
-@UNITTESTS_TRUE@ @XORG_LIBS@
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@SUBDIRS = . xi2
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@check_LTLIBRARIES = libxservertest.la
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@TESTS = $(noinst_PROGRAMS)
+@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) -I$(top_srcdir)/hw/xfree86/parser \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ -I$(top_srcdir)/miext/cw -I$(top_srcdir)/hw/xfree86/ddc \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ -I$(top_srcdir)/hw/xfree86/ramdac
+
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@TEST_LDADD = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ libxservertest.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(XORG_SYS_LIBS) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(XSERVER_SYS_LIBS) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__append_1)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@xkb_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@input_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@xtest_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@list_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@misc_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@fixes_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@nodist_libxservertest_la_SOURCES = $(top_builddir)/hw/xfree86/sdksyms.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@libxservertest_la_LIBADD = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(XSERVER_LIBS) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config_internal.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/mi/libmi.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(top_builddir)/os/libos.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ @XORG_LIBS@
-CLEANFILES = libxservertest.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@libxservertest_la_DEPENDENCIES = $(libxservertest_la_LIBADD)
all: all-recursive
.SUFFIXES:
@@ -714,15 +739,24 @@ clean-checkLTLIBRARIES:
libxservertest.la: $(libxservertest_la_OBJECTS) $(libxservertest_la_DEPENDENCIES)
$(LINK) $(am_libxservertest_la_rpath) $(libxservertest_la_LDFLAGS) $(libxservertest_la_OBJECTS) $(libxservertest_la_LIBADD) $(LIBS)
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; for p in $$list; do \
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
+fixes$(EXEEXT): $(fixes_OBJECTS) $(fixes_DEPENDENCIES)
+ @rm -f fixes$(EXEEXT)
+ $(LINK) $(fixes_LDFLAGS) $(fixes_OBJECTS) $(fixes_LDADD) $(LIBS)
input$(EXEEXT): $(input_OBJECTS) $(input_DEPENDENCIES)
@rm -f input$(EXEEXT)
$(LINK) $(input_LDFLAGS) $(input_OBJECTS) $(input_LDADD) $(LIBS)
+list$(EXEEXT): $(list_OBJECTS) $(list_DEPENDENCIES)
+ @rm -f list$(EXEEXT)
+ $(LINK) $(list_LDFLAGS) $(list_OBJECTS) $(list_LDADD) $(LIBS)
+misc$(EXEEXT): $(misc_OBJECTS) $(misc_DEPENDENCIES)
+ @rm -f misc$(EXEEXT)
+ $(LINK) $(misc_LDFLAGS) $(misc_OBJECTS) $(misc_LDADD) $(LIBS)
xkb$(EXEEXT): $(xkb_OBJECTS) $(xkb_DEPENDENCIES)
@rm -f xkb$(EXEEXT)
$(LINK) $(xkb_LDFLAGS) $(xkb_OBJECTS) $(xkb_LDADD) $(LIBS)
@@ -736,8 +770,11 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fixes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxservertest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdksyms.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest.Po@am__quote@
@@ -762,6 +799,13 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+sdksyms.lo: $(top_builddir)/hw/xfree86/sdksyms.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdksyms.lo -MD -MP -MF "$(DEPDIR)/sdksyms.Tpo" -c -o sdksyms.lo `test -f '$(top_builddir)/hw/xfree86/sdksyms.c' || echo '$(srcdir)/'`$(top_builddir)/hw/xfree86/sdksyms.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sdksyms.Tpo" "$(DEPDIR)/sdksyms.Plo"; else rm -f "$(DEPDIR)/sdksyms.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/hw/xfree86/sdksyms.c' object='sdksyms.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdksyms.lo `test -f '$(top_builddir)/hw/xfree86/sdksyms.c' || echo '$(srcdir)/'`$(top_builddir)/hw/xfree86/sdksyms.c
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1020,10 +1064,10 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-recursive
-all-am: Makefile
+all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
@@ -1043,7 +1087,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1053,8 +1096,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
-clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
- clean-libtool mostlyclean-am
+clean-am: clean-checkLTLIBRARIES clean-generic clean-libtool \
+ clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
@@ -1105,8 +1148,8 @@ uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \
- check-am clean clean-checkLTLIBRARIES clean-checkPROGRAMS \
- clean-generic clean-libtool clean-recursive ctags \
+ check-am clean clean-checkLTLIBRARIES clean-generic \
+ clean-libtool clean-noinstPROGRAMS clean-recursive ctags \
ctags-recursive distclean distclean-compile distclean-generic \
distclean-libtool distclean-recursive distclean-tags distdir \
dvi dvi-am html html-am info info-am install install-am \
@@ -1119,9 +1162,6 @@ uninstall-info: uninstall-info-recursive
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-info-am
-
-libxservertest.c:
- touch $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/xserver/test/fixes.c b/xserver/test/fixes.c
new file mode 100644
index 000000000..8c804ba26
--- /dev/null
+++ b/xserver/test/fixes.c
@@ -0,0 +1,327 @@
+/**
+ * Copyright © 2011 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <X11/X.h>
+#include <xfixesint.h>
+#include <X11/extensions/xfixeswire.h>
+
+static void
+_fixes_test_direction(struct PointerBarrier *barrier, int d[4], int permitted)
+{
+ BOOL blocking;
+ int i, j;
+ int dir = barrier_get_direction(d[0], d[1], d[2], d[3]);
+
+ barrier->directions = 0;
+ blocking = barrier_is_blocking_direction(barrier, dir);
+ assert(blocking);
+
+ for (j = 0; j <= BarrierNegativeY; j++)
+ {
+ for (i = 0; i <= BarrierNegativeY; i++)
+ {
+ barrier->directions |= 1 << i;
+ blocking = barrier_is_blocking_direction(barrier, dir);
+ assert((barrier->directions & permitted) == permitted ? !blocking : blocking);
+ }
+ }
+
+}
+
+static void
+fixes_pointer_barrier_direction_test(void)
+{
+ struct PointerBarrier barrier;
+
+ int x = 100;
+ int y = 100;
+
+ int directions[8][4] = {
+ { x, y, x, y + 100}, /* S */
+ { x + 50, y, x - 50, y + 100}, /* SW */
+ { x + 100, y, x, y}, /* W */
+ { x + 100, y + 50, x, y - 50}, /* NW */
+ { x, y + 100, x, y}, /* N */
+ { x - 50, y + 100, x + 50, y}, /* NE */
+ { x, y, x + 100, y}, /* E */
+ { x, y - 50, x + 100, y + 50}, /* SE */
+ };
+
+ barrier.x1 = x;
+ barrier.x2 = x;
+ barrier.y1 = y - 50;
+ barrier.y2 = y + 49;
+
+
+ _fixes_test_direction(&barrier, directions[0], BarrierPositiveY);
+ _fixes_test_direction(&barrier, directions[1], BarrierPositiveY | BarrierNegativeX);
+ _fixes_test_direction(&barrier, directions[2], BarrierNegativeX);
+ _fixes_test_direction(&barrier, directions[3], BarrierNegativeY | BarrierNegativeX);
+ _fixes_test_direction(&barrier, directions[4], BarrierNegativeY);
+ _fixes_test_direction(&barrier, directions[5], BarrierPositiveX | BarrierNegativeY);
+ _fixes_test_direction(&barrier, directions[6], BarrierPositiveX);
+ _fixes_test_direction(&barrier, directions[7], BarrierPositiveY | BarrierPositiveX);
+
+
+}
+
+
+static void
+fixes_pointer_barriers_test(void)
+{
+ struct PointerBarrier barrier;
+ int x1, y1, x2, y2;
+ double distance;
+
+ int x = 100;
+ int y = 100;
+
+ /* vert barrier */
+ barrier.x1 = x;
+ barrier.x2 = x;
+ barrier.y1 = y - 50;
+ barrier.y2 = y + 50;
+
+ /* across at half-way */
+ x1 = x + 1;
+ x2 = x - 1;
+ y1 = y;
+ y2 = y;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+ assert(distance == 1);
+
+ /* definitely not across */
+ x1 = x + 10;
+ x2 = x + 5;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* across, but outside of y range */
+ x1 = x + 1;
+ x2 = x -1;
+ y1 = y + 100;
+ y2 = y + 100;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* across, diagonally */
+ x1 = x + 5;
+ x2 = x - 5;
+ y1 = y + 5;
+ y2 = y - 5;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* across but outside boundary, diagonally */
+ x1 = x + 5;
+ x2 = x - 5;
+ y1 = y + 100;
+ y2 = y + 50;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: startpoint of movement on barrier → blocking */
+ x1 = x;
+ x2 = x - 1;
+ y1 = y;
+ y2 = y;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: startpoint of movement on barrier → not blocking, positive */
+ x1 = x;
+ x2 = x + 1;
+ y1 = y;
+ y2 = y;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: startpoint of movement on barrier → not blocking, negative */
+ x1 = x - 1;
+ x2 = x - 2;
+ y1 = y;
+ y2 = y;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: endpoint of movement on barrier → blocking */
+ x1 = x + 1;
+ x2 = x;
+ y1 = y;
+ y2 = y;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* startpoint on barrier but outside y range */
+ x1 = x;
+ x2 = x - 1;
+ y1 = y + 100;
+ y2 = y + 100;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* endpoint on barrier but outside y range */
+ x1 = x + 1;
+ x2 = x;
+ y1 = y + 100;
+ y2 = y + 100;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+
+ /* horizontal barrier */
+ barrier.x1 = x - 50;
+ barrier.x2 = x + 50;
+ barrier.y1 = y;
+ barrier.y2 = y;
+
+ /* across at half-way */
+ x1 = x;
+ x2 = x;
+ y1 = y - 1;
+ y2 = y + 1;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* definitely not across */
+ y1 = y + 10;
+ y2 = y + 5;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* across, but outside of y range */
+ x1 = x + 100;
+ x2 = x + 100;
+ y1 = y + 1;
+ y2 = y -1;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* across, diagonally */
+ y1 = y + 5;
+ y2 = y - 5;
+ x1 = x + 5;
+ x2 = x - 5;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* across but outside boundary, diagonally */
+ y1 = y + 5;
+ y2 = y - 5;
+ x1 = x + 100;
+ x2 = x + 50;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: startpoint of movement on barrier → blocking */
+ y1 = y;
+ y2 = y - 1;
+ x1 = x;
+ x2 = x;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: startpoint of movement on barrier → not blocking, positive */
+ y1 = y;
+ y2 = y + 1;
+ x1 = x;
+ x2 = x;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: startpoint of movement on barrier → not blocking, negative */
+ y1 = y - 1;
+ y2 = y - 2;
+ x1 = x;
+ x2 = x;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* edge case: endpoint of movement on barrier → blocking */
+ y1 = y + 1;
+ y2 = y;
+ x1 = x;
+ x2 = x;
+ assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* startpoint on barrier but outside y range */
+ y1 = y;
+ y2 = y - 1;
+ x1 = x + 100;
+ x2 = x + 100;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+ /* endpoint on barrier but outside y range */
+ y1 = y + 1;
+ y2 = y;
+ x1 = x + 100;
+ x2 = x + 100;
+ assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance));
+
+}
+
+static void fixes_pointer_barrier_clamp_test(void)
+{
+ struct PointerBarrier barrier;
+
+ int x = 100;
+ int y = 100;
+
+ int cx, cy; /* clamped */
+
+ /* vert barrier */
+ barrier.x1 = x;
+ barrier.x2 = x;
+ barrier.y1 = y - 50;
+ barrier.y2 = y + 49;
+ barrier.directions = 0;
+
+ cx = INT_MAX;
+ cy = INT_MAX;
+ barrier_clamp_to_barrier(&barrier, BarrierPositiveX, &cx, &cy);
+ assert(cx == barrier.x1 - 1);
+ assert(cy == INT_MAX);
+
+ cx = 0;
+ cy = INT_MAX;
+ barrier_clamp_to_barrier(&barrier, BarrierNegativeX, &cx, &cy);
+ assert(cx == barrier.x1);
+ assert(cy == INT_MAX);
+
+ /* horiz barrier */
+ barrier.x1 = x - 50;
+ barrier.x2 = x + 49;
+ barrier.y1 = y;
+ barrier.y2 = y;
+ barrier.directions = 0;
+
+ cx = INT_MAX;
+ cy = INT_MAX;
+ barrier_clamp_to_barrier(&barrier, BarrierPositiveY, &cx, &cy);
+ assert(cx == INT_MAX);
+ assert(cy == barrier.y1 - 1);
+
+ cx = INT_MAX;
+ cy = 0;
+ barrier_clamp_to_barrier(&barrier, BarrierNegativeY, &cx, &cy);
+ assert(cx == INT_MAX);
+ assert(cy == barrier.y1);
+}
+
+int main(int argc, char** argv)
+{
+
+ fixes_pointer_barriers_test();
+ fixes_pointer_barrier_direction_test();
+ fixes_pointer_barrier_clamp_test();
+
+ return 0;
+}
diff --git a/xserver/test/input.c b/xserver/test/input.c
index d1c4dd9cc..6a0c523b8 100644
--- a/xserver/test/input.c
+++ b/xserver/test/input.c
@@ -36,9 +36,11 @@
#include "inputstr.h"
#include "eventconvert.h"
#include "exevents.h"
+#include "exglobals.h"
#include "dixgrabs.h"
#include "eventstr.h"
-#include <glib.h>
+#include "inpututils.h"
+#include "assert.h"
/**
* Init a device with axes.
@@ -58,24 +60,24 @@ static void dix_init_valuators(void)
memset(&dev, 0, sizeof(DeviceIntRec));
dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */
- g_assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
- g_assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
+ assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
+ assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
val = dev.valuator;
- g_assert(val);
- g_assert(val->numAxes == num_axes);
- g_assert(val->numMotionEvents == 0);
- g_assert(val->mode == Absolute);
- g_assert(val->axisVal);
+ assert(val);
+ assert(val->numAxes == num_axes);
+ assert(val->numMotionEvents == 0);
+ assert(val->axisVal);
for (i = 0; i < num_axes; i++)
{
- g_assert(val->axisVal[i] == 0);
- g_assert(val->axes->min_value == NO_AXIS_LIMITS);
- g_assert(val->axes->max_value == NO_AXIS_LIMITS);
+ assert(val->axisVal[i] == 0);
+ assert(val->axes->min_value == NO_AXIS_LIMITS);
+ assert(val->axes->max_value == NO_AXIS_LIMITS);
+ assert(val->axes->mode == Absolute);
}
- g_assert(dev.last.numValuators == num_axes);
+ assert(dev.last.numValuators == num_axes);
}
/* just check the known success cases, and that error cases set the client's
@@ -95,48 +97,48 @@ static void dix_check_grab_values(void)
param.ownerEvents = FALSE;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
+ assert(rc == Success);
param.this_device_mode = GrabModeAsync;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
+ assert(rc == Success);
param.this_device_mode = GrabModeAsync + 1;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.this_device_mode);
- g_assert(client.errorValue == GrabModeAsync + 1);
+ assert(rc == BadValue);
+ assert(client.errorValue == param.this_device_mode);
+ assert(client.errorValue == GrabModeAsync + 1);
param.this_device_mode = GrabModeSync;
param.other_devices_mode = GrabModeAsync;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
+ assert(rc == Success);
param.other_devices_mode = GrabModeAsync + 1;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.other_devices_mode);
- g_assert(client.errorValue == GrabModeAsync + 1);
+ assert(rc == BadValue);
+ assert(client.errorValue == param.other_devices_mode);
+ assert(client.errorValue == GrabModeAsync + 1);
param.other_devices_mode = GrabModeSync;
param.modifiers = 1 << 13;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.modifiers);
- g_assert(client.errorValue == (1 << 13));
+ assert(rc == BadValue);
+ assert(client.errorValue == param.modifiers);
+ assert(client.errorValue == (1 << 13));
param.modifiers = AnyModifier;
param.ownerEvents = TRUE;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == Success);
+ assert(rc == Success);
param.ownerEvents = 3;
rc = CheckGrabValues(&client, &param);
- g_assert(rc == BadValue);
- g_assert(client.errorValue == param.ownerEvents);
- g_assert(client.errorValue == 3);
+ assert(rc == BadValue);
+ assert(client.errorValue == param.ownerEvents);
+ assert(client.errorValue == 3);
}
@@ -147,29 +149,32 @@ static void dix_check_grab_values(void)
static void dix_event_to_core(int type)
{
DeviceEvent ev;
- xEvent core;
+ xEvent *core;
int time;
int x, y;
int rc;
int state;
int detail;
+ int count;
const int ROOT_WINDOW_ID = 0x100;
/* EventToCore memsets the event to 0 */
#define test_event() \
- g_assert(rc == Success); \
- g_assert(core.u.u.type == type); \
- g_assert(core.u.u.detail == detail); \
- g_assert(core.u.keyButtonPointer.time == time); \
- g_assert(core.u.keyButtonPointer.rootX == x); \
- g_assert(core.u.keyButtonPointer.rootY == y); \
- g_assert(core.u.keyButtonPointer.state == state); \
- g_assert(core.u.keyButtonPointer.eventX == 0); \
- g_assert(core.u.keyButtonPointer.eventY == 0); \
- g_assert(core.u.keyButtonPointer.root == ROOT_WINDOW_ID); \
- g_assert(core.u.keyButtonPointer.event == 0); \
- g_assert(core.u.keyButtonPointer.child == 0); \
- g_assert(core.u.keyButtonPointer.sameScreen == FALSE);
+ assert(rc == Success); \
+ assert(core); \
+ assert(count == 1); \
+ assert(core->u.u.type == type); \
+ assert(core->u.u.detail == detail); \
+ assert(core->u.keyButtonPointer.time == time); \
+ assert(core->u.keyButtonPointer.rootX == x); \
+ assert(core->u.keyButtonPointer.rootY == y); \
+ assert(core->u.keyButtonPointer.state == state); \
+ assert(core->u.keyButtonPointer.eventX == 0); \
+ assert(core->u.keyButtonPointer.eventY == 0); \
+ assert(core->u.keyButtonPointer.root == ROOT_WINDOW_ID); \
+ assert(core->u.keyButtonPointer.event == 0); \
+ assert(core->u.keyButtonPointer.child == 0); \
+ assert(core->u.keyButtonPointer.sameScreen == FALSE);
x = 0;
y = 0;
@@ -190,30 +195,33 @@ static void dix_event_to_core(int type)
ev.type = type;
ev.detail.key = 0;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
x = 1;
y = 2;
ev.root_x = x;
ev.root_y = y;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
x = 0x7FFF;
y = 0x7FFF;
ev.root_x = x;
ev.root_y = y;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
x = 0x8000; /* too high */
y = 0x8000; /* too high */
ev.root_x = x;
ev.root_y = y;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(core.u.keyButtonPointer.rootX != x);
- g_assert(core.u.keyButtonPointer.rootY != y);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ assert(rc == Success);
+ assert(core);
+ assert(count == 1);
+ assert(core->u.keyButtonPointer.rootX != x);
+ assert(core->u.keyButtonPointer.rootY != y);
x = 0x7FFF;
y = 0x7FFF;
@@ -221,68 +229,65 @@ static void dix_event_to_core(int type)
ev.root_y = y;
time = 0;
ev.time = time;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
detail = 1;
ev.detail.key = detail;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
detail = 0xFF; /* highest value */
ev.detail.key = detail;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
detail = 0xFFF; /* too big */
ev.detail.key = detail;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(rc == BadMatch);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ assert(rc == BadMatch);
detail = 0xFF; /* too big */
ev.detail.key = detail;
state = 0xFFFF; /* highest value */
ev.corestate = state;
- rc = EventToCore((InternalEvent*)&ev, &core);
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
test_event();
state = 0x10000; /* too big */
ev.corestate = state;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(core.u.keyButtonPointer.state != state);
- g_assert(core.u.keyButtonPointer.state == (state & 0xFFFF));
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ assert(rc == Success);
+ assert(core);
+ assert(count == 1);
+ assert(core->u.keyButtonPointer.state != state);
+ assert(core->u.keyButtonPointer.state == (state & 0xFFFF));
#undef test_event
}
-static void dix_event_to_core_conversion(void)
+static void dix_event_to_core_fail(int evtype, int expected_rc)
{
DeviceEvent ev;
- xEvent core;
+ xEvent *core;
int rc;
+ int count;
ev.header = 0xFF;
ev.length = sizeof(DeviceEvent);
- ev.type = 0;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(rc == BadImplementation);
-
- ev.type = 1;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(rc == BadImplementation);
-
- ev.type = ET_ProximityOut + 1;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(rc == BadImplementation);
-
- ev.type = ET_ProximityIn;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(rc == BadMatch);
+ ev.type = evtype;
+ rc = EventToCore((InternalEvent*)&ev, &core, &count);
+ assert(rc == expected_rc);
+}
- ev.type = ET_ProximityOut;
- rc = EventToCore((InternalEvent*)&ev, &core);
- g_assert(rc == BadMatch);
+static void dix_event_to_core_conversion(void)
+{
+ dix_event_to_core_fail(0, BadImplementation);
+ dix_event_to_core_fail(1, BadImplementation);
+ dix_event_to_core_fail(ET_ProximityOut + 1, BadImplementation);
+ dix_event_to_core_fail(ET_ProximityIn, BadMatch);
+ dix_event_to_core_fail(ET_ProximityOut, BadMatch);
dix_event_to_core(ET_KeyPress);
dix_event_to_core(ET_KeyRelease);
@@ -291,10 +296,147 @@ static void dix_event_to_core_conversion(void)
dix_event_to_core(ET_Motion);
}
+static void
+_dix_test_xi_convert(DeviceEvent *ev, int expected_rc, int expected_count)
+{
+ xEvent *xi;
+ int count = 0;
+ int rc;
+
+ rc = EventToXI((InternalEvent*)ev, &xi, &count);
+ assert(rc == expected_rc);
+ assert(count >= expected_count);
+ if (count > 0){
+ deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer*)xi;
+ assert(kbp->type == IEventBase + ev->type);
+ assert(kbp->detail == ev->detail.key);
+ assert(kbp->time == ev->time);
+ assert((kbp->deviceid & ~MORE_EVENTS) == ev->deviceid);
+ assert(kbp->root_x == ev->root_x);
+ assert(kbp->root_y == ev->root_y);
+ assert(kbp->state == ev->corestate);
+ assert(kbp->event_x == 0);
+ assert(kbp->event_y == 0);
+ assert(kbp->root == ev->root);
+ assert(kbp->event == 0);
+ assert(kbp->child == 0);
+ assert(kbp->same_screen == FALSE);
+
+ while (--count > 0) {
+ deviceValuator *v = (deviceValuator*)&xi[count];
+ assert(v->type == DeviceValuator);
+ assert(v->num_valuators <= 6);
+ }
+
+
+ free(xi);
+ }
+}
+
+/**
+ * This tests for internal event → XI1 event conversion
+ * - all conversions should generate the right XI event type
+ * - right number of events generated
+ * - extra events are valuators
+ */
+static void dix_event_to_xi1_conversion(void)
+{
+ DeviceEvent ev = {0};
+ int time;
+ int x, y;
+ int state;
+ int detail;
+ const int ROOT_WINDOW_ID = 0x100;
+ int deviceid;
+
+ IEventBase = 80;
+ DeviceValuator = IEventBase - 1;
+ DeviceKeyPress = IEventBase + ET_KeyPress;
+ DeviceKeyRelease = IEventBase + ET_KeyRelease;
+ DeviceButtonPress = IEventBase + ET_ButtonPress;
+ DeviceButtonRelease = IEventBase + ET_ButtonRelease;
+ DeviceMotionNotify = IEventBase + ET_Motion;
+ DeviceFocusIn = IEventBase + ET_FocusIn;
+ DeviceFocusOut = IEventBase + ET_FocusOut;
+ ProximityIn = IEventBase + ET_ProximityIn;
+ ProximityOut = IEventBase + ET_ProximityOut;
+
+ /* EventToXI callocs */
+ x = 0;
+ y = 0;
+ time = 12345;
+ state = 0;
+ detail = 0;
+ deviceid = 4;
+
+ ev.header = 0xFF;
+
+ ev.header = 0xFF;
+ ev.length = sizeof(DeviceEvent);
+ ev.time = time;
+ ev.root_y = x;
+ ev.root_x = y;
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
+ ev.root = ROOT_WINDOW_ID;
+ ev.corestate = state;
+ ev.detail.key = detail;
+ ev.deviceid = deviceid;
+
+ /* test all types for bad match */
+ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 1);
+
+ /* No axes */
+ ClearBit(ev.valuators.mask, 0);
+ ClearBit(ev.valuators.mask, 1);
+ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1);
+ ev.type = ET_Motion; _dix_test_xi_convert(&ev, BadMatch, 0);
+ ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, BadMatch, 0);
+ ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, BadMatch, 0);
+
+ /* more than 6 axes → 2 valuator events */
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
+ SetBit(ev.valuators.mask, 2);
+ SetBit(ev.valuators.mask, 3);
+ SetBit(ev.valuators.mask, 4);
+ SetBit(ev.valuators.mask, 5);
+ SetBit(ev.valuators.mask, 6);
+ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 2);
+ ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 2);
+
+
+ /* keycode too high */
+ ev.type = ET_KeyPress;
+ ev.detail.key = 256;
+ _dix_test_xi_convert(&ev, Success, 0);
+
+ /* deviceid too high */
+ ev.type = ET_KeyPress;
+ ev.detail.key = 18;
+ ev.deviceid = 128;
+ _dix_test_xi_convert(&ev, Success, 0);
+}
+
+
static void xi2_struct_sizes(void)
{
#define compare(req) \
- g_assert(sizeof(req) == sz_##req);
+ assert(sizeof(req) == sz_##req);
compare(xXIQueryVersionReq);
compare(xXIWarpPointerReq);
@@ -334,23 +476,23 @@ static void dix_grab_matching(void)
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_XI2;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI2;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* XI2 grabs for different devices must fail, regardless of ignoreDevice
* XI2 grabs for master devices must fail against a slave */
@@ -374,28 +516,28 @@ static void dix_grab_matching(void)
b.device = &dev2;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.device = &dev2;
b.device = &dev1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.device = inputInfo.all_master_devices;
b.device = &dev1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.device = &dev1;
b.device = inputInfo.all_master_devices;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* ignoreDevice FALSE must fail for different devices for CORE and XI */
a.grabtype = GRABTYPE_XI;
@@ -405,7 +547,7 @@ static void dix_grab_matching(void)
a.modifierDevice = &dev1;
b.modifierDevice = &dev1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
@@ -414,7 +556,7 @@ static void dix_grab_matching(void)
a.modifierDevice = &dev1;
b.modifierDevice = &dev1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* ignoreDevice FALSE must fail for different modifier devices for CORE
* and XI */
@@ -425,7 +567,7 @@ static void dix_grab_matching(void)
a.modifierDevice = &dev1;
b.modifierDevice = &dev2;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
@@ -434,7 +576,7 @@ static void dix_grab_matching(void)
a.modifierDevice = &dev1;
b.modifierDevice = &dev2;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* different event type must fail */
a.grabtype = GRABTYPE_XI2;
@@ -446,9 +588,9 @@ static void dix_grab_matching(void)
a.type = XI_KeyPress;
b.type = XI_KeyRelease;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
@@ -459,9 +601,9 @@ static void dix_grab_matching(void)
a.type = XI_KeyPress;
b.type = XI_KeyRelease;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
@@ -472,9 +614,9 @@ static void dix_grab_matching(void)
a.type = XI_KeyPress;
b.type = XI_KeyRelease;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&a, &b, TRUE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* different modifiers must fail */
a.grabtype = GRABTYPE_XI2;
@@ -488,23 +630,23 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 2;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* AnyModifier must fail for XI2 */
a.grabtype = GRABTYPE_XI2;
@@ -512,9 +654,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = AnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* XIAnyModifier must fail for CORE and XI */
a.grabtype = GRABTYPE_XI;
@@ -522,18 +664,18 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = XIAnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
a.modifiersDetail.exact = XIAnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* different detail must fail */
a.grabtype = GRABTYPE_XI2;
@@ -543,23 +685,23 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* detail of AnyModifier must fail */
a.grabtype = GRABTYPE_XI2;
@@ -569,23 +711,23 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* detail of XIAnyModifier must fail */
a.grabtype = GRABTYPE_XI2;
@@ -595,23 +737,23 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == FALSE);
+ assert(rc == FALSE);
/* XIAnyModifier or AnyModifer must succeed */
a.grabtype = GRABTYPE_XI2;
@@ -621,9 +763,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = XIAnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
@@ -632,9 +774,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = AnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
@@ -643,9 +785,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = AnyModifier;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
/* AnyKey or XIAnyKeycode must succeed */
a.grabtype = GRABTYPE_XI2;
@@ -655,9 +797,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
a.grabtype = GRABTYPE_CORE;
b.grabtype = GRABTYPE_CORE;
@@ -666,9 +808,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
a.grabtype = GRABTYPE_XI;
b.grabtype = GRABTYPE_XI;
@@ -677,9 +819,9 @@ static void dix_grab_matching(void)
a.modifiersDetail.exact = 1;
b.modifiersDetail.exact = 1;
rc = GrabMatchesSecond(&a, &b, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
rc = GrabMatchesSecond(&b, &a, FALSE);
- g_assert(rc == TRUE);
+ assert(rc == TRUE);
}
static void test_bits_to_byte(int i)
@@ -687,9 +829,9 @@ static void test_bits_to_byte(int i)
int expected_bytes;
expected_bytes = (i + 7)/8;
- g_assert(bits_to_bytes(i) >= i/8);
- g_assert((bits_to_bytes(i) * 8) - i <= 7);
- g_assert(expected_bytes == bits_to_bytes(i));
+ assert(bits_to_bytes(i) >= i/8);
+ assert((bits_to_bytes(i) * 8) - i <= 7);
+ assert(expected_bytes == bits_to_bytes(i));
}
static void test_bytes_to_int32(int i)
@@ -697,9 +839,9 @@ static void test_bytes_to_int32(int i)
int expected_4byte;
expected_4byte = (i + 3)/4;
- g_assert(bytes_to_int32(i) <= i);
- g_assert((bytes_to_int32(i) * 4) - i <= 3);
- g_assert(expected_4byte == bytes_to_int32(i));
+ assert(bytes_to_int32(i) <= i);
+ assert((bytes_to_int32(i) * 4) - i <= 3);
+ assert(expected_4byte == bytes_to_int32(i));
}
static void test_pad_to_int32(int i)
@@ -707,13 +849,13 @@ static void test_pad_to_int32(int i)
int expected_bytes;
expected_bytes = ((i + 3)/4) * 4;
- g_assert(pad_to_int32(i) >= i);
- g_assert(pad_to_int32(i) - i <= 3);
- g_assert(expected_bytes == pad_to_int32(i));
+ assert(pad_to_int32(i) >= i);
+ assert(pad_to_int32(i) - i <= 3);
+ assert(expected_bytes == pad_to_int32(i));
}
static void include_byte_padding_macros(void)
{
- g_test_message("Testing bits_to_bytes()");
+ printf("Testing bits_to_bytes()\n");
/* the macros don't provide overflow protection */
test_bits_to_byte(0);
@@ -726,7 +868,7 @@ static void include_byte_padding_macros(void)
test_bits_to_byte(INT_MAX - 9);
test_bits_to_byte(INT_MAX - 8);
- g_test_message("Testing bytes_to_int32()");
+ printf("Testing bytes_to_int32()\n");
test_bytes_to_int32(0);
test_bytes_to_int32(1);
@@ -742,7 +884,7 @@ static void include_byte_padding_macros(void)
test_bytes_to_int32(INT_MAX - 4);
test_bytes_to_int32(INT_MAX - 3);
- g_test_message("Testing pad_to_int32");
+ printf("Testing pad_to_int32\n");
test_pad_to_int32(0);
test_pad_to_int32(0);
@@ -768,47 +910,47 @@ static void xi_unregister_handlers(void)
memset(&dev, 0, sizeof(dev));
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 1);
+ assert(handler == 1);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 2);
+ assert(handler == 2);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 3);
+ assert(handler == 3);
- g_test_message("Unlinking from front.");
+ printf("Unlinking from front.\n");
XIUnregisterPropertyHandler(&dev, 4); /* NOOP */
- g_assert(dev.properties.handlers->id == 3);
+ assert(dev.properties.handlers->id == 3);
XIUnregisterPropertyHandler(&dev, 3);
- g_assert(dev.properties.handlers->id == 2);
+ assert(dev.properties.handlers->id == 2);
XIUnregisterPropertyHandler(&dev, 2);
- g_assert(dev.properties.handlers->id == 1);
+ assert(dev.properties.handlers->id == 1);
XIUnregisterPropertyHandler(&dev, 1);
- g_assert(dev.properties.handlers == NULL);
+ assert(dev.properties.handlers == NULL);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 4);
+ assert(handler == 4);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 5);
+ assert(handler == 5);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 6);
+ assert(handler == 6);
XIUnregisterPropertyHandler(&dev, 3); /* NOOP */
- g_assert(dev.properties.handlers->next->next->next == NULL);
+ assert(dev.properties.handlers->next->next->next == NULL);
XIUnregisterPropertyHandler(&dev, 4);
- g_assert(dev.properties.handlers->next->next == NULL);
+ assert(dev.properties.handlers->next->next == NULL);
XIUnregisterPropertyHandler(&dev, 5);
- g_assert(dev.properties.handlers->next == NULL);
+ assert(dev.properties.handlers->next == NULL);
XIUnregisterPropertyHandler(&dev, 6);
- g_assert(dev.properties.handlers == NULL);
+ assert(dev.properties.handlers == NULL);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 7);
+ assert(handler == 7);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 8);
+ assert(handler == 8);
handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL);
- g_assert(handler == 9);
+ assert(handler == 9);
XIDeleteAllDeviceProperties(&dev);
- g_assert(dev.properties.handlers == NULL);
+ assert(dev.properties.handlers == NULL);
XIUnregisterPropertyHandler(&dev, 7); /* NOOP */
}
@@ -818,44 +960,44 @@ static void cmp_attr_fields(InputAttributes *attr1,
{
char **tags1, **tags2;
- g_assert(attr1 && attr2);
- g_assert(attr1 != attr2);
- g_assert(attr1->flags == attr2->flags);
+ assert(attr1 && attr2);
+ assert(attr1 != attr2);
+ assert(attr1->flags == attr2->flags);
if (attr1->product != NULL)
{
- g_assert(attr1->product != attr2->product);
- g_assert(strcmp(attr1->product, attr2->product) == 0);
+ assert(attr1->product != attr2->product);
+ assert(strcmp(attr1->product, attr2->product) == 0);
} else
- g_assert(attr2->product == NULL);
+ assert(attr2->product == NULL);
if (attr1->vendor != NULL)
{
- g_assert(attr1->vendor != attr2->vendor);
- g_assert(strcmp(attr1->vendor, attr2->vendor) == 0);
+ assert(attr1->vendor != attr2->vendor);
+ assert(strcmp(attr1->vendor, attr2->vendor) == 0);
} else
- g_assert(attr2->vendor == NULL);
+ assert(attr2->vendor == NULL);
if (attr1->device != NULL)
{
- g_assert(attr1->device != attr2->device);
- g_assert(strcmp(attr1->device, attr2->device) == 0);
+ assert(attr1->device != attr2->device);
+ assert(strcmp(attr1->device, attr2->device) == 0);
} else
- g_assert(attr2->device == NULL);
+ assert(attr2->device == NULL);
if (attr1->pnp_id != NULL)
{
- g_assert(attr1->pnp_id != attr2->pnp_id);
- g_assert(strcmp(attr1->pnp_id, attr2->pnp_id) == 0);
+ assert(attr1->pnp_id != attr2->pnp_id);
+ assert(strcmp(attr1->pnp_id, attr2->pnp_id) == 0);
} else
- g_assert(attr2->pnp_id == NULL);
+ assert(attr2->pnp_id == NULL);
if (attr1->usb_id != NULL)
{
- g_assert(attr1->usb_id != attr2->usb_id);
- g_assert(strcmp(attr1->usb_id, attr2->usb_id) == 0);
+ assert(attr1->usb_id != attr2->usb_id);
+ assert(strcmp(attr1->usb_id, attr2->usb_id) == 0);
} else
- g_assert(attr2->usb_id == NULL);
+ assert(attr2->usb_id == NULL);
tags1 = attr1->tags;
tags2 = attr2->tags;
@@ -863,25 +1005,25 @@ static void cmp_attr_fields(InputAttributes *attr1,
/* if we don't have any tags, skip the tag checking bits */
if (!tags1)
{
- g_assert(!tags2);
+ assert(!tags2);
return;
}
/* Don't lug around empty arrays */
- g_assert(*tags1);
- g_assert(*tags2);
+ assert(*tags1);
+ assert(*tags2);
/* check for identical content, but duplicated */
while (*tags1)
{
- g_assert(*tags1 != *tags2);
- g_assert(strcmp(*tags1, *tags2) == 0);
+ assert(*tags1 != *tags2);
+ assert(strcmp(*tags1, *tags2) == 0);
tags1++;
tags2++;
}
/* ensure tags1 and tags2 have the same no of elements */
- g_assert(!*tags2);
+ assert(!*tags2);
/* check for not sharing memory */
tags1 = attr1->tags;
@@ -889,7 +1031,7 @@ static void cmp_attr_fields(InputAttributes *attr1,
{
tags2 = attr2->tags;
while (*tags2)
- g_assert(*tags1 != *tags2++);
+ assert(*tags1 != *tags2++);
tags1++;
}
@@ -902,10 +1044,10 @@ static void dix_input_attributes(void)
char *tags[4] = {"tag1", "tag2", "tag2", NULL};
new = DuplicateInputAttributes(NULL);
- g_assert(!new);
+ assert(!new);
new = DuplicateInputAttributes(&orig);
- g_assert(memcmp(&orig, new, sizeof(InputAttributes)) == 0);
+ assert(memcmp(&orig, new, sizeof(InputAttributes)) == 0);
orig.product = "product name";
new = DuplicateInputAttributes(&orig);
@@ -943,21 +1085,170 @@ static void dix_input_attributes(void)
FreeInputAttributes(new);
}
+static void dix_input_valuator_masks(void)
+{
+ ValuatorMask *mask = NULL, *copy;
+ int nvaluators = MAX_VALUATORS;
+ int valuators[nvaluators];
+ int i;
+ int first_val, num_vals;
+
+ for (i = 0; i < nvaluators; i++)
+ valuators[i] = i;
-int main(int argc, char** argv)
+ mask = valuator_mask_new(nvaluators);
+ assert(mask != NULL);
+ assert(valuator_mask_size(mask) == 0);
+ assert(valuator_mask_num_valuators(mask) == 0);
+
+ for (i = 0; i < nvaluators; i++)
+ {
+ assert(!valuator_mask_isset(mask, i));
+ valuator_mask_set(mask, i, valuators[i]);
+ assert(valuator_mask_isset(mask, i));
+ assert(valuator_mask_get(mask, i) == valuators[i]);
+ assert(valuator_mask_size(mask) == i + 1);
+ assert(valuator_mask_num_valuators(mask) == i + 1);
+ }
+
+ for (i = 0; i < nvaluators; i++)
+ {
+ assert(valuator_mask_isset(mask, i));
+ valuator_mask_unset(mask, i);
+ /* we're removing valuators from the front, so size should stay the
+ * same until the last bit is removed */
+ if (i < nvaluators - 1)
+ assert(valuator_mask_size(mask) == nvaluators);
+ assert(!valuator_mask_isset(mask, i));
+ }
+
+ assert(valuator_mask_size(mask) == 0);
+ valuator_mask_zero(mask);
+ assert(valuator_mask_size(mask) == 0);
+ assert(valuator_mask_num_valuators(mask) == 0);
+ for (i = 0; i < nvaluators; i++)
+ assert(!valuator_mask_isset(mask, i));
+
+ first_val = 5;
+ num_vals = 6;
+
+ valuator_mask_set_range(mask, first_val, num_vals, valuators);
+ assert(valuator_mask_size(mask) == first_val + num_vals);
+ assert(valuator_mask_num_valuators(mask) == num_vals);
+ for (i = 0; i < nvaluators; i++)
+ {
+ if (i < first_val || i >= first_val + num_vals)
+ assert(!valuator_mask_isset(mask, i));
+ else
+ {
+ assert(valuator_mask_isset(mask, i));
+ assert(valuator_mask_get(mask, i) == valuators[i - first_val]);
+ }
+ }
+
+ copy = valuator_mask_new(nvaluators);
+ valuator_mask_copy(copy, mask);
+ assert(mask != copy);
+ assert(valuator_mask_size(mask) == valuator_mask_size(copy));
+ assert(valuator_mask_num_valuators(mask) == valuator_mask_num_valuators(copy));
+
+ for (i = 0; i < nvaluators; i++)
+ {
+ assert(valuator_mask_isset(mask, i) == valuator_mask_isset(copy, i));
+ assert(valuator_mask_get(mask, i) == valuator_mask_get(copy, i));
+ }
+
+ valuator_mask_free(&mask);
+ assert(mask == NULL);
+}
+
+static void dix_valuator_mode(void)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
+ DeviceIntRec dev;
+ const int num_axes = MAX_VALUATORS;
+ int i;
+ Atom atoms[MAX_VALUATORS] = { 0 };
+
+ memset(&dev, 0, sizeof(DeviceIntRec));
+ dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */
- g_test_add_func("/dix/input/attributes", dix_input_attributes);
- g_test_add_func("/dix/input/init-valuators", dix_init_valuators);
- g_test_add_func("/dix/input/event-core-conversion", dix_event_to_core_conversion);
- g_test_add_func("/dix/input/check-grab-values", dix_check_grab_values);
- g_test_add_func("/dix/input/xi2-struct-sizes", xi2_struct_sizes);
- g_test_add_func("/dix/input/grab_matching", dix_grab_matching);
- g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros);
- g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers);
+ assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE);
+ assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute));
+ for (i = 0; i < num_axes; i++)
+ {
+ assert(valuator_get_mode(&dev, i) == Absolute);
+ valuator_set_mode(&dev, i, Relative);
+ assert(dev.valuator->axes[i].mode == Relative);
+ assert(valuator_get_mode(&dev, i) == Relative);
+ }
+
+ valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Absolute);
+ for (i = 0; i < num_axes; i++)
+ assert(valuator_get_mode(&dev, i) == Absolute);
- return g_test_run();
+ valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Relative);
+ for (i = 0; i < num_axes; i++)
+ assert(valuator_get_mode(&dev, i) == Relative);
+}
+
+static void include_bit_test_macros(void)
+{
+ uint8_t mask[9] = { 0 };
+ int i;
+
+ for (i = 0; i < sizeof(mask)/sizeof(mask[0]); i++)
+ {
+ assert(BitIsOn(mask, i) == 0);
+ SetBit(mask, i);
+ assert(BitIsOn(mask, i) == 1);
+ assert(!!(mask[i/8] & (1 << (i % 8))));
+ assert(CountBits(mask, sizeof(mask)) == 1);
+ ClearBit(mask, i);
+ assert(BitIsOn(mask, i) == 0);
+ }
+}
+
+/**
+ * Ensure that val->axisVal and val->axes are aligned on doubles.
+ */
+static void dix_valuator_alloc(void)
+{
+ ValuatorClassPtr v = NULL;
+ int num_axes = 0;
+
+ while (num_axes < 5)
+ {
+ v = AllocValuatorClass(v, num_axes);
+
+ assert(v);
+ assert(v->numAxes == num_axes);
+#if !defined(__i386__) && !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);
+#endif
+ num_axes ++;
+ }
+
+ free(v);
+}
+
+int main(int argc, char** argv)
+{
+ dix_input_valuator_masks();
+ dix_input_attributes();
+ dix_init_valuators();
+ dix_event_to_core_conversion();
+ dix_event_to_xi1_conversion();
+ dix_check_grab_values();
+ xi2_struct_sizes();
+ dix_grab_matching();
+ dix_valuator_mode();
+ include_byte_padding_macros();
+ include_bit_test_macros();
+ xi_unregister_handlers();
+ dix_valuator_alloc();
+
+ return 0;
}
diff --git a/xserver/test/list.c b/xserver/test/list.c
new file mode 100644
index 000000000..b101c7619
--- /dev/null
+++ b/xserver/test/list.c
@@ -0,0 +1,173 @@
+/**
+ * Copyright © 2011 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/Xlib.h>
+#include <list.h>
+#include <string.h>
+#include <assert.h>
+
+struct parent {
+ int a;
+ struct list children;
+ int b;
+};
+
+struct child {
+ int foo;
+ int bar;
+ struct list node;
+};
+
+static void
+test_list_init(void)
+{
+ struct parent parent, tmp;
+
+ memset(&parent, 0, sizeof(parent));
+ parent.a = 0xa5a5a5;
+ parent.b = ~0xa5a5a5;
+
+ tmp = parent;
+
+ list_init(&parent.children);
+
+ /* test we haven't touched anything else. */
+ assert(parent.a == tmp.a);
+ assert(parent.b == tmp.b);
+
+ assert(list_is_empty(&parent.children));
+}
+
+static void
+test_list_add(void)
+{
+ struct parent parent = {0};
+ struct child child[3];
+ struct child *c;
+
+ list_init(&parent.children);
+
+ list_add(&child[0].node, &parent.children);
+ assert(!list_is_empty(&parent.children));
+
+ c = list_first_entry(&parent.children, struct child, node);
+ assert(memcmp(c, &child[0], sizeof(struct child)) == 0);
+
+ /* note: list_add prepends */
+ list_add(&child[1].node, &parent.children);
+ c = list_first_entry(&parent.children, struct child, node);
+ assert(memcmp(c, &child[1], sizeof(struct child)) == 0);
+
+ list_add(&child[2].node, &parent.children);
+ c = list_first_entry(&parent.children, struct child, node);
+ assert(memcmp(c, &child[2], sizeof(struct child)) == 0);
+};
+
+static void
+test_list_del(void)
+{
+ struct parent parent = {0};
+ struct child child[3];
+ struct child *c;
+
+ list_init(&parent.children);
+
+ list_add(&child[0].node, &parent.children);
+ assert(!list_is_empty(&parent.children));
+
+ list_del(&parent.children);
+ assert(list_is_empty(&parent.children));
+
+ list_add(&child[0].node, &parent.children);
+ list_del(&child[0].node);
+ assert(list_is_empty(&parent.children));
+
+ list_add(&child[0].node, &parent.children);
+ list_add(&child[1].node, &parent.children);
+
+ c = list_first_entry(&parent.children, struct child, node);
+ assert(memcmp(c, &child[1], sizeof(struct child)) == 0);
+
+ /* delete first node */
+ list_del(&child[1].node);
+ assert(!list_is_empty(&parent.children));
+ assert(list_is_empty(&child[1].node));
+ c = list_first_entry(&parent.children, struct child, node);
+ assert(memcmp(c, &child[0], sizeof(struct child)) == 0);
+
+ /* delete last node */
+ list_add(&child[1].node, &parent.children);
+ list_del(&child[0].node);
+ c = list_first_entry(&parent.children, struct child, node);
+ assert(memcmp(c, &child[1], sizeof(struct child)) == 0);
+
+ /* delete list head */
+ list_add(&child[0].node, &parent.children);
+ list_del(&parent.children);
+ assert(list_is_empty(&parent.children));
+ assert(!list_is_empty(&child[1].node));
+ assert(!list_is_empty(&child[2].node));
+}
+
+static void
+test_list_for_each(void)
+{
+ struct parent parent = {0};
+ struct child child[3];
+ struct child *c;
+ int i = 0;
+
+ list_init(&parent.children);
+
+ list_add(&child[2].node, &parent.children);
+ list_add(&child[1].node, &parent.children);
+ list_add(&child[0].node, &parent.children);
+
+ list_for_each_entry(c, &parent.children, node) {
+ assert(memcmp(c, &child[i], sizeof(struct child)) == 0);
+ i++;
+ }
+
+ /* foreach on empty list */
+ list_del(&parent.children);
+ assert(list_is_empty(&parent.children));
+
+ list_for_each_entry(c, &parent.children, node) {
+ assert(0); /* we must not get here */
+ }
+}
+
+
+int main(int argc, char** argv)
+{
+ test_list_init();
+ test_list_add();
+ test_list_del();
+ test_list_for_each();
+
+ return 0;
+}
diff --git a/xserver/test/misc.c b/xserver/test/misc.c
new file mode 100644
index 000000000..3d3b1a1e3
--- /dev/null
+++ b/xserver/test/misc.c
@@ -0,0 +1,62 @@
+/**
+ * Copyright © 2011 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdint.h>
+#include "misc.h"
+
+static void dix_version_compare(void)
+{
+ int rc;
+
+ rc = version_compare(0, 0, 1, 0);
+ assert(rc < 0);
+ rc = version_compare(1, 0, 0, 0);
+ assert(rc > 0);
+ rc = version_compare(0, 0, 0, 0);
+ assert(rc == 0);
+ rc = version_compare(1, 0, 1, 0);
+ assert(rc == 0);
+ rc = version_compare(1, 0, 0, 9);
+ assert(rc > 0);
+ rc = version_compare(0, 9, 1, 0);
+ assert(rc < 0);
+ rc = version_compare(1, 0, 1, 9);
+ assert(rc < 0);
+ rc = version_compare(1, 9, 1, 0);
+ assert(rc > 0);
+ rc = version_compare(2, 0, 1, 9);
+ assert(rc > 0);
+ rc = version_compare(1, 9, 2, 0);
+ assert(rc < 0);
+}
+
+int main(int argc, char** argv)
+{
+ dix_version_compare();
+
+ return 0;
+}
diff --git a/xserver/test/xi2/Makefile.am b/xserver/test/xi2/Makefile.am
index d8dc7e9ce..b15d8ba02 100644
--- a/xserver/test/xi2/Makefile.am
+++ b/xserver/test/xi2/Makefile.am
@@ -1,20 +1,22 @@
-if UNITTESTS
-check_PROGRAMS = \
+if ENABLE_UNIT_TESTS
+if HAVE_LD_WRAP
+noinst_PROGRAMS = \
protocol-xiqueryversion \
protocol-xiquerydevice \
protocol-xiselectevents \
protocol-xigetselectedevents \
protocol-xisetclientpointer \
protocol-xigetclientpointer \
+ protocol-xipassivegrabdevice \
protocol-xiquerypointer \
protocol-xiwarppointer \
protocol-eventconvert
-TESTS=$(check_PROGRAMS)
+TESTS=$(noinst_PROGRAMS)
-AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
+AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
-TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
+TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
COMMON_SOURCES=protocol-common.h protocol-common.c
if SPECIAL_DTRACE_OBJECTS
@@ -28,6 +30,7 @@ protocol_xigetselectedevents_LDADD=$(TEST_LDADD)
protocol_xisetclientpointer_LDADD=$(TEST_LDADD)
protocol_xigetclientpointer_LDADD=$(TEST_LDADD)
protocol_xiquerypointer_LDADD=$(TEST_LDADD)
+protocol_xipassivegrabdevice_LDADD=$(TEST_LDADD)
protocol_xiwarppointer_LDADD=$(TEST_LDADD)
protocol_eventconvert_LDADD=$(TEST_LDADD)
@@ -37,6 +40,7 @@ protocol_xiselectevents_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,dixLookupWindow -Wl,-wra
protocol_xigetselectedevents_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow -Wl,-wrap,AddResource
protocol_xisetclientpointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,dixLookupClient
protocol_xigetclientpointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupClient
+protocol_xipassivegrabdevice_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,GrabButton -Wl,-wrap,dixLookupWindow -Wl,-wrap,WriteToClient
protocol_xiquerypointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
protocol_xiwarppointer_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
@@ -47,5 +51,7 @@ protocol_xigetselectedevents_SOURCES=$(COMMON_SOURCES) protocol-xigetselectedeve
protocol_xisetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xisetclientpointer.c
protocol_xigetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xigetclientpointer.c
protocol_xiquerypointer_SOURCES=$(COMMON_SOURCES) protocol-xiquerypointer.c
+protocol_xipassivegrabdevice_SOURCES=$(COMMON_SOURCES) protocol-xipassivegrabdevice.c
protocol_xiwarppointer_SOURCES=$(COMMON_SOURCES) protocol-xiwarppointer.c
endif
+endif
diff --git a/xserver/test/xi2/Makefile.in b/xserver/test/xi2/Makefile.in
index 037ed3afc..e40620035 100644
--- a/xserver/test/xi2/Makefile.in
+++ b/xserver/test/xi2/Makefile.in
@@ -13,6 +13,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -35,21 +36,25 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@UNITTESTS_TRUE@check_PROGRAMS = protocol-xiqueryversion$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xiquerydevice$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xiselectevents$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xigetselectedevents$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xisetclientpointer$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xigetclientpointer$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xiquerypointer$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-xiwarppointer$(EXEEXT) \
-@UNITTESTS_TRUE@ protocol-eventconvert$(EXEEXT)
-@SPECIAL_DTRACE_OBJECTS_TRUE@@UNITTESTS_TRUE@am__append_1 = $(OS_LIB) $(DIX_LIB)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@noinst_PROGRAMS = protocol-xiqueryversion$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiquerydevice$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiselectevents$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xigetselectedevents$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xisetclientpointer$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xigetclientpointer$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xipassivegrabdevice$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiquerypointer$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiwarppointer$(EXEEXT) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-eventconvert$(EXEEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@am__append_1 = $(OS_LIB) $(DIX_LIB)
subdir = test/xi2
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
- $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/configure.ac
+ $(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
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(install_sh) -d
@@ -62,93 +67,103 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/kdrive-config.h \
$(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
protocol_eventconvert_SOURCES = protocol-eventconvert.c
protocol_eventconvert_OBJECTS = protocol-eventconvert.$(OBJEXT)
am__DEPENDENCIES_1 =
-@SPECIAL_DTRACE_OBJECTS_TRUE@@UNITTESTS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
-@SPECIAL_DTRACE_OBJECTS_TRUE@@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1)
-@UNITTESTS_TRUE@am__DEPENDENCIES_3 = ../libxservertest.la \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
-@UNITTESTS_TRUE@protocol_eventconvert_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@SPECIAL_DTRACE_OBJECTS_TRUE@ $(am__DEPENDENCIES_1)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am__DEPENDENCIES_3 = ../libxservertest.la \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__DEPENDENCIES_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__DEPENDENCIES_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__DEPENDENCIES_2)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_eventconvert_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xigetclientpointer_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xigetclientpointer.c
-@UNITTESTS_TRUE@am__objects_1 = protocol-common.$(OBJEXT)
-@UNITTESTS_TRUE@am_protocol_xigetclientpointer_OBJECTS = \
-@UNITTESTS_TRUE@ $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xigetclientpointer.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am__objects_1 = protocol-common.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xigetclientpointer_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xigetclientpointer.$(OBJEXT)
protocol_xigetclientpointer_OBJECTS = \
$(am_protocol_xigetclientpointer_OBJECTS)
-@UNITTESTS_TRUE@protocol_xigetclientpointer_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetclientpointer_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xigetselectedevents_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xigetselectedevents.c
-@UNITTESTS_TRUE@am_protocol_xigetselectedevents_OBJECTS = \
-@UNITTESTS_TRUE@ $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xigetselectedevents.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xigetselectedevents_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xigetselectedevents.$(OBJEXT)
protocol_xigetselectedevents_OBJECTS = \
$(am_protocol_xigetselectedevents_OBJECTS)
-@UNITTESTS_TRUE@protocol_xigetselectedevents_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetselectedevents_DEPENDENCIES = $(am__DEPENDENCIES_3)
+am__protocol_xipassivegrabdevice_SOURCES_DIST = protocol-common.h \
+ protocol-common.c protocol-xipassivegrabdevice.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xipassivegrabdevice_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xipassivegrabdevice.$(OBJEXT)
+protocol_xipassivegrabdevice_OBJECTS = \
+ $(am_protocol_xipassivegrabdevice_OBJECTS)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xipassivegrabdevice_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xiquerydevice_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xiquerydevice.c
-@UNITTESTS_TRUE@am_protocol_xiquerydevice_OBJECTS = $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xiquerydevice.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xiquerydevice_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiquerydevice.$(OBJEXT)
protocol_xiquerydevice_OBJECTS = $(am_protocol_xiquerydevice_OBJECTS)
-@UNITTESTS_TRUE@protocol_xiquerydevice_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerydevice_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xiquerypointer_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xiquerypointer.c
-@UNITTESTS_TRUE@am_protocol_xiquerypointer_OBJECTS = $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xiquerypointer.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xiquerypointer_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiquerypointer.$(OBJEXT)
protocol_xiquerypointer_OBJECTS = \
$(am_protocol_xiquerypointer_OBJECTS)
-@UNITTESTS_TRUE@protocol_xiquerypointer_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerypointer_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xiqueryversion_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xiqueryversion.c
-@UNITTESTS_TRUE@am_protocol_xiqueryversion_OBJECTS = $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xiqueryversion.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xiqueryversion_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiqueryversion.$(OBJEXT)
protocol_xiqueryversion_OBJECTS = \
$(am_protocol_xiqueryversion_OBJECTS)
-@UNITTESTS_TRUE@protocol_xiqueryversion_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiqueryversion_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xiselectevents_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xiselectevents.c
-@UNITTESTS_TRUE@am_protocol_xiselectevents_OBJECTS = $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xiselectevents.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xiselectevents_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiselectevents.$(OBJEXT)
protocol_xiselectevents_OBJECTS = \
$(am_protocol_xiselectevents_OBJECTS)
-@UNITTESTS_TRUE@protocol_xiselectevents_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiselectevents_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xisetclientpointer_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xisetclientpointer.c
-@UNITTESTS_TRUE@am_protocol_xisetclientpointer_OBJECTS = \
-@UNITTESTS_TRUE@ $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xisetclientpointer.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xisetclientpointer_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xisetclientpointer.$(OBJEXT)
protocol_xisetclientpointer_OBJECTS = \
$(am_protocol_xisetclientpointer_OBJECTS)
-@UNITTESTS_TRUE@protocol_xisetclientpointer_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xisetclientpointer_DEPENDENCIES = $(am__DEPENDENCIES_3)
am__protocol_xiwarppointer_SOURCES_DIST = protocol-common.h \
protocol-common.c protocol-xiwarppointer.c
-@UNITTESTS_TRUE@am_protocol_xiwarppointer_OBJECTS = $(am__objects_1) \
-@UNITTESTS_TRUE@ protocol-xiwarppointer.$(OBJEXT)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am_protocol_xiwarppointer_OBJECTS = \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__objects_1) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ protocol-xiwarppointer.$(OBJEXT)
protocol_xiwarppointer_OBJECTS = $(am_protocol_xiwarppointer_OBJECTS)
-@UNITTESTS_TRUE@protocol_xiwarppointer_DEPENDENCIES = \
-@UNITTESTS_TRUE@ $(am__DEPENDENCIES_3)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiwarppointer_DEPENDENCIES = $(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = protocol-eventconvert.c \
$(protocol_xigetclientpointer_SOURCES) \
$(protocol_xigetselectedevents_SOURCES) \
+ $(protocol_xipassivegrabdevice_SOURCES) \
$(protocol_xiquerydevice_SOURCES) \
$(protocol_xiquerypointer_SOURCES) \
$(protocol_xiqueryversion_SOURCES) \
@@ -158,6 +173,7 @@ SOURCES = protocol-eventconvert.c \
DIST_SOURCES = protocol-eventconvert.c \
$(am__protocol_xigetclientpointer_SOURCES_DIST) \
$(am__protocol_xigetselectedevents_SOURCES_DIST) \
+ $(am__protocol_xipassivegrabdevice_SOURCES_DIST) \
$(am__protocol_xiquerydevice_SOURCES_DIST) \
$(am__protocol_xiquerypointer_SOURCES_DIST) \
$(am__protocol_xiqueryversion_SOURCES_DIST) \
@@ -172,8 +188,8 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AGP_FALSE = @AGP_FALSE@
AGP_TRUE = @AGP_TRUE@
-AIGLX_FALSE = @AIGLX_FALSE@
-AIGLX_TRUE = @AIGLX_TRUE@
+AIGLX_DRI_LOADER_FALSE = @AIGLX_DRI_LOADER_FALSE@
+AIGLX_DRI_LOADER_TRUE = @AIGLX_DRI_LOADER_TRUE@
ALLOCA = @ALLOCA@
ALPHA_VIDEO_FALSE = @ALPHA_VIDEO_FALSE@
ALPHA_VIDEO_TRUE = @ALPHA_VIDEO_TRUE@
@@ -186,7 +202,6 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
-ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@
ARM_VIDEO_FALSE = @ARM_VIDEO_FALSE@
ARM_VIDEO_TRUE = @ARM_VIDEO_TRUE@
AS = @AS@
@@ -199,18 +214,19 @@ BSD_APM_FALSE = @BSD_APM_FALSE@
BSD_APM_TRUE = @BSD_APM_TRUE@
BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@
BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@
-BUILDDOCS_FALSE = @BUILDDOCS_FALSE@
-BUILDDOCS_TRUE = @BUILDDOCS_TRUE@
BUILD_DATE = @BUILD_DATE@
BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@
BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@
BUILD_TIME = @BUILD_TIME@
+BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
+CLIENTIDS_FALSE = @CLIENTIDS_FALSE@
+CLIENTIDS_TRUE = @CLIENTIDS_TRUE@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
COMPOSITE_FALSE = @COMPOSITE_FALSE@
COMPOSITE_TRUE = @COMPOSITE_TRUE@
@@ -227,12 +243,7 @@ CONFIG_WSCONS_TRUE = @CONFIG_WSCONS_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
-DARWIN_LIBS = @DARWIN_LIBS@
DBE_FALSE = @DBE_FALSE@
DBE_TRUE = @DBE_TRUE@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -267,7 +278,6 @@ DMX_BUILD_USB_FALSE = @DMX_BUILD_USB_FALSE@
DMX_BUILD_USB_TRUE = @DMX_BUILD_USB_TRUE@
DMX_FALSE = @DMX_FALSE@
DMX_TRUE = @DMX_TRUE@
-DOLT_BASH = @DOLT_BASH@
DOXYGEN = @DOXYGEN@
DPMSExtension_FALSE = @DPMSExtension_FALSE@
DPMSExtension_TRUE = @DPMSExtension_TRUE@
@@ -288,7 +298,7 @@ DRI_LIBS = @DRI_LIBS@
DRI_TRUE = @DRI_TRUE@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -297,11 +307,12 @@ ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@
ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@
ENABLE_DOCS_FALSE = @ENABLE_DOCS_FALSE@
ENABLE_DOCS_TRUE = @ENABLE_DOCS_TRUE@
+ENABLE_UNIT_TESTS_FALSE = @ENABLE_UNIT_TESTS_FALSE@
+ENABLE_UNIT_TESTS_TRUE = @ENABLE_UNIT_TESTS_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
FBDEVHW_FALSE = @FBDEVHW_FALSE@
FBDEVHW_TRUE = @FBDEVHW_TRUE@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
FONT100DPIDIR = @FONT100DPIDIR@
@@ -314,11 +325,10 @@ FONTTYPE1DIR = @FONTTYPE1DIR@
FOP = @FOP@
FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@
FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GLX_FALSE = @GLX_FALSE@
+GLX_TLS = @GLX_TLS@
GLX_TRUE = @GLX_TRUE@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
@@ -331,12 +341,16 @@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
HAVE_FOP_FALSE = @HAVE_FOP_FALSE@
HAVE_FOP_TRUE = @HAVE_FOP_TRUE@
+HAVE_LD_WRAP_FALSE = @HAVE_LD_WRAP_FALSE@
+HAVE_LD_WRAP_TRUE = @HAVE_LD_WRAP_TRUE@
HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@
HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@
HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@
HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@
HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@
HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@
+HAVE_XSLTPROC_FALSE = @HAVE_XSLTPROC_FALSE@
+HAVE_XSLTPROC_TRUE = @HAVE_XSLTPROC_TRUE@
HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@
HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@
HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@
@@ -382,7 +396,10 @@ KDRIVE_MOUSE_TRUE = @KDRIVE_MOUSE_TRUE@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
KDRIVE_TRUE = @KDRIVE_TRUE@
-LAUNCHD_ID_PREFIX = @LAUNCHD_ID_PREFIX@
+KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
+KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@
+KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
LEX = @LEX@
@@ -401,19 +418,19 @@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@
LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@
LINUX_IA64_FALSE = @LINUX_IA64_FALSE@
LINUX_IA64_TRUE = @LINUX_IA64_TRUE@
+LIPO = @LIPO@
LNXACPI_FALSE = @LNXACPI_FALSE@
LNXACPI_TRUE = @LNXACPI_TRUE@
LNXAPM_FALSE = @LNXAPM_FALSE@
LNXAPM_TRUE = @LNXAPM_TRUE@
LN_S = @LN_S@
-LTCOMPILE = @LTCOMPILE@
-LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAIN_LIB = @MAIN_LIB@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
@@ -423,6 +440,7 @@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@
NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@
NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@
NEED_VSNPRINTF_TRUE = @NEED_VSNPRINTF_TRUE@
+NM = @NM@
NMEDIT = @NMEDIT@
OBJC = @OBJC@
OBJCCLD = @OBJCCLD@
@@ -434,6 +452,8 @@ OBJEXT = @OBJEXT@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
OPENSSL_LIBS = @OPENSSL_LIBS@
OS_LIB = @OS_LIB@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -444,7 +464,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
PCIACCESS_LIBS = @PCIACCESS_LIBS@
PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@
-PERL = @PERL@
PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
PIXMAN_LIBS = @PIXMAN_LIBS@
PKG_CONFIG = @PKG_CONFIG@
@@ -486,6 +505,7 @@ SPECIAL_DTRACE_OBJECTS_FALSE = @SPECIAL_DTRACE_OBJECTS_FALSE@
SPECIAL_DTRACE_OBJECTS_TRUE = @SPECIAL_DTRACE_OBJECTS_TRUE@
STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@
STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
SYSCONFDIR = @SYSCONFDIR@
@@ -495,8 +515,6 @@ TSLIB_LIBS = @TSLIB_LIBS@
TSLIB_TRUE = @TSLIB_TRUE@
UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
-UNITTESTS_FALSE = @UNITTESTS_FALSE@
-UNITTESTS_TRUE = @UNITTESTS_TRUE@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
VBE_FALSE = @VBE_FALSE@
VBE_TRUE = @VBE_TRUE@
@@ -513,8 +531,6 @@ XAA_FALSE = @XAA_FALSE@
XAA_TRUE = @XAA_TRUE@
XACE_FALSE = @XACE_FALSE@
XACE_TRUE = @XACE_TRUE@
-XCALIBRATE_FALSE = @XCALIBRATE_FALSE@
-XCALIBRATE_TRUE = @XCALIBRATE_TRUE@
XCSECURITY_FALSE = @XCSECURITY_FALSE@
XCSECURITY_TRUE = @XCSECURITY_TRUE@
XDMAUTH_FALSE = @XDMAUTH_FALSE@
@@ -550,6 +566,11 @@ XINERAMA_TRUE = @XINERAMA_TRUE@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
+XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@
+XKB_DFLT_MODEL = @XKB_DFLT_MODEL@
+XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@
+XKB_DFLT_RULES = @XKB_DFLT_RULES@
+XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@
XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@
XLIB_CFLAGS = @XLIB_CFLAGS@
XLIB_LIBS = @XLIB_LIBS@
@@ -581,6 +602,7 @@ XORG_TRUE = @XORG_TRUE@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
XQUARTZ_FALSE = @XQUARTZ_FALSE@
+XQUARTZ_LIBS = @XQUARTZ_LIBS@
XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XQUARTZ_SPARKLE_FALSE = @XQUARTZ_SPARKLE_FALSE@
XQUARTZ_SPARKLE_TRUE = @XQUARTZ_SPARKLE_TRUE@
@@ -599,6 +621,7 @@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@
XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@
XSERVER_LIBS = @XSERVER_LIBS@
XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@
+XSLTPROC = @XSLTPROC@
XSL_STYLESHEET = @XSL_STYLESHEET@
XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@
@@ -643,13 +666,11 @@ abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@
am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@
am__include = @am__include@
@@ -699,38 +720,42 @@ symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
sysconfigdir = @sysconfigdir@
target_alias = @target_alias@
-@UNITTESTS_TRUE@TESTS = $(check_PROGRAMS)
-@UNITTESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
-@UNITTESTS_TRUE@INCLUDES = @XORG_INCS@
-@UNITTESTS_TRUE@TEST_LDADD = ../libxservertest.la $(XORG_SYS_LIBS) \
-@UNITTESTS_TRUE@ $(XSERVER_SYS_LIBS) $(GLIB_LIBS) \
-@UNITTESTS_TRUE@ $(am__append_1)
-@UNITTESTS_TRUE@COMMON_SOURCES = protocol-common.h protocol-common.c
-@UNITTESTS_TRUE@protocol_xiqueryversion_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xiquerydevice_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xiselectevents_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xigetselectedevents_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xisetclientpointer_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xigetclientpointer_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xiquerypointer_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xiwarppointer_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_eventconvert_LDADD = $(TEST_LDADD)
-@UNITTESTS_TRUE@protocol_xiqueryversion_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient
-@UNITTESTS_TRUE@protocol_xiquerydevice_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient
-@UNITTESTS_TRUE@protocol_xiselectevents_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,dixLookupWindow -Wl,-wrap,XISetEventMask
-@UNITTESTS_TRUE@protocol_xigetselectedevents_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow -Wl,-wrap,AddResource
-@UNITTESTS_TRUE@protocol_xisetclientpointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,dixLookupClient
-@UNITTESTS_TRUE@protocol_xigetclientpointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupClient
-@UNITTESTS_TRUE@protocol_xiquerypointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
-@UNITTESTS_TRUE@protocol_xiwarppointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
-@UNITTESTS_TRUE@protocol_xiqueryversion_SOURCES = $(COMMON_SOURCES) protocol-xiqueryversion.c
-@UNITTESTS_TRUE@protocol_xiquerydevice_SOURCES = $(COMMON_SOURCES) protocol-xiquerydevice.c
-@UNITTESTS_TRUE@protocol_xiselectevents_SOURCES = $(COMMON_SOURCES) protocol-xiselectevents.c
-@UNITTESTS_TRUE@protocol_xigetselectedevents_SOURCES = $(COMMON_SOURCES) protocol-xigetselectedevents.c
-@UNITTESTS_TRUE@protocol_xisetclientpointer_SOURCES = $(COMMON_SOURCES) protocol-xisetclientpointer.c
-@UNITTESTS_TRUE@protocol_xigetclientpointer_SOURCES = $(COMMON_SOURCES) protocol-xigetclientpointer.c
-@UNITTESTS_TRUE@protocol_xiquerypointer_SOURCES = $(COMMON_SOURCES) protocol-xiquerypointer.c
-@UNITTESTS_TRUE@protocol_xiwarppointer_SOURCES = $(COMMON_SOURCES) protocol-xiwarppointer.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@TESTS = $(noinst_PROGRAMS)
+@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@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) \
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@ $(am__append_1)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@COMMON_SOURCES = protocol-common.h protocol-common.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiqueryversion_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerydevice_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiselectevents_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetselectedevents_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xisetclientpointer_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetclientpointer_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerypointer_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xipassivegrabdevice_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiwarppointer_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_eventconvert_LDADD = $(TEST_LDADD)
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiqueryversion_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerydevice_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiselectevents_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,dixLookupWindow -Wl,-wrap,XISetEventMask
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetselectedevents_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow -Wl,-wrap,AddResource
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xisetclientpointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,dixLookupClient
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetclientpointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupClient
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xipassivegrabdevice_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,GrabButton -Wl,-wrap,dixLookupWindow -Wl,-wrap,WriteToClient
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerypointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiwarppointer_LDFLAGS = $(AM_LDFLAGS) -Wl,-wrap,WriteToClient -Wl,-wrap,dixLookupWindow
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiqueryversion_SOURCES = $(COMMON_SOURCES) protocol-xiqueryversion.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerydevice_SOURCES = $(COMMON_SOURCES) protocol-xiquerydevice.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiselectevents_SOURCES = $(COMMON_SOURCES) protocol-xiselectevents.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetselectedevents_SOURCES = $(COMMON_SOURCES) protocol-xigetselectedevents.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xisetclientpointer_SOURCES = $(COMMON_SOURCES) protocol-xisetclientpointer.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xigetclientpointer_SOURCES = $(COMMON_SOURCES) protocol-xigetclientpointer.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiquerypointer_SOURCES = $(COMMON_SOURCES) protocol-xiquerypointer.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xipassivegrabdevice_SOURCES = $(COMMON_SOURCES) protocol-xipassivegrabdevice.c
+@ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@protocol_xiwarppointer_SOURCES = $(COMMON_SOURCES) protocol-xiwarppointer.c
all: all-am
.SUFFIXES:
@@ -765,8 +790,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; for p in $$list; do \
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
@@ -780,6 +805,9 @@ protocol-xigetclientpointer$(EXEEXT): $(protocol_xigetclientpointer_OBJECTS) $(p
protocol-xigetselectedevents$(EXEEXT): $(protocol_xigetselectedevents_OBJECTS) $(protocol_xigetselectedevents_DEPENDENCIES)
@rm -f protocol-xigetselectedevents$(EXEEXT)
$(LINK) $(protocol_xigetselectedevents_LDFLAGS) $(protocol_xigetselectedevents_OBJECTS) $(protocol_xigetselectedevents_LDADD) $(LIBS)
+protocol-xipassivegrabdevice$(EXEEXT): $(protocol_xipassivegrabdevice_OBJECTS) $(protocol_xipassivegrabdevice_DEPENDENCIES)
+ @rm -f protocol-xipassivegrabdevice$(EXEEXT)
+ $(LINK) $(protocol_xipassivegrabdevice_LDFLAGS) $(protocol_xipassivegrabdevice_OBJECTS) $(protocol_xipassivegrabdevice_LDADD) $(LIBS)
protocol-xiquerydevice$(EXEEXT): $(protocol_xiquerydevice_OBJECTS) $(protocol_xiquerydevice_DEPENDENCIES)
@rm -f protocol-xiquerydevice$(EXEEXT)
$(LINK) $(protocol_xiquerydevice_LDFLAGS) $(protocol_xiquerydevice_OBJECTS) $(protocol_xiquerydevice_LDADD) $(LIBS)
@@ -809,6 +837,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-eventconvert.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-xigetclientpointer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-xigetselectedevents.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-xipassivegrabdevice.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-xiquerydevice.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-xiquerypointer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol-xiqueryversion.Po@am__quote@
@@ -996,10 +1025,9 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
-all-am: Makefile
+all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
@@ -1027,7 +1055,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
@@ -1077,7 +1105,7 @@ ps-am:
uninstall-am: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ clean-generic clean-libtool clean-noinstPROGRAMS ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
diff --git a/xserver/test/xi2/protocol-common.c b/xserver/test/xi2/protocol-common.c
index 10d82a501..423453358 100644
--- a/xserver/test/xi2/protocol-common.c
+++ b/xserver/test/xi2/protocol-common.c
@@ -29,7 +29,6 @@
#include "extinit.h" /* for XInputExtensionInit */
#include "exglobals.h"
#include "xkbsrv.h" /* for XkbInitPrivates */
-#include <glib.h>
#include "protocol-common.h"
@@ -122,7 +121,7 @@ ClientRec init_client(int len, void *data)
void init_window(WindowPtr window, WindowPtr parent, int id)
{
- memset(window, 0, sizeof(window));
+ memset(window, 0, sizeof(*window));
window->drawable.id = id;
if (parent)
@@ -134,7 +133,7 @@ void init_window(WindowPtr window, WindowPtr parent, int id)
}
window->parent = parent;
window->optional = calloc(1, sizeof(WindowOptRec));
- g_assert(window->optional);
+ assert(window->optional);
}
extern DevPrivateKeyRec miPointerScreenKeyRec;
@@ -171,7 +170,7 @@ void init_simple(void)
void __wrap_WriteToClient(ClientPtr client, int len, void *data)
{
- g_assert(reply_handler != NULL);
+ assert(reply_handler != NULL);
(*reply_handler)(client, len, data, userdata);
}
diff --git a/xserver/test/xi2/protocol-common.h b/xserver/test/xi2/protocol-common.h
index afa08780c..b55f57c05 100644
--- a/xserver/test/xi2/protocol-common.h
+++ b/xserver/test/xi2/protocol-common.h
@@ -27,8 +27,8 @@
#include "scrnintstr.h"
#include "windowstr.h"
-#include "scrnintstr.h"
#include "exevents.h"
+#include <assert.h>
#ifndef PROTOCOL_COMMON_H
#define PROTOCOL_COMMON_H
@@ -38,11 +38,11 @@ extern int BadDevice;
/* Check default values in a reply */
#define reply_check_defaults(rep, len, type) \
{ \
- g_assert((len) >= sz_x##type##Reply); \
- g_assert((rep)->repType == X_Reply); \
- g_assert((rep)->RepType == X_##type); \
- g_assert((rep)->sequenceNumber == CLIENT_SEQUENCE); \
- g_assert((rep)->length >= (sz_x##type##Reply - 32)/4); \
+ assert((len) >= sz_x##type##Reply); \
+ assert((rep)->repType == X_Reply); \
+ assert((rep)->RepType == X_##type); \
+ assert((rep)->sequenceNumber == CLIENT_SEQUENCE); \
+ assert((rep)->length >= (sz_x##type##Reply - 32)/4); \
}
/* initialise default values for request */
diff --git a/xserver/test/xi2/protocol-eventconvert.c b/xserver/test/xi2/protocol-eventconvert.c
index 211cce6ad..6e61d74b4 100644
--- a/xserver/test/xi2/protocol-eventconvert.c
+++ b/xserver/test/xi2/protocol-eventconvert.c
@@ -25,7 +25,6 @@
#endif
#include <stdint.h>
-#include <glib.h>
#include "inputstr.h"
#include "eventstr.h"
@@ -33,7 +32,6 @@
#include "exevents.h"
#include <X11/extensions/XI2proto.h>
-
static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
BOOL swap)
{
@@ -58,21 +56,23 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
}
- g_assert(out->type == GenericEvent);
- g_assert(out->extension == 0); /* IReqCode defaults to 0 */
- g_assert(out->evtype == GetXI2Type((InternalEvent*)in));
- g_assert(out->time == in->time);
- g_assert(out->detail == in->detail.button);
- g_assert(out->deviceid == in->deviceid);
- g_assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(sizeof(in->valuators.mask))));
- g_assert(out->flags == 0); /* FIXME: we don't set the flags yet */
+ assert(out->type == GenericEvent);
+ assert(out->extension == 0); /* IReqCode defaults to 0 */
+ assert(out->evtype == GetXI2Type((InternalEvent*)in));
+ assert(out->time == in->time);
+ assert(out->detail == in->detail.button);
+ assert(out->deviceid == in->deviceid);
+ assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(sizeof(in->valuators.mask))));
+ assert(out->flags == 0); /* FIXME: we don't set the flags yet */
ptr = (unsigned char*)&out[1];
bits_set = 0;
for (i = 0; out->valuators_len && i < sizeof(in->valuators.mask) * 8; i++)
{
- g_assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i));
+ if (i >= MAX_VALUATORS)
+ assert (!XIMaskIsSet(in->valuators.mask, i));
+ assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i));
if (XIMaskIsSet(in->valuators.mask, i))
bits_set++;
}
@@ -81,13 +81,13 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
* set. Each bit set represents 2 8-byte values, hence the
* 'bits_set * 4' */
len = out->valuators_len + bits_set * 4;
- g_assert(out->length == len);
+ assert(out->length == len);
nvals = 0;
for (i = 0; out->valuators_len && i < MAX_VALUATORS; i++)
{
- g_assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i));
+ assert (XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i));
if (XIMaskIsSet(in->valuators.mask, i))
{
FP3232 vi, vo;
@@ -106,8 +106,8 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
swapl(&vo.frac, n);
}
- g_assert(vi.integral == vo.integral);
- g_assert(vi.frac == vo.frac);
+ assert(vi.integral == vo.integral);
+ assert(vi.frac == vo.frac);
raw_value = value + bits_set;
@@ -123,8 +123,8 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
swapl(&vo.frac, n);
}
- g_assert(vi.integral == vo.integral);
- g_assert(vi.frac == vo.frac);
+ assert(vi.integral == vo.integral);
+ assert(vi.frac == vo.frac);
nvals++;
}
@@ -137,7 +137,7 @@ static void test_XIRawEvent(RawDeviceEvent *in)
int rc;
rc = EventToXI2((InternalEvent*)in, (xEvent**)&out);
- g_assert(rc == Success);
+ assert(rc == Success);
test_values_XIRawEvent(in, out, FALSE);
@@ -158,24 +158,24 @@ static void test_convert_XIFocusEvent(void)
in.header = ET_Internal;
in.type = ET_Enter;
rc = EventToXI2((InternalEvent*)&in, &out);
- g_assert(rc == Success);
- g_assert(out == NULL);
+ assert(rc == Success);
+ assert(out == NULL);
in.header = ET_Internal;
in.type = ET_FocusIn;
rc = EventToXI2((InternalEvent*)&in, &out);
- g_assert(rc == Success);
- g_assert(out == NULL);
+ assert(rc == Success);
+ assert(out == NULL);
in.header = ET_Internal;
in.type = ET_FocusOut;
rc = EventToXI2((InternalEvent*)&in, &out);
- g_assert(rc == BadImplementation);
+ assert(rc == BadImplementation);
in.header = ET_Internal;
in.type = ET_Leave;
rc = EventToXI2((InternalEvent*)&in, &out);
- g_assert(rc == BadImplementation);
+ assert(rc == BadImplementation);
}
@@ -186,7 +186,7 @@ static void test_convert_XIRawEvent(void)
memset(&in, 0, sizeof(in));
- g_test_message("Testing all event types");
+ printf("Testing all event types\n");
in.header = ET_Internal;
in.type = ET_RawMotion;
test_XIRawEvent(&in);
@@ -207,7 +207,7 @@ static void test_convert_XIRawEvent(void)
in.type = ET_RawButtonRelease;
test_XIRawEvent(&in);
- g_test_message("Testing details and other fields");
+ printf("Testing details and other fields\n");
in.detail.button = 1L;
test_XIRawEvent(&in);
in.detail.button = 1L << 8;
@@ -239,8 +239,8 @@ static void test_convert_XIRawEvent(void)
in.deviceid = ~0 & 0xFF;
test_XIRawEvent(&in);
- g_test_message("Testing valuator masks");
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ printf("Testing valuator masks\n");
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIRawEvent(&in);
@@ -259,7 +259,7 @@ static void test_convert_XIRawEvent(void)
XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIRawEvent(&in);
@@ -272,6 +272,7 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out,
int buttons, valuators;
int i;
unsigned char *ptr;
+ uint32_t flagmask = 0;
FP3232 *values;
if (swap) {
@@ -297,72 +298,83 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out,
swapl(&out->mods.latched_mods, n);
swapl(&out->mods.locked_mods, n);
swapl(&out->mods.effective_mods, n);
+ swapl(&out->flags, n);
}
- g_assert(out->extension == 0); /* IReqCode defaults to 0 */
- g_assert(out->evtype == GetXI2Type((InternalEvent*)in));
- g_assert(out->time == in->time);
- g_assert(out->detail == in->detail.button);
- g_assert(out->length >= 12);
-
- g_assert(out->deviceid == in->deviceid);
- g_assert(out->sourceid == in->sourceid);
-
- g_assert(out->flags == 0); /* FIXME: we don't set the flags yet */
+ assert(out->extension == 0); /* IReqCode defaults to 0 */
+ assert(out->evtype == GetXI2Type((InternalEvent*)in));
+ assert(out->time == in->time);
+ assert(out->detail == in->detail.button);
+ assert(out->length >= 12);
+
+ assert(out->deviceid == in->deviceid);
+ assert(out->sourceid == in->sourceid);
+
+ switch (in->type) {
+ case ET_KeyPress:
+ flagmask = XIKeyRepeat;
+ break;
+ default:
+ flagmask = 0;
+ break;
+ }
+ assert((out->flags & ~flagmask) == 0);
- g_assert(out->root == in->root);
- g_assert(out->event == None); /* set in FixUpEventFromWindow */
- g_assert(out->child == None); /* set in FixUpEventFromWindow */
+ assert(out->root == in->root);
+ assert(out->event == None); /* set in FixUpEventFromWindow */
+ assert(out->child == None); /* set in FixUpEventFromWindow */
- g_assert(out->mods.base_mods == in->mods.base);
- g_assert(out->mods.latched_mods == in->mods.latched);
- g_assert(out->mods.locked_mods == in->mods.locked);
- g_assert(out->mods.effective_mods == in->mods.effective);
+ assert(out->mods.base_mods == in->mods.base);
+ assert(out->mods.latched_mods == in->mods.latched);
+ assert(out->mods.locked_mods == in->mods.locked);
+ assert(out->mods.effective_mods == in->mods.effective);
- g_assert(out->group.base_group == in->group.base);
- g_assert(out->group.latched_group == in->group.latched);
- g_assert(out->group.locked_group == in->group.locked);
- g_assert(out->group.effective_group == in->group.effective);
+ assert(out->group.base_group == in->group.base);
+ assert(out->group.latched_group == in->group.latched);
+ assert(out->group.locked_group == in->group.locked);
+ assert(out->group.effective_group == in->group.effective);
- g_assert(out->event_x == 0); /* set in FixUpEventFromWindow */
- g_assert(out->event_y == 0); /* set in FixUpEventFromWindow */
+ assert(out->event_x == 0); /* set in FixUpEventFromWindow */
+ assert(out->event_y == 0); /* set in FixUpEventFromWindow */
- g_assert(out->root_x == FP1616(in->root_x, in->root_x_frac));
- g_assert(out->root_y == FP1616(in->root_y, in->root_y_frac));
+ assert(out->root_x == FP1616(in->root_x, in->root_x_frac));
+ assert(out->root_y == FP1616(in->root_y, in->root_y_frac));
buttons = 0;
for (i = 0; i < bits_to_bytes(sizeof(in->buttons)); i++)
{
if (XIMaskIsSet(in->buttons, i))
{
- g_assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i)));
+ assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i)));
buttons++;
}
}
ptr = (unsigned char*)&out[1];
for (i = 0; i < sizeof(in->buttons) * 8; i++)
- g_assert(XIMaskIsSet(in->buttons, i) == XIMaskIsSet(ptr, i));
+ assert(XIMaskIsSet(in->buttons, i) == XIMaskIsSet(ptr, i));
valuators = 0;
- for (i = 0; i < sizeof(in->valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
if (XIMaskIsSet(in->valuators.mask, i))
valuators++;
- g_assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(valuators)));
+ assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(valuators)));
ptr += out->buttons_len * 4;
values = (FP3232*)(ptr + out->valuators_len * 4);
for (i = 0; i < sizeof(in->valuators.mask) * 8 ||
i < (out->valuators_len * 4) * 8; i++)
{
- if (i > sizeof(in->valuators.mask) * 8)
- g_assert(!XIMaskIsSet(ptr, i));
+ if (i >= MAX_VALUATORS)
+ assert(!XIMaskIsSet(in->valuators.mask, i) && !XIMaskIsSet(ptr, i));
+ else if (i > sizeof(in->valuators.mask) * 8)
+ assert(!XIMaskIsSet(ptr, i));
else if (i > out->valuators_len * 4 * 8)
- g_assert(!XIMaskIsSet(in->valuators.mask, i));
+ assert(!XIMaskIsSet(in->valuators.mask, i));
else {
- g_assert(XIMaskIsSet(in->valuators.mask, i) ==
+ assert(XIMaskIsSet(in->valuators.mask, i) ==
XIMaskIsSet(ptr, i));
if (XIMaskIsSet(ptr, i))
@@ -382,8 +394,8 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out,
}
- g_assert(vi.integral == vo.integral);
- g_assert(vi.frac == vo.frac);
+ assert(vi.integral == vo.integral);
+ assert(vi.frac == vo.frac);
values++;
}
}
@@ -396,7 +408,7 @@ static void test_XIDeviceEvent(DeviceEvent *in)
int rc;
rc = EventToXI2((InternalEvent*)in, (xEvent**)&out);
- g_assert(rc == Success);
+ assert(rc == Success);
test_values_XIDeviceEvent(in, out, FALSE);
@@ -415,7 +427,7 @@ static void test_convert_XIDeviceEvent(void)
memset(&in, 0, sizeof(in));
- g_test_message("Testing simple field values");
+ printf("Testing simple field values\n");
in.header = ET_Internal;
in.type = ET_Motion;
in.length = sizeof(DeviceEvent);
@@ -439,7 +451,7 @@ static void test_convert_XIDeviceEvent(void)
test_XIDeviceEvent(&in);
- g_test_message("Testing field ranges");
+ printf("Testing field ranges\n");
/* 32 bit */
in.detail.button = 1L;
test_XIDeviceEvent(&in);
@@ -587,7 +599,7 @@ static void test_convert_XIDeviceEvent(void)
in.mods.effective = ~0 & 0xFF;
test_XIDeviceEvent(&in);
- g_test_message("Testing button masks");
+ printf("Testing button masks\n");
for (i = 0; i < sizeof(in.buttons) * 8; i++)
{
XISetMask(in.buttons, i);
@@ -601,15 +613,15 @@ static void test_convert_XIDeviceEvent(void)
test_XIDeviceEvent(&in);
}
- g_test_message("Testing valuator masks");
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ printf("Testing valuator masks\n");
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIDeviceEvent(&in);
XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
@@ -619,7 +631,7 @@ static void test_convert_XIDeviceEvent(void)
XIClearMask(in.valuators.mask, i);
}
- for (i = 0; i < sizeof(in.valuators.mask) * 8; i++)
+ for (i = 0; i < MAX_VALUATORS; i++)
{
XISetMask(in.valuators.mask, i);
test_XIDeviceEvent(&in);
@@ -646,12 +658,12 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
swaps(&out->num_classes, n);
}
- g_assert(out->type == GenericEvent);
- g_assert(out->extension == 0); /* IReqCode defaults to 0 */
- g_assert(out->evtype == GetXI2Type((InternalEvent*)in));
- g_assert(out->time == in->time);
- g_assert(out->deviceid == in->deviceid);
- g_assert(out->sourceid == in->sourceid);
+ assert(out->type == GenericEvent);
+ assert(out->extension == 0); /* IReqCode defaults to 0 */
+ assert(out->evtype == GetXI2Type((InternalEvent*)in));
+ assert(out->time == in->time);
+ assert(out->deviceid == in->deviceid);
+ assert(out->sourceid == in->sourceid);
ptr = (unsigned char*)&out[1];
for (i = 0; i < out->num_classes; i++)
@@ -679,11 +691,11 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
swaps(&b->num_buttons, n);
}
- g_assert(b->length ==
+ assert(b->length ==
bytes_to_int32(sizeof(xXIButtonInfo)) +
bytes_to_int32(bits_to_bytes(b->num_buttons)) +
b->num_buttons);
- g_assert(b->num_buttons == in->buttons.num_buttons);
+ assert(b->num_buttons == in->buttons.num_buttons);
names = (Atom*)((char*)&b[1] +
pad_to_int32(bits_to_bytes(b->num_buttons)));
@@ -694,7 +706,7 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
char n;
swapl(&names[j], n);
}
- g_assert(names[j] == in->buttons.names[j]);
+ assert(names[j] == in->buttons.names[j]);
}
}
break;
@@ -709,10 +721,10 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
swaps(&k->num_keycodes, n);
}
- g_assert(k->length ==
+ assert(k->length ==
bytes_to_int32(sizeof(xXIKeyInfo)) +
k->num_keycodes);
- g_assert(k->num_keycodes == in->keys.max_keycode -
+ assert(k->num_keycodes == in->keys.max_keycode -
in->keys.min_keycode + 1);
kc = (uint32_t*)&k[1];
@@ -723,21 +735,22 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
char n;
swapl(&kc[j], n);
}
- g_assert(kc[j] >= in->keys.min_keycode);
- g_assert(kc[j] <= in->keys.max_keycode);
+ assert(kc[j] >= in->keys.min_keycode);
+ assert(kc[j] <= in->keys.max_keycode);
}
}
break;
case XIValuatorClass:
{
xXIValuatorInfo *v = (xXIValuatorInfo*)any;
- g_assert(v->length ==
+ assert(v->length ==
bytes_to_int32(sizeof(xXIValuatorInfo)));
}
break;
default:
- g_error("Invalid class type.\n");
+ printf("Invalid class type.\n\n");
+ assert(1);
break;
}
@@ -752,7 +765,7 @@ static void test_XIDeviceChangedEvent(DeviceChangedEvent *in)
int rc;
rc = EventToXI2((InternalEvent*)in, (xEvent**)&out);
- g_assert(rc == Success);
+ assert(rc == Success);
test_values_XIDeviceChangedEvent(in, out, FALSE);
@@ -769,7 +782,7 @@ static void test_convert_XIDeviceChangedEvent(void)
DeviceChangedEvent in;
int i;
- g_test_message("Testing simple field values");
+ printf("Testing simple field values\n");
memset(&in, 0, sizeof(in));
in.header = ET_Internal;
in.type = ET_DeviceChanged;
@@ -895,13 +908,10 @@ static void test_convert_XIDeviceChangedEvent(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
- g_test_add_func("/xi2/eventconvert/XIRawEvent", test_convert_XIRawEvent);
- g_test_add_func("/xi2/eventconvert/XIFocusEvent", test_convert_XIFocusEvent);
- g_test_add_func("/xi2/eventconvert/XIDeviceEvent", test_convert_XIDeviceEvent);
- g_test_add_func("/xi2/eventconvert/XIDeviceChangedEvent", test_convert_XIDeviceChangedEvent);
+ test_convert_XIRawEvent();
+ test_convert_XIFocusEvent();
+ test_convert_XIDeviceEvent();
+ test_convert_XIDeviceChangedEvent();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xigetclientpointer.c b/xserver/test/xi2/protocol-xigetclientpointer.c
index 6b4d04957..5e45e7b32 100644
--- a/xserver/test/xi2/protocol-xigetclientpointer.c
+++ b/xserver/test/xi2/protocol-xigetclientpointer.c
@@ -39,7 +39,6 @@
#include "exevents.h"
#include "protocol-common.h"
-#include <glib.h>
struct {
int cp_is_set;
@@ -79,9 +78,9 @@ static void reply_XIGetClientPointer(ClientPtr client, int len, char *data, void
reply_check_defaults(rep, len, XIGetClientPointer);
- g_assert(rep->set == test_data.cp_is_set);
+ assert(rep->set == test_data.cp_is_set);
if (rep->set)
- g_assert(rep->deviceid == test_data.dev->id);
+ assert(rep->deviceid == test_data.dev->id);
}
static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq* req, int error)
@@ -92,19 +91,19 @@ static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq*
test_data.win = req->win;
rc = ProcXIGetClientPointer(&client_request);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadWindow)
- g_assert(client_request.errorValue == req->win);
+ assert(client_request.errorValue == req->win);
client_request.swapped = TRUE;
swapl(&req->win, n);
swaps(&req->length, n);
rc = SProcXIGetClientPointer(&client_request);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadWindow)
- g_assert(client_request.errorValue == req->win);
+ assert(client_request.errorValue == req->win);
}
@@ -121,21 +120,21 @@ static void test_XIGetClientPointer(void)
client_request = init_client(request.length, &request);
- g_test_message("Testing invalid window");
+ printf("Testing invalid window\n");
request.win = INVALID_WINDOW_ID;
request_XIGetClientPointer(&client_request, &request, BadWindow);
test_data.cp_is_set = FALSE;
- g_test_message("Testing window None, unset ClientPointer.");
+ printf("Testing window None, unset ClientPointer.\n");
request.win = None;
request_XIGetClientPointer(&client_request, &request, Success);
- g_test_message("Testing valid window, unset ClientPointer.");
+ printf("Testing valid window, unset ClientPointer.\n");
request.win = CLIENT_WINDOW_ID;
request_XIGetClientPointer(&client_request, &request, Success);
- g_test_message("Testing valid window, set ClientPointer.");
+ printf("Testing valid window, set ClientPointer.\n");
client_window.clientPtr = devices.vcp;
test_data.dev = devices.vcp;
test_data.cp_is_set = TRUE;
@@ -144,7 +143,7 @@ static void test_XIGetClientPointer(void)
client_window.clientPtr = NULL;
- g_test_message("Testing window None, set ClientPointer.");
+ printf("Testing window None, set ClientPointer.\n");
client_request.clientPtr = devices.vcp;
test_data.dev = devices.vcp;
test_data.cp_is_set = TRUE;
@@ -154,14 +153,10 @@ static void test_XIGetClientPointer(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
client_window = init_client(0, NULL);
+ test_XIGetClientPointer();
- g_test_add_func("/xi2/protocol/XIGetClientPointer", test_XIGetClientPointer);
-
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xigetselectedevents.c b/xserver/test/xi2/protocol-xigetselectedevents.c
index 97aae159f..55de77356 100644
--- a/xserver/test/xi2/protocol-xigetselectedevents.c
+++ b/xserver/test/xi2/protocol-xigetselectedevents.c
@@ -48,7 +48,6 @@
#include "exevents.h"
#include "protocol-common.h"
-#include <glib.h>
static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, void *userdata);
static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data, void *userdata);
@@ -100,7 +99,7 @@ static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, voi
reply_check_defaults(rep, len, XIGetSelectedEvents);
- g_assert(rep->num_masks == test_data.num_masks_expected);
+ assert(rep->num_masks == test_data.num_masks_expected);
reply_handler = reply_XIGetSelectedEvents_data;
}
@@ -121,11 +120,11 @@ static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data
swaps(&mask->mask_len, n);
}
- g_assert(mask->deviceid < 6);
- g_assert(mask->mask_len <= (((XI2LASTEVENT + 8)/8) + 3)/4) ;
+ assert(mask->deviceid < 6);
+ assert(mask->mask_len <= (((XI2LASTEVENT + 8)/8) + 3)/4) ;
bitmask = (unsigned char*)&mask[1];
- g_assert(memcmp(bitmask,
+ assert(memcmp(bitmask,
test_data.mask[mask->deviceid],
mask->mask_len * 4) == 0);
@@ -145,14 +144,14 @@ static void request_XIGetSelectedEvents(xXIGetSelectedEventsReq* req, int error)
reply_handler = reply_XIGetSelectedEvents;
rc = ProcXIGetSelectedEvents(&client);
- g_assert(rc == error);
+ assert(rc == error);
reply_handler = reply_XIGetSelectedEvents;
client.swapped = TRUE;
swapl(&req->win, n);
swaps(&req->length, n);
rc = SProcXIGetSelectedEvents(&client);
- g_assert(rc == error);
+ assert(rc == error);
}
static void test_XIGetSelectedEvents(void)
@@ -165,11 +164,11 @@ static void test_XIGetSelectedEvents(void)
request_init(&request, XIGetSelectedEvents);
- g_test_message("Testing for BadWindow on invalid window.");
+ printf("Testing for BadWindow on invalid window.\n");
request.win = None;
request_XIGetSelectedEvents(&request, BadWindow);
- g_test_message("Testing for zero-length (unset) masks.");
+ printf("Testing for zero-length (unset) masks.\n");
/* No masks set yet */
test_data.num_masks_expected = 0;
request.win = ROOT_WINDOW_ID;
@@ -181,7 +180,7 @@ static void test_XIGetSelectedEvents(void)
memset(test_data.mask, 0,
sizeof(test_data.mask));
- g_test_message("Testing for valid masks");
+ printf("Testing for valid masks\n");
memset(&dev, 0, sizeof(dev)); /* dev->id is enough for XISetEventMask */
request.win = ROOT_WINDOW_ID;
@@ -210,7 +209,7 @@ static void test_XIGetSelectedEvents(void)
}
}
- g_test_message("Testing removing all masks");
+ printf("Testing removing all masks\n");
/* Unset all masks one-by-one */
for (j = MAXDEVICES - 1; j >= 0; j--)
{
@@ -229,13 +228,10 @@ static void test_XIGetSelectedEvents(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
- g_test_add_func("/xi2/protocol/XIGetSelectedEvents", test_XIGetSelectedEvents);
+ test_XIGetSelectedEvents();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xipassivegrabdevice.c b/xserver/test/xi2/protocol-xipassivegrabdevice.c
new file mode 100644
index 000000000..a61c1549c
--- /dev/null
+++ b/xserver/test/xi2/protocol-xipassivegrabdevice.c
@@ -0,0 +1,234 @@
+/**
+ * Copyright © 2011 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+/*
+ * Protocol testing for XIPassiveGrab request.
+ */
+#include <stdint.h>
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/extensions/XI2proto.h>
+#include "inputstr.h"
+#include "windowstr.h"
+#include "scrnintstr.h"
+#include "xipassivegrab.h"
+#include "exevents.h"
+
+#include "protocol-common.h"
+
+static ClientRec client_request;
+#define N_MODS 7
+static uint32_t modifiers[N_MODS] = {1, 2, 3, 4, 5, 6, 7};
+
+struct test_data {
+ int num_modifiers;
+} testdata;
+
+int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
+ int button, GrabParameters *param, GrabType grabtype,
+ GrabMask *mask);
+static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *userdata);
+
+int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
+{
+ if (id == root.drawable.id)
+ {
+ *win = &root;
+ return Success;
+ } else if (id == window.drawable.id)
+ {
+ *win = &window;
+ return Success;
+ }
+
+ return __real_dixLookupWindow(win, id, client, access);
+}
+
+int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
+ int button, GrabParameters *param, GrabType grabtype,
+ GrabMask *mask)
+{
+ /* Fail every odd modifier */
+ if (param->modifiers % 2)
+ return BadAccess;
+
+ return Success;
+}
+
+static void reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *userdata)
+{
+ xXIPassiveGrabDeviceReply *rep = (xXIPassiveGrabDeviceReply*)data;
+
+ if (client->swapped)
+ {
+ char n;
+ swaps(&rep->sequenceNumber, n);
+ swapl(&rep->length, n);
+ swaps(&rep->num_modifiers, n);
+
+ testdata.num_modifiers = rep->num_modifiers;
+ }
+
+ reply_check_defaults(rep, len, XIPassiveGrabDevice);
+
+ /* ProcXIPassiveGrabDevice sends the data in two batches, let the second
+ * handler handle the modifier data */
+ if (rep->num_modifiers > 0)
+ reply_handler = reply_XIPassiveGrabDevice_data;
+}
+
+static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *userdata)
+{
+ int i;
+ int n;
+
+ xXIGrabModifierInfo *mods = (xXIGrabModifierInfo*)data;
+
+ for (i = 0; i < testdata.num_modifiers; i++, mods++)
+ {
+ if (client->swapped)
+ swapl(&mods->modifiers, n);
+
+ /* 1 - 7 is the range we use for the global modifiers array
+ * above */
+ assert(mods->modifiers > 0);
+ assert(mods->modifiers <= 7);
+ assert(mods->modifiers % 2 == 1); /* because we fail odd ones */
+ assert(mods->status != Success);
+ assert(mods->pad0 == 0);
+ assert(mods->pad1 == 0);
+ }
+
+ reply_handler = reply_XIPassiveGrabDevice;
+}
+
+static void request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq* req, int error, int errval)
+{
+ char n;
+ int rc;
+ int modifiers;
+
+ rc = ProcXIPassiveGrabDevice(&client_request);
+ assert(rc == error);
+
+ if (rc != Success)
+ assert(client_request.errorValue == errval);
+
+ client_request.swapped = TRUE;
+ swaps(&req->length, n);
+ swapl(&req->time, n);
+ swapl(&req->grab_window, n);
+ swapl(&req->cursor, n);
+ swapl(&req->detail, n);
+ swaps(&req->deviceid, n);
+ modifiers = req->num_modifiers;
+ swaps(&req->num_modifiers, n);
+ swaps(&req->mask_len, n);
+
+ while(modifiers--)
+ {
+ CARD32 *mod = ((CARD32*)(req + 1)) + modifiers;
+ swapl(mod, n);
+ }
+
+ rc = SProcXIPassiveGrabDevice(&client_request);
+ assert(rc == error);
+
+ if (rc != Success)
+ assert(client_request.errorValue == errval);
+}
+
+static unsigned char *data[4096]; /* the request buffer */
+static void test_XIPassiveGrabDevice(void)
+{
+ int i;
+ xXIPassiveGrabDeviceReq *request = (xXIPassiveGrabDeviceReq*)data;
+ unsigned char *mask;
+
+ request_init(request, XIPassiveGrabDevice);
+
+ request->grab_window = CLIENT_WINDOW_ID;
+
+ reply_handler = reply_XIPassiveGrabDevice;
+ client_request = init_client(request->length, request);
+
+ printf("Testing invalid device\n");
+ request->deviceid = 12;
+ request_XIPassiveGrabDevice(&client_request, request, BadDevice, request->deviceid);
+
+ request->deviceid = XIAllMasterDevices;
+
+ printf("Testing invalid grab types\n");
+ for (i = XIGrabtypeFocusIn + 1; i < 0xFF; i++)
+ {
+ request->grab_type = i;
+ request_XIPassiveGrabDevice(&client_request, request, BadValue, request->grab_type);
+ }
+
+ printf("Testing invalid grab type + detail combinations\n");
+ request->grab_type = XIGrabtypeEnter;
+ request->detail = 1;
+ request_XIPassiveGrabDevice(&client_request, request, BadValue, request->detail);
+
+ request->grab_type = XIGrabtypeFocusIn;
+ request_XIPassiveGrabDevice(&client_request, request, BadValue, request->detail);
+
+ request->detail = 0;
+
+ printf("Testing invalid masks\n");
+ mask = (unsigned char*)&request[1];
+
+ request->mask_len = bytes_to_int32(XI2LASTEVENT + 1);
+ request->length += request->mask_len;
+ SetBit(mask, XI2LASTEVENT + 1);
+ request_XIPassiveGrabDevice(&client_request, request, BadValue, XI2LASTEVENT + 1);
+
+ ClearBit(mask, XI2LASTEVENT + 1);
+
+ /* tested all special cases now, test a few valid cases */
+
+ /* no modifiers */
+ request->deviceid = XIAllDevices;
+ request->grab_type = XIGrabtypeButton;
+ request->detail = XIAnyButton;
+ request_XIPassiveGrabDevice(&client_request, request, Success, 0);
+
+ /* some modifiers */
+ request->num_modifiers = N_MODS;
+ request->length += N_MODS;
+ memcpy((uint32_t*)(request + 1) + request->mask_len, modifiers, sizeof(modifiers));
+ request_XIPassiveGrabDevice(&client_request, request, Success, 0);
+}
+
+int main(int argc, char** argv)
+{
+ init_simple();
+
+ test_XIPassiveGrabDevice();
+
+ return 0;
+}
diff --git a/xserver/test/xi2/protocol-xiquerydevice.c b/xserver/test/xi2/protocol-xiquerydevice.c
index 508fc4dfb..cb1cc8130 100644
--- a/xserver/test/xi2/protocol-xiquerydevice.c
+++ b/xserver/test/xi2/protocol-xiquerydevice.c
@@ -38,7 +38,6 @@
#include "xiquerydevice.h"
#include "protocol-common.h"
-#include <glib.h>
/*
* Protocol testing for XIQueryDevice request and reply.
*
@@ -74,11 +73,11 @@ static void reply_XIQueryDevice(ClientPtr client, int len, char* data, void *use
reply_check_defaults(rep, len, XIQueryDevice);
if (querydata->which_device == XIAllDevices)
- g_assert(rep->num_devices == devices.num_devices);
+ assert(rep->num_devices == devices.num_devices);
else if (querydata->which_device == XIAllMasterDevices)
- g_assert(rep->num_devices == devices.num_master_devices);
+ assert(rep->num_devices == devices.num_master_devices);
else
- g_assert(rep->num_devices == 1);
+ assert(rep->num_devices == 1);
querydata->num_devices_in_reply = rep->num_devices;
reply_handler = reply_XIQueryDevice_data;
@@ -107,46 +106,46 @@ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void
}
if (querydata->which_device > XIAllMasterDevices)
- g_assert(info->deviceid == querydata->which_device);
+ assert(info->deviceid == querydata->which_device);
- g_assert(info->deviceid >= 2); /* 0 and 1 is reserved */
+ assert(info->deviceid >= 2); /* 0 and 1 is reserved */
switch(info->deviceid)
{
case 2: /* VCP */
dev = devices.vcp;
- g_assert(info->use == XIMasterPointer);
- g_assert(info->attachment == devices.vck->id);
- g_assert(info->num_classes == 3); /* 2 axes + button */
+ assert(info->use == XIMasterPointer);
+ assert(info->attachment == devices.vck->id);
+ assert(info->num_classes == 3); /* 2 axes + button */
break;
case 3: /* VCK */
dev = devices.vck;
- g_assert(info->use == XIMasterKeyboard);
- g_assert(info->attachment == devices.vcp->id);
- g_assert(info->num_classes == 1);
+ assert(info->use == XIMasterKeyboard);
+ assert(info->attachment == devices.vcp->id);
+ assert(info->num_classes == 1);
break;
case 4: /* mouse */
dev = devices.mouse;
- g_assert(info->use == XISlavePointer);
- g_assert(info->attachment == devices.vcp->id);
- g_assert(info->num_classes == 3); /* 2 axes + button */
+ assert(info->use == XISlavePointer);
+ assert(info->attachment == devices.vcp->id);
+ assert(info->num_classes == 3); /* 2 axes + button */
break;
case 5: /* keyboard */
dev = devices.kbd;
- g_assert(info->use == XISlaveKeyboard);
- g_assert(info->attachment == devices.vck->id);
- g_assert(info->num_classes == 1);
+ assert(info->use == XISlaveKeyboard);
+ assert(info->attachment == devices.vck->id);
+ assert(info->num_classes == 1);
break;
default:
/* We shouldn't get here */
- g_assert(0);
+ assert(0);
break;
}
- g_assert(info->enabled == dev->enabled);
- g_assert(info->name_len == strlen(dev->name));
- g_assert(strncmp((char*)&info[1], dev->name, info->name_len) == 0);
+ assert(info->enabled == dev->enabled);
+ assert(info->name_len == strlen(dev->name));
+ assert(strncmp((char*)&info[1], dev->name, info->name_len) == 0);
any = (xXIAnyInfo*)((char*)&info[1] + ((info->name_len + 3)/4) * 4);
for (j = 0; j < info->num_classes; j++)
@@ -171,9 +170,9 @@ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void
if (client->swapped)
swaps(&ki->num_keycodes, n);
- g_assert(any->type == XIKeyClass);
- g_assert(ki->num_keycodes == (xkb->max_key_code - xkb->min_key_code + 1));
- g_assert(any->length == (2 + ki->num_keycodes));
+ assert(any->type == XIKeyClass);
+ assert(ki->num_keycodes == (xkb->max_key_code - xkb->min_key_code + 1));
+ assert(any->length == (2 + ki->num_keycodes));
kc = (uint32_t*)&ki[1];
for (k = 0; k < ki->num_keycodes; k++, kc++)
@@ -181,15 +180,15 @@ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void
if (client->swapped)
swapl(kc, n);
- g_assert(*kc >= xkb->min_key_code);
- g_assert(*kc <= xkb->max_key_code);
+ assert(*kc >= xkb->min_key_code);
+ assert(*kc <= xkb->max_key_code);
}
break;
}
case 2: /* VCP and mouse have the same properties */
case 4:
{
- g_assert(any->type == XIButtonClass ||
+ assert(any->type == XIButtonClass ||
any->type == XIValuatorClass);
if (any->type == XIButtonClass)
@@ -200,10 +199,10 @@ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void
if (client->swapped)
swaps(&bi->num_buttons, n);
- g_assert(bi->num_buttons == devices.vcp->button->numButtons);
+ assert(bi->num_buttons == devices.vcp->button->numButtons);
len = 2 + bi->num_buttons + bytes_to_int32(bits_to_bytes(bi->num_buttons));
- g_assert(bi->length == len);
+ assert(bi->length == len);
} else if (any->type == XIValuatorClass)
{
xXIValuatorInfo *vi = (xXIValuatorInfo*)any;
@@ -219,17 +218,17 @@ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void
swapl(&vi->resolution, n);
}
- g_assert(vi->length == 11);
- g_assert(vi->number == 0 ||
+ assert(vi->length == 11);
+ assert(vi->number == 0 ||
vi->number == 1);
- g_assert(vi->mode == XIModeRelative);
+ assert(vi->mode == XIModeRelative);
/* device was set up as relative, so standard
* values here. */
- g_assert(vi->min.integral == -1);
- g_assert(vi->min.frac == 0);
- g_assert(vi->max.integral == -1);
- g_assert(vi->max.frac == 0);
- g_assert(vi->resolution == 0);
+ assert(vi->min.integral == -1);
+ assert(vi->min.frac == 0);
+ assert(vi->max.integral == -1);
+ assert(vi->max.frac == 0);
+ assert(vi->resolution == 0);
}
}
break;
@@ -257,10 +256,10 @@ static void request_XIQueryDevice(struct test_data *querydata,
request.deviceid = deviceid;
rc = ProcXIQueryDevice(&client);
- g_assert(rc == error);
+ assert(rc == error);
if (rc != Success)
- g_assert(client.errorValue == deviceid);
+ assert(client.errorValue == deviceid);
reply_handler = reply_XIQueryDevice;
@@ -268,10 +267,10 @@ static void request_XIQueryDevice(struct test_data *querydata,
swaps(&request.length, n);
swaps(&request.deviceid, n);
rc = SProcXIQueryDevice(&client);
- g_assert(rc == error);
+ assert(rc == error);
if (rc != Success)
- g_assert(client.errorValue == deviceid);
+ assert(client.errorValue == deviceid);
}
static void test_XIQueryDevice(void)
@@ -284,16 +283,16 @@ static void test_XIQueryDevice(void)
userdata = &data;
request_init(&request, XIQueryDevice);
- g_test_message("Testing XIAllDevices.");
+ printf("Testing XIAllDevices.\n");
request_XIQueryDevice(&data, XIAllDevices, Success);
- g_test_message("Testing XIAllMasterDevices.");
+ printf("Testing XIAllMasterDevices.\n");
request_XIQueryDevice(&data, XIAllMasterDevices, Success);
- g_test_message("Testing existing device ids.");
+ printf("Testing existing device ids.\n");
for (i = 2; i < 6; i++)
request_XIQueryDevice(&data, i, Success);
- g_test_message("Testing non-existing device ids.");
+ printf("Testing non-existing device ids.\n");
for (i = 6; i <= 0xFFFF; i++)
request_XIQueryDevice(&data, i, BadDevice);
@@ -304,13 +303,10 @@ static void test_XIQueryDevice(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
- g_test_add_func("/dix/xi2protocol/XIQueryDevice", test_XIQueryDevice);
+ test_XIQueryDevice();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xiquerypointer.c b/xserver/test/xi2/protocol-xiquerypointer.c
index 810c61575..0985ec70d 100644
--- a/xserver/test/xi2/protocol-xiquerypointer.c
+++ b/xserver/test/xi2/protocol-xiquerypointer.c
@@ -39,7 +39,6 @@
#include "exevents.h"
#include "protocol-common.h"
-#include <glib.h>
static ClientRec client_request;
static void reply_XIQueryPointer_data(ClientPtr client, int len,
@@ -96,18 +95,18 @@ static void reply_XIQueryPointer(ClientPtr client, int len, char *data,
reply_check_defaults(rep, len, XIQueryPointer);
- g_assert(rep->root == root.drawable.id);
- g_assert(rep->same_screen == xTrue);
+ assert(rep->root == root.drawable.id);
+ assert(rep->same_screen == xTrue);
sprite = test_data.dev->spriteInfo->sprite;
- g_assert((rep->root_x >> 16) == sprite->hot.x);
- g_assert((rep->root_y >> 16) == sprite->hot.y);
+ assert((rep->root_x >> 16) == sprite->hot.x);
+ assert((rep->root_y >> 16) == sprite->hot.y);
if (test_data.win == &root)
{
- g_assert(rep->root_x == rep->win_x);
- g_assert(rep->root_y == rep->win_y);
- g_assert(rep->child == window.drawable.id);
+ assert(rep->root_x == rep->win_x);
+ assert(rep->root_y == rep->win_y);
+ assert(rep->child == window.drawable.id);
} else
{
int x, y;
@@ -115,13 +114,13 @@ static void reply_XIQueryPointer(ClientPtr client, int len, char *data,
x = sprite->hot.x - window.drawable.x;
y = sprite->hot.y - window.drawable.y;
- g_assert((rep->win_x >> 16) == x);
- g_assert((rep->win_y >> 16) == y);
- g_assert(rep->child == None);
+ assert((rep->win_x >> 16) == x);
+ assert((rep->win_y >> 16) == y);
+ assert(rep->child == None);
}
- g_assert(rep->same_screen == xTrue);
+ assert(rep->same_screen == xTrue);
reply_handler = reply_XIQueryPointer_data;
}
@@ -137,19 +136,19 @@ static void request_XIQueryPointer(ClientPtr client, xXIQueryPointerReq* req, in
int rc;
rc = ProcXIQueryPointer(&client_request);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client_request.errorValue == req->deviceid);
+ assert(client_request.errorValue == req->deviceid);
client_request.swapped = TRUE;
swaps(&req->deviceid, n);
swaps(&req->length, n);
rc = SProcXIQueryPointer(&client_request);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client_request.errorValue == req->deviceid);
+ assert(client_request.errorValue == req->deviceid);
}
static void test_XIQueryPointer(void)
@@ -185,7 +184,7 @@ static void test_XIQueryPointer(void)
request_XIQueryPointer(&client_request, &request, BadDevice);
test_data.dev = devices.mouse;
- devices.mouse->u.master = NULL; /* Float, kind-of */
+ devices.mouse->master = NULL; /* Float, kind-of */
request.deviceid = devices.mouse->id;
request_XIQueryPointer(&client_request, &request, Success);
@@ -209,12 +208,9 @@ static void test_XIQueryPointer(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
- g_test_add_func("/xi2/protocol/XIQueryPointer", test_XIQueryPointer);
+ test_XIQueryPointer();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xiqueryversion.c b/xserver/test/xi2/protocol-xiqueryversion.c
index 46e62acbd..3bb356e7f 100644
--- a/xserver/test/xi2/protocol-xiqueryversion.c
+++ b/xserver/test/xi2/protocol-xiqueryversion.c
@@ -46,7 +46,6 @@
#include "xiqueryversion.h"
#include "protocol-common.h"
-#include <glib.h>
extern XExtensionVersion XIVersion;
@@ -74,14 +73,14 @@ static void reply_XIQueryVersion(ClientPtr client, int len, char* data, void *us
reply_check_defaults(rep, len, XIQueryVersion);
- g_assert(rep->length == 0);
+ assert(rep->length == 0);
sver = versions->major_server * 1000 + versions->minor_server;
cver = versions->major_client * 1000 + versions->minor_client;
ver = rep->major_version * 1000 + rep->minor_version;
- g_assert(ver >= 2000);
- g_assert((sver > cver) ? ver == cver : ver == sver);
+ assert(ver >= 2000);
+ assert((sver > cver) ? ver == cver : ver == sver);
}
/**
@@ -115,7 +114,7 @@ static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int e
request.major_version = versions.major_client;
request.minor_version = versions.minor_client;
rc = ProcXIQueryVersion(&client);
- g_assert(rc == error);
+ assert(rc == error);
client.swapped = TRUE;
@@ -124,7 +123,7 @@ static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int e
swaps(&request.minor_version, n);
rc = SProcXIQueryVersion(&client);
- g_assert(rc == error);
+ assert(rc == error);
}
/* Client version less than 2.0 must return BadValue, all other combinations
@@ -133,23 +132,23 @@ static void test_XIQueryVersion(void)
{
reply_handler = reply_XIQueryVersion;
- g_test_message("Server version 2.0 - client versions [1..3].0");
+ printf("Server version 2.0 - client versions [1..3].0\n");
/* some simple tests to catch common errors quickly */
request_XIQueryVersion(2, 0, 1, 0, BadValue);
request_XIQueryVersion(2, 0, 2, 0, Success);
request_XIQueryVersion(2, 0, 3, 0, Success);
- g_test_message("Server version 3.0 - client versions [1..3].0");
+ printf("Server version 3.0 - client versions [1..3].0\n");
request_XIQueryVersion(3, 0, 1, 0, BadValue);
request_XIQueryVersion(3, 0, 2, 0, Success);
request_XIQueryVersion(3, 0, 3, 0, Success);
- g_test_message("Server version 2.0 - client versions [1..3].[1..3]");
+ printf("Server version 2.0 - client versions [1..3].[1..3]\n");
request_XIQueryVersion(2, 0, 1, 1, BadValue);
request_XIQueryVersion(2, 0, 2, 2, Success);
request_XIQueryVersion(2, 0, 3, 3, Success);
- g_test_message("Server version 2.2 - client versions [1..3].0");
+ printf("Server version 2.2 - client versions [1..3].0\n");
request_XIQueryVersion(2, 2, 1, 0, BadValue);
request_XIQueryVersion(2, 2, 2, 0, Success);
request_XIQueryVersion(2, 2, 3, 0, Success);
@@ -158,7 +157,7 @@ static void test_XIQueryVersion(void)
/* this one takes a while */
unsigned int cmin, cmaj, smin, smaj;
- g_test_message("Testing all combinations.");
+ printf("Testing all combinations.\n");
for (smaj = 2; smaj <= 0xFFFF; smaj++)
for (smin = 0; smin <= 0xFFFF; smin++)
for (cmin = 0; cmin <= 0xFFFF; cmin++)
@@ -175,12 +174,9 @@ static void test_XIQueryVersion(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
- g_test_add_func("/xi2/protocol/XIQueryVersion", test_XIQueryVersion);
+ test_XIQueryVersion();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xiselectevents.c b/xserver/test/xi2/protocol-xiselectevents.c
index fe1c26df8..fa422e2cb 100644
--- a/xserver/test/xi2/protocol-xiselectevents.c
+++ b/xserver/test/xi2/protocol-xiselectevents.c
@@ -58,7 +58,6 @@
#include "xiselectev.h"
#include "protocol-common.h"
-#include <glib.h>
static unsigned char *data[4096 * 20]; /* the request data buffer */
@@ -107,7 +106,7 @@ static void request_XISelectEvent(xXISelectEventsReq *req, int error)
client = init_client(req->length, req);
rc = ProcXISelectEvents(&client);
- g_assert(rc == error);
+ assert(rc == error);
client.swapped = TRUE;
@@ -124,14 +123,14 @@ static void request_XISelectEvent(xXISelectEventsReq *req, int error)
swaps(&req->length, n);
swaps(&req->num_masks, n);
rc = SProcXISelectEvents(&client);
- g_assert(rc == error);
+ assert(rc == error);
}
static void request_XISelectEvents_masks(xXISelectEventsReq *req)
{
int i, j;
xXIEventMask *mask;
- int nmasks = (XI_LASTEVENT + 7)/8;
+ int nmasks = (XI2LASTEVENT + 7)/8;
unsigned char *bits;
mask = (xXIEventMask*)&req[1];
@@ -150,14 +149,14 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req)
request_XISelectEvent(req, Success);
/* Test 1:
- * mask may be larger than needed for XI_LASTEVENT.
+ * mask may be larger than needed for XI2LASTEVENT.
* Test setting each valid mask bit, while leaving unneeded bits 0.
* -> Success
*/
bits = (unsigned char*)&mask[1];
mask->mask_len = (nmasks + 3)/4 * 10;
memset(bits, 0, mask->mask_len * 4);
- for (j = 0; j <= XI_LASTEVENT; j++)
+ for (j = 0; j <= XI2LASTEVENT; j++)
{
SetBit(bits, j);
request_XISelectEvent(req, Success);
@@ -165,7 +164,7 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req)
}
/* Test 2:
- * mask may be larger than needed for XI_LASTEVENT.
+ * mask may be larger than needed for XI2LASTEVENT.
* Test setting all valid mask bits, while leaving unneeded bits 0.
* -> Success
*/
@@ -173,21 +172,21 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req)
mask->mask_len = (nmasks + 3)/4 * 10;
memset(bits, 0, mask->mask_len * 4);
- for (j = 0; j <= XI_LASTEVENT; j++)
+ for (j = 0; j <= XI2LASTEVENT; j++)
{
SetBit(bits, j);
request_XISelectEvent(req, Success);
}
/* Test 3:
- * mask is larger than needed for XI_LASTEVENT. If any unneeded bit
+ * mask is larger than needed for XI2LASTEVENT. If any unneeded bit
* is set -> BadValue
*/
bits = (unsigned char*)&mask[1];
mask->mask_len = (nmasks + 3)/4 * 10;
memset(bits, 0, mask->mask_len * 4);
- for (j = XI_LASTEVENT + 1; j < mask->mask_len * 4; j++)
+ for (j = XI2LASTEVENT + 1; j < mask->mask_len * 4; j++)
{
SetBit(bits, j);
request_XISelectEvent(req, BadValue);
@@ -200,7 +199,7 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req)
bits = (unsigned char*)&mask[1];
mask->mask_len = (nmasks + 3)/4;
memset(bits, 0, mask->mask_len * 4);
- for (j = 0; j <= XI_LASTEVENT; j++)
+ for (j = 0; j <= XI2LASTEVENT; j++)
{
SetBit(bits, j);
request_XISelectEvent(req, Success);
@@ -228,7 +227,7 @@ static void request_XISelectEvents_masks(xXISelectEventsReq *req)
bits = (unsigned char*)&mask[1];
mask->mask_len = (nmasks + 3)/4;
memset(bits, 0, mask->mask_len * 4);
- for (j = 0; j <= XI_LASTEVENT; j++)
+ for (j = 0; j <= XI2LASTEVENT; j++)
SetBit(bits, j);
ClearBit(bits, XI_HierarchyChanged);
for (j = 1; j < 6; j++)
@@ -250,7 +249,7 @@ static void test_XISelectEvents(void)
request_init(req, XISelectEvents);
- g_test_message("Testing for BadValue on zero-length masks");
+ printf("Testing for BadValue on zero-length masks\n");
/* zero masks are BadValue, regardless of the window */
req->num_masks = 0;
@@ -263,7 +262,7 @@ static void test_XISelectEvents(void)
req->win = CLIENT_WINDOW_ID;
request_XISelectEvent(req, BadValue);
- g_test_message("Testing for BadWindow.");
+ printf("Testing for BadWindow.\n");
/* None window is BadWindow, regardless of the masks.
* We don't actually need to set the masks here, BadWindow must occur
* before checking the masks.
@@ -283,7 +282,7 @@ static void test_XISelectEvents(void)
req->num_masks = 0xFFFC;
request_XISelectEvent(req, BadWindow);
- g_test_message("Triggering num_masks/length overflow");
+ printf("Triggering num_masks/length overflow\n");
req->win = ROOT_WINDOW_ID;
/* Integer overflow - req->length can't hold that much */
req->num_masks = 0xFFFF;
@@ -292,14 +291,14 @@ static void test_XISelectEvents(void)
req->win = ROOT_WINDOW_ID;
req->num_masks = 1;
- g_test_message("Triggering bogus mask length error");
+ printf("Triggering bogus mask length error\n");
mask = (xXIEventMask*)&req[1];
mask->deviceid = 0;
mask->mask_len = 0xFFFF;
request_XISelectEvent(req, BadLength);
/* testing various device ids */
- g_test_message("Testing existing device ids.");
+ printf("Testing existing device ids.\n");
for (i = 0; i < 6; i++)
{
mask = (xXIEventMask*)&req[1];
@@ -310,7 +309,7 @@ static void test_XISelectEvents(void)
request_XISelectEvent(req, Success);
}
- g_test_message("Testing non-existing device ids.");
+ printf("Testing non-existing device ids.\n");
for (i = 6; i <= 0xFFFF; i++)
{
req->win = ROOT_WINDOW_ID;
@@ -326,13 +325,10 @@ static void test_XISelectEvents(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
- g_test_add_func("/xi2/protocol/XISelectEvents", test_XISelectEvents);
+ test_XISelectEvents();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xisetclientpointer.c b/xserver/test/xi2/protocol-xisetclientpointer.c
index 2e638eea7..c266b6560 100644
--- a/xserver/test/xi2/protocol-xisetclientpointer.c
+++ b/xserver/test/xi2/protocol-xisetclientpointer.c
@@ -46,7 +46,6 @@
#include "exevents.h"
#include "protocol-common.h"
-#include <glib.h>
static ClientRec client_window;
static ClientRec client_request;
@@ -72,20 +71,20 @@ static void request_XISetClientPointer(xXISetClientPointerReq* req, int error)
client_request = init_client(req->length, req);
rc = ProcXISetClientPointer(&client_request);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client_request.errorValue == req->deviceid);
+ assert(client_request.errorValue == req->deviceid);
client_request.swapped = TRUE;
swapl(&req->win, n);
swaps(&req->length, n);
swaps(&req->deviceid, n);
rc = SProcXISetClientPointer(&client_request);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client_request.errorValue == req->deviceid);
+ assert(client_request.errorValue == req->deviceid);
}
@@ -98,36 +97,36 @@ static void test_XISetClientPointer(void)
request.win = CLIENT_WINDOW_ID;
- g_test_message("Testing BadDevice error for XIAllDevices and XIMasterDevices.");
+ printf("Testing BadDevice error for XIAllDevices and XIMasterDevices.\n");
request.deviceid = XIAllDevices;
request_XISetClientPointer(&request, BadDevice);
request.deviceid = XIAllMasterDevices;
request_XISetClientPointer(&request, BadDevice);
- g_test_message("Testing Success for VCP and VCK.");
+ printf("Testing Success for VCP and VCK.\n");
request.deviceid = devices.vcp->id; /* 2 */
request_XISetClientPointer(&request, Success);
- g_assert(client_window.clientPtr->id == 2);
+ assert(client_window.clientPtr->id == 2);
request.deviceid = devices.vck->id; /* 3 */
request_XISetClientPointer(&request, Success);
- g_assert(client_window.clientPtr->id == 2);
+ assert(client_window.clientPtr->id == 2);
- g_test_message("Testing BadDevice error for all other devices.");
+ printf("Testing BadDevice error for all other devices.\n");
for (i = 4; i <= 0xFFFF; i++)
{
request.deviceid = i;
request_XISetClientPointer(&request, BadDevice);
}
- g_test_message("Testing window None");
+ printf("Testing window None\n");
request.win = None;
request.deviceid = devices.vcp->id; /* 2 */
request_XISetClientPointer(&request, Success);
- g_assert(client_request.clientPtr->id == 2);
+ assert(client_request.clientPtr->id == 2);
- g_test_message("Testing invalid window");
+ printf("Testing invalid window\n");
request.win = INVALID_WINDOW_ID;
request.deviceid = devices.vcp->id;
request_XISetClientPointer(&request, BadWindow);
@@ -137,13 +136,10 @@ static void test_XISetClientPointer(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
client_window = init_client(0, NULL);
- g_test_add_func("/xi2/protocol/XISetClientPointer", test_XISetClientPointer);
+ test_XISetClientPointer();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xi2/protocol-xiwarppointer.c b/xserver/test/xi2/protocol-xiwarppointer.c
index 4f8860ea0..0c8db453d 100644
--- a/xserver/test/xi2/protocol-xiwarppointer.c
+++ b/xserver/test/xi2/protocol-xiwarppointer.c
@@ -39,7 +39,6 @@
#include "exevents.h"
#include "protocol-common.h"
-#include <glib.h>
static int expected_x = SPRITE_X;
static int expected_y = SPRITE_Y;
@@ -70,8 +69,8 @@ int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access
static Bool ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
int x, int y, Bool generateEvent)
{
- g_assert(x == expected_x);
- g_assert(y == expected_y);
+ assert(x == expected_x);
+ assert(y == expected_y);
return TRUE;
}
@@ -83,12 +82,12 @@ static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req,
int rc;
rc = ProcXIWarpPointer(client);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client->errorValue == req->deviceid);
+ assert(client->errorValue == req->deviceid);
else if (rc == BadWindow)
- g_assert(client->errorValue == req->dst_win ||
+ assert(client->errorValue == req->dst_win ||
client->errorValue == req->src_win);
@@ -105,12 +104,12 @@ static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq* req,
swaps(&req->deviceid, n);
rc = SProcXIWarpPointer(client);
- g_assert(rc == error);
+ assert(rc == error);
if (rc == BadDevice)
- g_assert(client->errorValue == req->deviceid);
+ assert(client->errorValue == req->deviceid);
else if (rc == BadWindow)
- g_assert(client->errorValue == req->dst_win ||
+ assert(client->errorValue == req->dst_win ||
client->errorValue == req->src_win);
client->swapped = FALSE;
@@ -145,7 +144,7 @@ static void test_XIWarpPointer(void)
request.deviceid = devices.kbd->id;
request_XIWarpPointer(&client_request, &request, BadDevice);
- devices.mouse->u.master = NULL; /* Float, kind-of */
+ devices.mouse->master = NULL; /* Float, kind-of */
request.deviceid = devices.mouse->id;
request_XIWarpPointer(&client_request, &request, Success);
@@ -204,13 +203,10 @@ static void test_XIWarpPointer(void)
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
init_simple();
screen.SetCursorPosition = ScreenSetCursorPosition;
- g_test_add_func("/xi2/protocol/XIWarpPointer", test_XIWarpPointer);
+ test_XIWarpPointer();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xkb.c b/xserver/test/xkb.c
index 6fbb26a01..421153cd1 100644
--- a/xserver/test/xkb.c
+++ b/xserver/test/xkb.c
@@ -46,8 +46,7 @@
#include <X11/extensions/XKMformat.h>
#include "xkbfile.h"
#include "../xkb/xkb.h"
-
-#include <glib.h>
+#include <assert.h>
/**
* Initialize an empty XkbRMLVOSet.
@@ -62,16 +61,16 @@ static void xkb_get_rules_test(void)
XkbGetRulesDflts(&rmlvo);
- g_assert(rmlvo.rules);
- g_assert(rmlvo.model);
- g_assert(rmlvo.layout);
- g_assert(rmlvo.variant);
- g_assert(rmlvo.options);
- g_assert(strcmp(rmlvo.rules, XKB_DFLT_RULES) == 0);
- g_assert(strcmp(rmlvo.model, XKB_DFLT_MODEL) == 0);
- g_assert(strcmp(rmlvo.layout, XKB_DFLT_LAYOUT) == 0);
- g_assert(strcmp(rmlvo.variant, XKB_DFLT_VARIANT) == 0);
- g_assert(strcmp(rmlvo.options, XKB_DFLT_OPTIONS) == 0);
+ assert(rmlvo.rules);
+ assert(rmlvo.model);
+ assert(rmlvo.layout);
+ assert(rmlvo.variant);
+ assert(rmlvo.options);
+ assert(strcmp(rmlvo.rules, XKB_DFLT_RULES) == 0);
+ assert(strcmp(rmlvo.model, XKB_DFLT_MODEL) == 0);
+ assert(strcmp(rmlvo.layout, XKB_DFLT_LAYOUT) == 0);
+ assert(strcmp(rmlvo.variant, XKB_DFLT_VARIANT) == 0);
+ assert(strcmp(rmlvo.options, XKB_DFLT_OPTIONS) == 0);
}
/**
@@ -95,17 +94,17 @@ static void xkb_set_rules_test(void)
XkbGetRulesDflts(&rmlvo_new);
/* XkbGetRulesDflts strdups the values */
- g_assert(rmlvo.rules != rmlvo_new.rules);
- g_assert(rmlvo.model != rmlvo_new.model);
- g_assert(rmlvo.layout != rmlvo_new.layout);
- g_assert(rmlvo.variant != rmlvo_new.variant);
- g_assert(rmlvo.options != rmlvo_new.options);
-
- g_assert(strcmp(rmlvo.rules, rmlvo_new.rules) == 0);
- g_assert(strcmp(rmlvo.model, rmlvo_new.model) == 0);
- g_assert(strcmp(rmlvo.layout, rmlvo_new.layout) == 0);
- g_assert(strcmp(rmlvo.variant, rmlvo_new.variant) == 0);
- g_assert(strcmp(rmlvo.options, rmlvo_new.options) == 0);
+ assert(rmlvo.rules != rmlvo_new.rules);
+ assert(rmlvo.model != rmlvo_new.model);
+ assert(rmlvo.layout != rmlvo_new.layout);
+ assert(rmlvo.variant != rmlvo_new.variant);
+ assert(rmlvo.options != rmlvo_new.options);
+
+ assert(strcmp(rmlvo.rules, rmlvo_new.rules) == 0);
+ assert(strcmp(rmlvo.model, rmlvo_new.model) == 0);
+ assert(strcmp(rmlvo.layout, rmlvo_new.layout) == 0);
+ assert(strcmp(rmlvo.variant, rmlvo_new.variant) == 0);
+ assert(strcmp(rmlvo.options, rmlvo_new.options) == 0);
}
@@ -145,29 +144,26 @@ static void xkb_set_get_rules_test(void)
/* This test is iffy, because strictly we may be comparing against already
* freed memory */
- g_assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0);
- g_assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0);
- g_assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0);
- g_assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0);
- g_assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0);
+ assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0);
+ assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0);
+ assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0);
+ assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0);
+ assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0);
XkbGetRulesDflts(&rmlvo);
- g_assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0);
- g_assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0);
- g_assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0);
- g_assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0);
- g_assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0);
+ assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0);
+ assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0);
+ assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0);
+ assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0);
+ assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0);
}
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
- g_test_add_func("/xkb/set-get-rules", xkb_set_get_rules_test);
- g_test_add_func("/xkb/get-rules", xkb_get_rules_test);
- g_test_add_func("/xkb/set-rules", xkb_set_rules_test);
+ xkb_set_get_rules_test();
+ xkb_get_rules_test();
+ xkb_set_rules_test();
- return g_test_run();
+ return 0;
}
diff --git a/xserver/test/xtest.c b/xserver/test/xtest.c
index 6ea6862f7..2ab46505f 100644
--- a/xserver/test/xtest.c
+++ b/xserver/test/xtest.c
@@ -33,8 +33,6 @@
#include "xkbsrv.h"
#include "xserver-properties.h"
-#include <glib.h>
-
/**
*/
@@ -65,14 +63,14 @@ static void xtest_init_devices(void)
/* this also inits the xtest devices */
InitCoreDevices();
- g_assert(xtestpointer);
- g_assert(xtestkeyboard);
- g_assert(IsXTestDevice(xtestpointer, NULL));
- g_assert(IsXTestDevice(xtestkeyboard, NULL));
- g_assert(IsXTestDevice(xtestpointer, inputInfo.pointer));
- g_assert(IsXTestDevice(xtestkeyboard, inputInfo.keyboard));
- g_assert(GetXTestDevice(inputInfo.pointer) == xtestpointer);
- g_assert(GetXTestDevice(inputInfo.keyboard) == xtestkeyboard);
+ assert(xtestpointer);
+ assert(xtestkeyboard);
+ assert(IsXTestDevice(xtestpointer, NULL));
+ assert(IsXTestDevice(xtestkeyboard, NULL));
+ assert(IsXTestDevice(xtestpointer, inputInfo.pointer));
+ assert(IsXTestDevice(xtestkeyboard, inputInfo.keyboard));
+ assert(GetXTestDevice(inputInfo.pointer) == xtestpointer);
+ assert(GetXTestDevice(inputInfo.keyboard) == xtestkeyboard);
}
/**
@@ -87,32 +85,29 @@ static void xtest_properties(void)
Atom xtest_prop = XIGetKnownProperty(XI_PROP_XTEST_DEVICE);
rc = XIGetDeviceProperty(xtestpointer, xtest_prop, &prop);
- g_assert(rc == Success);
- g_assert(prop);
+ assert(rc == Success);
+ assert(prop);
rc = XIGetDeviceProperty(xtestkeyboard, xtest_prop, &prop);
- g_assert(rc == Success);
- g_assert(prop != NULL);
+ assert(rc == Success);
+ assert(prop != NULL);
rc = XIChangeDeviceProperty(xtestpointer, xtest_prop,
XA_INTEGER, 8, PropModeReplace, 1, &value, FALSE);
- g_assert(rc == BadAccess);
+ assert(rc == BadAccess);
rc = XIChangeDeviceProperty(xtestkeyboard, xtest_prop,
XA_INTEGER, 8, PropModeReplace, 1, &value, FALSE);
- g_assert(rc == BadAccess);
+ assert(rc == BadAccess);
}
int main(int argc, char** argv)
{
- g_test_init(&argc, &argv,NULL);
- g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id=");
-
- g_test_add_func("/dix/xtest/init", xtest_init_devices);
- g_test_add_func("/dix/xtest/properties", xtest_properties);
+ xtest_init_devices();
+ xtest_properties();
- return g_test_run();
+ return 0;
}