On Sat, Jan 22, 2011 at 02:58:48PM -0600, Chris Bagwell wrote:
> I like the idea.  It would be nice to get as far as injecting fake
> packet and testing resulting movement or button posts.

that would work if you wrap all the ReadInput methods of wacom. the GNU ld
supports a -wrap feature that allows us to overwrite function calls at
linktime and insert our own. see xserver/test/xi2/ for some examples
http://cgit.freedesktop.org/xorg/xserver/tree/test/xi2/protocol-xigetclientpointer.c
on the top is _wrap_dixLookupClient() which wraps the server one.

so, you could even wrap read(), write() or ioctl() if you're keen enough.

Cheers,
  Peter



> There are a hand full of times I'd rather test something this way then
> constantly rebooting an X server.
> 
> Chris
> 
> On Thu, Jan 20, 2011 at 9:24 PM, Peter Hutterer
> <[email protected]> wrote:
> >
> > This is an RFC for something I have needed for a while. As you noticed, the
> > fast pace of the driver also introduces unintended regressions. Many code
> > changes are incredibly hard to test however since they sometimes rely on
> > specific hardware, a specific setup or even timing.
> >
> > Many bugs can be found however by good old unit-testing. This RFC contains a
> > patch series that adds unittesting to the driver. As shown in the example
> > patches 4 and 5, this way we can check the behaviour of internal function
> > (and even the X server API) to be consistent over time. If something breaks,
> > make check will tell us. Patch 3 has more details on how it works.
> >
> > If nothing else, writing a test usually at least forces one to rethink the
> > API of a particular function, think of the side-effects and much more.
> >
> > Cheers,
> >  Peter
> >
> > ------------------------------------------------------------------------------
> > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> > Finally, a world-class log management solution at an even better price-free!
> > Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> > February 28th, so secure your free ArcSight Logger TODAY!
> > http://p.sf.net/sfu/arcsight-sfd2d
> > _______________________________________________
> > Linuxwacom-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> >
> 

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to