[PATCH 1/2] test/xi2: Add a test for XIGrabDevice
peter.hutterer at who-t.net
Mon Apr 15 18:16:50 PDT 2013
On Mon, Apr 15, 2013 at 10:45:26AM +0200, Rui Tiago Cação Matos wrote:
> On 15 April 2013 02:20, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> > On Sat, Apr 13, 2013 at 04:22:53AM +0200, Rui Matos wrote:
> >> Currently fails but will get fixed in the next commit.
> > did this test really succeed? because it fails here and it looks like it
> > cannot actually work.
> > protocol-xigrabdevice: protocol-xigrabdevice.c:73: request_XIGrabDevice:
> > Assertion `rc == error' failed.
> > rc is BadWindow because dixLookupWindow fails. You wrap it in code, but the
> > wrap has no effect because both dixLookupWindow and GrabDevice are part of
> > libdix.a. so __wrap_dixLookupWindow is never called, we alway get BadWindow
> > and the interesting part of the test is never called.
> Oh, right, the dtrace shenanigans. It doesn't work because what
> actually gets linked in the test (and servers) binaries are these
> partially linked objects dix.O and os.O and thus the linker can't do
> its wrapping magic.
> I worked around that locally by running configure --without-dtrace.
> The following patch also makes it work but I guess it's wrong since
> I'm not sure what these special dtrace objects are doing:
> diff --git a/configure.ac b/configure.ac
> index e0750bb..8831f4b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1342,8 +1342,8 @@ AC_DEFINE(XCMISC, 1, [Support XCMisc extension])
> AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
> if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
> - DIX_LIB='$(top_builddir)/dix/dix.O'
> - OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)
> + DIX_LIB='$(top_builddir)/dix/libdix.la'
> + OS_LIB='$(top_builddir)/os/libos.la $(top_builddir)/os/dtrace.o
> $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
yeah, confirmed that this works. we'd need some more flexible solution to
thhis, beacuse the above ovbiously just disables the dtrace bits.
More information about the xorg-devel