xserver-multidpi/test/xi2
Alan Coopersmith cccba52d15 Abort xi2 tests if ActivateDevice() fails
I was getting segfaults in xi2 tests from trying to copy XKB keyboard
state to NULL pointers with a stack of:
    key=key@entry=0) at xkbActions.c:1189
    sendevent=sendevent@entry=0 '\000') at devices.c:420
    at protocol-xiquerydevice.c:338

which turned out to be due to xkbcomp failure, which was logged in the
test logs as:
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.

but which was overlooked because the ActivateDevice() return code wasn't
checked and the tests went forward assuming the structures were all
correctly initialized.   This catches the failure closer to the point of
failure, to save debugging time.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-02 16:35:58 -07:00
..
.gitignore test: add new test cases to .gitignore 2012-03-04 20:01:29 -08:00
Makefile.am Replace INCLUDES with AM_CPPFLAGS 2013-08-06 13:08:13 +10:00
protocol-common.c Abort xi2 tests if ActivateDevice() fails 2014-10-02 16:35:58 -07:00
protocol-common.h test/xi2: Clean up -Wshadow warnings 2014-01-22 19:56:32 -08:00
protocol-eventconvert.c Merge remote-tracking branch 'yselkowitz/master' 2012-12-19 12:22:03 -08:00
protocol-xigetclientpointer.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
protocol-xigetselectedevents.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
protocol-xipassivegrabdevice.c Xi: fix modifier offset in XIPassiveGrab swapping function 2014-01-25 18:54:16 +10:00
protocol-xiquerydevice.c test/xi2: Clean up -Wshadow warnings 2014-01-22 19:56:32 -08:00
protocol-xiquerypointer.c test: fix redundant declaration of "BadDevice" 2012-05-16 10:59:39 +10:00
protocol-xiqueryversion.c test/xi2: Clean up -Wshadow warnings 2014-01-22 19:56:32 -08:00
protocol-xiselectevents.c Fix formatting of address operators 2012-12-05 18:09:48 -06:00
protocol-xisetclientpointer.c test: fix redundant declaration of "BadDevice" 2012-05-16 10:59:39 +10:00
protocol-xiwarppointer.c test/xi2: fix compiler warning 2012-12-21 13:04:09 +10:00
xi2.c dix: split xi2_mask_isset into a per-device function 2012-12-12 17:25:16 +10:00