test: print strerror() if uinput device creation fails
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 17 Sep 2014 00:30:45 +0000 (10:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 17 Sep 2014 03:35:41 +0000 (13:35 +1000)
commit87c8d82ac5d5297a38af3dc0bc3f7af6dfcbec54
tree0c1926f20f229691f08d9c625c710f26af9dfe82
parentb9093ca2b1d16b78d93fec9f50a8cde8aaba8415
test: print strerror() if uinput device creation fails

The most common error running the test suite is not running as root, but the
error message is hard to interpret. Make it more explicit when it failed,
printing the strerror of the errno.

Note that libevdev 1.3 is needed to get EACCES instead of EBADF
http://cgit.freedesktop.org/libevdev/commit/?id=debe9b030c8069cdf78307888ef3b65830b25122
A workaround is put in place for now until libevdev 1.3 is commonplace.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c